Question 41
MediumThe working-set window is 5 references. What is the working set at the end of the string 2, 6, 1, 5, 7, 7, 7, 7, 5, 1?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Operating Systems
The working-set window is 5 references. What is the working set at the end of the string 2, 6, 1, 5, 7, 7, 7, 7, 5, 1?
{5, 7}
{7}
{2, 6, 1, 5, 7}
{1, 5, 7}
Sign up free to see the answer and a step-by-step explanation.
What happens when the sum of the working sets of all processes exceeds the available frames?
Internal fragmentation
Belady's anomaly
Thrashing
Deadlock
Sign up free to see the answer and a step-by-step explanation.
What does copy-on-write help with after fork()?
Deletes unused pages
Avoids copying pages until one of the processes actually writes to them
Encrypts memory
Writes pages to disk faster
Sign up free to see the answer and a step-by-step explanation.
In the clock (second-chance) algorithm, what happens to a page whose reference bit is 1 when the hand reaches it?
It is written to disk
It is replaced at once
It is locked forever
Its bit is cleared and the hand moves on
Sign up free to see the answer and a step-by-step explanation.
Why is LRU hard to implement exactly in hardware?
It suffers from Belady's anomaly
The system would have to record the time of every memory reference
It needs no memory
It needs future knowledge
Sign up free to see the answer and a step-by-step explanation.
Does LRU suffer from Belady's anomaly?
No; it is a stack algorithm
Yes, always
Only with 3 frames
Only with OPT
Sign up free to see the answer and a step-by-step explanation.
With demand paging, what happens when a process starts?
All pages are loaded at once
Only the last page is loaded
No pages are loaded until they are first referenced
The process is swapped out
Sign up free to see the answer and a step-by-step explanation.
What is the purpose of the page-fault frequency (PFF) strategy?
To give a process more frames if its fault rate is too high, and take frames away if it is too low
To count page sizes
To choose disk blocks
To prevent all page faults
Sign up free to see the answer and a step-by-step explanation.
Which page-replacement algorithm is optimal but impossible to implement in practice?
OPT (Belady's optimal)
FIFO
Clock
LRU
Sign up free to see the answer and a step-by-step explanation.
A dirty page is chosen as the victim. What extra work is needed?
It must be written back to disk before the frame is reused
It must be compressed
It must be copied to another process
Nothing
Sign up free to see the answer and a step-by-step explanation.