CST 334 - Learning Journal Week IV
Flavio Cervantes
CST334-40_2253
This week I learned what swapping entails; it is used when
insufficient memory for all the active processes. The mechanism involves
raising a page fault if the page table detects the page isn’t present in memory.
The page fault handler of the operating system is able to swap the page from
the disk. By following a specific policy such as First in first out, random, least
recently used it is able to control the method in which it swaps by following a
specific algorithm. Each replacement policy has pros and cons that should be
used properly to achieve great efficiency.
I also learned about the different technologies that are
involved with physical memory such as cache management, optimal replacement policy,
First in first out, random, and workload. I found random policy very
interesting because it doesn’t follow an order and replaces a random page to
replace pressurized memory. I also found
the simplicity of FIFO interesting, while it’s not the most efficient, it’s easy
to understand because pages were lined up in a que, and the first in page gets
evicted, then so on and so forth in a uniform manner.
Regarding hardware, HDD is much cheaper and slower compared
to RAM. The present bit in a page table shows whether a page is active in memory.
Hardware is able to raise a page fault if it detects that a virtual page isn’t
present. A page fault handler is able to find the disk address of the
respective page in the table. It also issues a disk request to fetch it into
memory and then marks it as active. Once the disk operation completes, it
updates the page table and retries the instructions until it times out or is successful.
Comments
Post a Comment