CS FundamentalsHardGATE CS
A server uses a fixed pool of 8 worker threads, and each request does a blocking database call taking 90% of its time. Roughly how many threads are needed to keep 4 cores busy?
- A. About 4
- B. About 8
- C. About 400
- D. About 40
Correct answer: D. About 40
Each thread uses the CPU only 10% of the time, so cores × 1/(1 − 0.9) = 4 × 10 = 40 threads keep them busy (ignoring overhead).
More Operating Systems questions
- Which statement about user-mode and kernel-mode stacks is correct?
- A process gets SIGSEGV writing to a page marked read-only that belongs to a copy-on-write mapping after fork(). Why is this NOT what…
- A system uses paging with a 2-bit protection field (read, write) in each PTE and the CPU also has an execute-disable bit. Which page…
- Swap space is configured at 2 GB, RAM is 8 GB, and the OS uses overcommit. A process mallocs 20 GB and touches only 1 GB. What happens on…
- Which algorithm decides WHICH process to kill when Linux runs out of memory?
- NUMA systems: a thread running on node 0 frequently reads memory allocated on node 1. Which statement is correct?