For the reference string: (given that number of frames is 3)
7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1
for the optimal page replacement algorithm, which of the following will represent the hit ratio?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: A. 11/20
Explanation
Simulating OPT with 3 frames on this 20-reference string: references 7, 0, 1 fault to fill the initially empty frames. At reference 2 (position 4), OPT evicts 7 because, among the resident pages, 7 is used farthest in the future (position 18); at reference 3 (position 6) it evicts 1 (next used at position 14); at reference 4 (position 8) it evicts 0 (next used at position 11); at reference 0 (position 11) it evicts 4, which is never referenced again; at reference 1 (position 14) it evicts 3, which is never referenced again; and at reference 7 (position 18) it evicts 2, which is never referenced again. Counting carefully gives exactly 9 faults (positions 1,2,3,4,6,8,11,14,18) and therefore 11 hits out of 20, so the hit ratio is 11/20.More System Software and Operating System questions
- Which of the following is not an interprocessor communication mechanism in UNIX?
- In disk scheduling example, suppose the disk tracks are numbered from 0 to 49. Head is presently positioned at track 15 and requests for tr…
- Following is not the feature/characteristic of Linked-List allocation of Files in a File system:
- Match List - I with List - II. List - I List - II A. Macros I. Converts high level code to object (Machine) code B. Assembler II. Used for…
- Once the process is allocated CPU and executing, which of the following events could NOT occur? A. The process could issue an I/O request a…
- What shall be the average waiting time per process if we know that 10 processes (on average) arrive every second and there are normally 20…