Question OS-BAS-0073
HardA program calls read() on a file. What happens if the data is not yet in memory?
- A.
read() returns random data
- B.
The program crashes
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
OS Basics question
A program calls read() on a file. What happens if the data is not yet in memory?
read() returns random data
The program crashes
Sign up free to see the answer and a step-by-step explanation.
The process blocks while the kernel starts disk I/O and schedules another process
The CPU busy-waits in user mode