In: Computer Science
Solution:
PART 1: List and define the alternative page fetch policies.
There are two alternative page fetch policies.
a) Demand paging
b) Prepaging
Demand Paging:
All the pages in the frame are present in secondary
memory.
Demand paging says that do not load any page from secondary memory
in the main memory until it is required or demanded by the CPU.
When a page is referred for the first time in the main memory, then that page will be found in the secondary memory and is loaded in the main memory. After that, it may or may not be present in the main memory depending upon the page replacement algorithm.
Prepaging:
In the case of pre-paging pages other than demanded by the CPU on demand paging are also brought in. The OS guesses in advance which page the process will require and pre-loads them into the memory from secondary memory.
PART 2: What are three replacement algorithms?
They are as follows:
PART 3: What is the purpose of the TLB?
The main purpose of using the Translation Look aside Buffer is
to make page transition faster at a cheaper cost as compared to the
cache and main memory.
It is also a memory cache which is closer to the CPU and the time
taken by CPU to access TLB is lesser then that taken to access main
memory.
TLB is faster and smaller than the main memory but cheaper and bigger than the register. It contains only the entries of those many pages that are frequently accessed by the CPU.