CCP Process & Memory Management 2 — Questions and Answers
Question 1: Which scheduling algorithm can lead to starvation of low-priority processes?
- Round Robin
- First-Come First-Served
- Priority Scheduling (Correct answer)
- Shortest Job First
Correct answer: Priority Scheduling
Priority Scheduling can starve low-priority processes if high-priority processes continuously arrive.
Question 2: What is the purpose of the Translation Lookaside Buffer (TLB)?
- To store recently used disk blocks
- To cache recent virtual-to-physical address translations (Correct answer)
- To buffer I/O operations between memory and disk
- To hold the process control block of the running process
Correct answer: To cache recent virtual-to-physical address translations
The TLB is a fast cache that stores recent page-table lookups to speed up virtual address translation.
Question 3: In the context of process states, what does it mean for a process to be in the 'blocked' state?
- The process has finished execution
- The process is waiting for a CPU time slice
- The process is waiting for an event such as I/O completion (Correct answer)
- The process has been swapped out to disk
Correct answer: The process is waiting for an event such as I/O completion
A blocked process is waiting for an event (e.g., I/O completion) before it can continue execution.
Question 4: Which memory allocation strategy searches the entire free list and picks the partition that leaves the smallest leftover fragment?
- First Fit
- Best Fit (Correct answer)
- Worst Fit
- Next Fit
Correct answer: Best Fit
Best Fit selects the smallest free partition that is large enough, minimizing wasted space in that allocation.
Question 5: What is a zombie process in Unix/Linux?
- A process consuming 100% CPU
- A process whose parent has died
- A terminated process whose entry remains in the process table (Correct answer)
- A process waiting indefinitely for a lock
Correct answer: A terminated process whose entry remains in the process table
A zombie process has completed execution but retains its process table entry until the parent reads its exit status.
Question 6: Which page replacement algorithm replaces the page that has not been used for the longest period of time?
- FIFO
- Optimal
- LRU (Correct answer)
- Clock
Correct answer: LRU
Least Recently Used (LRU) evicts the page whose last access was the farthest in the past.
Question 7: What is the difference between a process and a thread?
- Threads have separate memory spaces; processes share memory
- Processes are lighter weight than threads
- Threads share the address space of their process; processes have separate address spaces (Correct answer)
- Threads cannot run concurrently; processes can
Correct answer: Threads share the address space of their process; processes have separate address spaces
Threads within a process share code, data, and heap segments, while separate processes each have their own address space.
Which scheduling algorithm can lead to starvation of low-priority processes?