OS & Hardware
What is the mechanism by which applications ask the OS to perform tasks such as file I/O?
- ASystem call
- BContext switch
- CDemand paging
Show answer and explanation
Answer: A. System call
Applications run in user mode and cannot operate disks or devices directly. They use system calls: a dedicated instruction switches to privileged mode and invokes the kernel to read or write files, allocate memory, create processes and so on, then returns to user mode. A context switch changes which process runs, and demand paging loads pages only when needed.
- A. Correct. It is how applications request OS services.
- B. A context switch changes the running process.
- C. Demand paging loads pages when they are needed.