Consider the following statements: S1: LRU page replacement algorithm suffers…
2023
Consider the following statements:
S1: LRU page replacement algorithm suffers from Belady’s anomaly.
S2: Shortest Remaining Time First (SRTF) scheduling may cause starvation.
S3: The stack is shared by all threads in a process.
Which of the following is correct?
- A.
S1, S2 and S3 are true
- B.
S1 and S3 are false, and S2 is true
- C.
S1 and S2 are false, and S3 is true
- D.
S1, S2 and S3 are false
Attempted by 232 students.
Show answer & explanation
Correct answer: B
Correct answer: S1 and S3 are false, and S2 is true
S1 is false: LRU has the stack property, so it does not suffer from Belady’s anomaly. FIFO is the classic page-replacement algorithm that may show Belady’s anomaly.
S2 is true: SRTF can starve longer processes when shorter jobs keep arriving.
S3 is false: Threads of a process share code, data, and open files, but each thread normally has its own stack and register context.
Therefore, only statement S2 is true.
A video solution is available for this question — log in and enroll to watch it.