-
Does the solid state hard drive still have a magnetic head?
traditional hard drives rely on the mechanical rotation of magnetic heads to read and write data. it is said that solid-state drives have the same principle of reading and writing as memory, so solid-state drives have no heads? then why can t the spee...
-
Problems with memory and memory sticks
1. Main memory includes ROM, RAM, cache 2.Cache is a small capacity memory between CPU and main memory
question: 1. In the second point, does main memory mean that RAM, which is commonly known as "br > 2.cache ", only logically belongs to memory, b...
-
Is it faster to cut and paste or copy and paste in Windows? Why? What is the principle of operation?
is it faster to cut and paste or copy and paste in Windows? Why? What is the principle of operation? ...
-
The relationship between bootloader and real mode to protected mode?
the relationship between bootloader and real mode to protected mode? Recently, I have been studying the operating system, and then I have read several books, 30-day self-made operating system and the implementation of an operating system. In fact, I pref...
-
How does this js code change a 32-bit data stream into a 16-bit data stream?
**
* 32 16
* @param {ByteArray} chunk
*
static bit32to16(chunk) {
const b16 = new Int16Array(chunk.byteLength 4);
const dv = new DataView(chunk.buffer);
for (let i = 0, offset = 0; offset < chunk.byteLength; iPP, offset...
-
What is the layout of physical memory after the Linux system starts?
in the 32-bit case, the Linux kernel virtual address starts from 0xc0000000, and 3GB+896MB belongs to kernel space. 896MB to 4GB is high-end memory, not to mention. The information I found on the Internet shows that kernel image starts from 3GB+16MB. Si...
-
Why is it that the logical address used in the real mode is the physical address, but the protected mode is not? Aren't the logical addresses of real mode and protected mode also offsets?
take a look at the operating system Truth Restoration and find that the logical address used in the real mode above is the physical address, isn t it necessary to add the segment base address? Why does the protection mode avoid this problem? ...
-
How does the other thread know that the mutex is released?
spin locks are easy to understand, which is constantly polling, so what is the mechanism of mutexes? What are the drawbacks of this mechanism that make it better to use spin locks in some situations? ...
-
Why is the pipe half-duplex?
Why do pipes have to be half-duplex from a source point of view? ...
-
Does memory have to be faster than disk?
is there a special situation that makes memory slower than disk? Like a page break? ...
-
What are the differences in implementation and functionality between message queues and pipes (including anonymous pipes and FIFO)?
what are the differences in implementation and functionality between RT, message queues and pipes (including anonymous pipes and FIFO)? ...
-
How to write batch bat to compress a folder?
win7 system. as shown in the figure, create a bat file in the same directory, and compress the dist folder into dist.zip ....
-
Why must threads wait and wake up locked?
when any thread X executes the wait () and notify () methods on any thread Y, it needs to acquire the lock first. it is said that the locking mechanism is to solve the critical resource problem, so does it allow threads to start and pause access to any ...
-
What is the difference between direct IO and memory mapping?
does it seem that kernel cache has been removed from data replication? ...
-
Vfork if return reclaims the stack of the main process in the main of the child process, resulting in a crash, what about the thread?
The thread also does not have a separate address space, and the thread cannot cause the main process to crash through return because the thread is often a separate function? Is there any way for the thread to also recycle the stack of the main process an...
-
How to extend the Peterson algorithm to three or more processes
Peterson algorithm implements mutually exclusive access by pure software. But it only illustrates the mutual exclusion between the two processes, as shown below
-sharpdefine FALSE 0
-sharpdefine TRUE 1
-sharpdefine N 2
int turn;
int interested[N];
vo...
-
What is the problem with virtual memory?
for machines with 32-bit operating system and 4G memory, addressing within the range of 4G is supported at most because of 32-bit systems, and since the actual physical memory size is 4G, in this case, the address of virtual memory must exceed 4G. In tha...
-
On the problem that 32-bit operating system can support up to 4G memory
on this question, I understand it like this: 1 to be exact, 32-bit CPU should support up to 4G memory because 32-bit CPU has 32 address buses, each line 0 or 1, a total of 2 ^ 32 possibilities, 2 ^ 32 memory addresses, each memory address corresponds t...
-
What are the principles for selecting sendfile and mmap?
sendfile and mmap are both typical zero-copy technologies, and sendfile is very efficient when files do not need to be modified. It is said that mmap is more suitable for the transfer of small files, while sendfile is more suitable for large files. How s...
-
On the problem of "Unix signal does not queue"
topic description
there is a simple signal sample program in "CSAPP ". I compiled and ran the same code in Ubuntu, and the result was different from that given in the book, and it was different in the most important place: the signal was not queued. ...