CS FundamentalsModerateGATE CS
Assertion (A): Context switching between threads of the same process is cheaper than between processes. Reason (R): Threads of the same process have separate page tables.
- A. Both A and R are true, and R is the correct explanation of A
- B. A is true but R is false
- C. A is false but R is true
- D. Both A and R are false
Correct answer: B. A is true but R is false
Threads share one address space, so no page-table switch or TLB flush is needed; that is why A holds. R states the opposite of the truth.
More Operating Systems questions
- Which pair correctly matches each mechanism with the problem it solves? P. Aging Q. Priority inheritance R. Copy-on-write S. Working-set…
- Match the file-system structure with what it is used for: (1) superblock, (2) inode bitmap, (3) journal, (4) directory entry. (a) maps a…
- Which sequence of metadata updates for appending a block to a file is SAFEST to write to disk without a journal, so that a crash leaves at…
- An application calls fsync() after writing a new file and then renames it into place. Why must it also fsync the containing directory on…
- A TLB with 32 entries uses 4 KB pages. A program loops over an array of 40 pages, touching each page once per pass. With LRU replacement…
- How many page faults occur when a process sequentially reads a 1 MB file through mmap() with 4 KB pages, assuming no read-ahead and none…