1.3 The third function of the operating system — storage management function
On the introduction to operating systems – storage management features, I give the following questions:
- 1. What tasks is the file management system of the operating system mainly responsible for?
- 2. Why is data transfer the main reason that affects computer performance?
- 3. What are hard disks, memory, and Cache?
- 4. Does the reading mode inside the memory affect the performance of the computer?
- 5. How does the operating system get the location of data from messages sent by the CPU?
In general, the bottleneck that limits the speed of our computers is not the speed of the CPU (you can’t get it full on the Internet), but the performance of the memory you buy.
One of the reasons modern computers have shifted from the CPU core to the memory core is that the memory can no longer move data fast enough to keep up with the CPU's computing speedCopy the code
Question 1: What are the main tasks of the file management system of the operating system?
- Virtual logical file resources and virtual memory functions. Unify memory resources and disk resources logically.
- Manage data transfer. Because the CPU computing needs data, calculated data, also need to find a place to store.
- Ensure file stability. Temporary cached files must be automatically deleted. Files that users want to save permanently must exist even after the power failure.
Among them, we mainly explain the second point of data handling, because it relates to the speed of our computer performance. And the remaining two points are involved in the operating system in the end on the hard disk to do what, which process is very complex and cumbersome, do not take the examination of postgraduate requirements.
Question 2: Why is data transfer a major factor affecting computer performance?
Because the CPU register space is very small, our data is stored in the Cache, memory, hard disk. When the CPU needs it, the data is taken out of memory and transmitted through the bus to the CPU. We’ll send it back when we’re done. And the transmission speed between this kind of interface, it is far to catch up with the CPU computation speed. This causes the CPU to always be in a “hungry” state.
Usually the most cost-effective way to improve the performance of an old computer is to buy a solid state drive. You will immediately feel the comfort of a second on.
Question 3: What are hard disks, memory, and Cache?
Hard disk, memory, and Cache are all types of storage used to store data. Only their price, performance, transmission speed is not the same.
Ideally, we would want to buy the fastest, most powerful memory.
But in the case of limited funds, we need to think carefully and deal with separately.
- Put the data that the CPU often accesses into the expensive, fast Cache, memory.
- Put infrequently accessed data into cheap, slow, large memory and hard drives
Question 4: Does the way memory is read inside affect computer performance?
When a signal is sent from the CPU to read a certain data, there is a delay in the process. It is mainly about the disk scheduling part, but this part of the specific operation, the operating system is difficult to specific impact, so it is generally handed over to the disk manufacturer to achieve the optimal algorithm.
Question 5: How does the operating system get the location of data from messages sent by the CPU?
First we access the file explorer, using the resource address character.
C:\Program Files
But the CPU generally uses a binary address, 0101011110101011. You can think of it simply as a string of numbers, and the operating system gets it and it searches for the logical address, and then it finds the physical address from the logical address.
We mainly learn how the operating system to search the corresponding logical address faster, certainly can’t be silly linear search, generally using partition, segmentation, paging and other partition, reduce the time complexity of search.
Zobol by Computer Operating system Learning Notes