CS FundamentalsModerateGATE CS · Amazon/Microsoft SDE MCQ
Which statement about user-level threads in a many-to-one model is correct?
- A. A page fault in one thread is handled without stopping the others
- B. Two threads of the process can run in parallel on two cores
- C. The kernel schedules each of the threads separately on the CPU
- D. A blocking system call by one thread blocks all threads of the process
Correct answer: D. A blocking system call by one thread blocks all threads of the process
The kernel sees a single schedulable entity, so a blocking call or page fault stops all of the process's threads, and they can never run truly in parallel. Thread switching, however, needs no system call, which makes it fast.
More Operating Systems questions
- A system has 4 instances of R1 and 2 of R2. Allocated: P1 holds 1 R1; P2 holds 2 R1 and 1 R2; P3 holds 1 R1 and 1 R2. Requests: P1 wants 1…
- Which statement about a process that calls exec() successfully is correct?
- A logical address space has 8 pages of 2 KB each, and physical memory has 32 frames. How many bits are in a logical address and in a…
- Reference string 1, 2, 3, 1, 4, 5, 1, 6, 2, 1, 3, 4 with 3 frames, initially empty. The clock (second-chance) algorithm sets a page's…
- TLB lookup 20 ns (done first), memory access 100 ns, single-level page table, TLB hit ratio 80%. In addition, 1 in every 1,000 memory…
- A bounded buffer uses semaphores empty = N, full = 0 and mutex = 1. The producer is changed to do wait(mutex) BEFORE wait(empty); the…