CS FundamentalsVery hardGATE CS
Linux's CFS gives each runnable task a virtual runtime that increases more slowly for higher-weight (lower nice) tasks, and always runs the task with the smallest virtual runtime. Two CPU-bound tasks have weights 1024 (nice 0) and 335 (nice 5). About what share of the CPU does the nice-0 task receive?
- A. About 50%
- B. About 90%
- C. About 25%
- D. About 75%
Correct answer: D. About 75%
CFS shares the CPU in proportion to weight: 1024 / (1024 + 335) ≈ 0.753, so roughly three quarters. Each nice level changes weight by about 1.25×, so 5 levels is about 3×.
More Operating Systems questions
- Which statement about scheduler activations / the two-level (many-to-many) threading model is correct?
- How many of these statements about virtual memory are correct? 1. A process can have a virtual address space larger than physical memory…
- A process accesses an address whose PTE has the valid bit clear. Which TWO situations are both possible, and how does the OS tell them…
- Which feature lets an OS allocate memory for a growing stack only when it is actually touched?
- A system thrashes at 50 processes. Which of these will reduce thrashing? 1. Using local page replacement 2. Adding more physical memory 3…
- Why is pure LRU rarely implemented exactly in hardware, and what is used instead?