CCP Process & Memory Management 3 — Questions and Answers
Question 1: What condition is NOT required for deadlock to occur?
- Mutual exclusion
- Preemption allowed (Correct answer)
- Hold and wait
- Circular wait
Correct answer: Preemption allowed
Deadlock requires mutual exclusion, hold-and-wait, no preemption, and circular wait; allowing preemption prevents deadlock.
Question 2: In segmentation-based memory management, what does each segment descriptor typically contain?
- A page frame number and dirty bit
- A base address and limit (length) (Correct answer)
- A virtual page number and TLB entry
- A disk block address and swap flag
Correct answer: A base address and limit (length)
A segment descriptor stores the base (starting physical address) and limit (size) of the segment.
Question 3: Which scheduling metric measures the total time from process submission to completion?
- CPU utilization
- Turnaround time (Correct answer)
- Waiting time
- Response time
Correct answer: Turnaround time
Turnaround time is the elapsed time from job submission to job completion, including waiting and execution.
Question 4: What is the primary advantage of using a multi-level page table over a single-level page table?
- Faster address translation due to fewer levels
- Reduced memory overhead for sparse address spaces (Correct answer)
- Simpler hardware implementation
- Elimination of the need for a TLB
Correct answer: Reduced memory overhead for sparse address spaces
Multi-level page tables avoid allocating page table entries for unmapped regions, saving memory for sparse address spaces.
Question 5: What does the term 'working set' refer to in virtual memory management?
- The set of all pages ever accessed by a process
- The set of pages a process actively uses during a time window (Correct answer)
- The set of free frames available in physical memory
- The set of pages currently swapped to disk
Correct answer: The set of pages a process actively uses during a time window
The working set is the collection of pages a process has referenced within a recent time window, used to guide page replacement.
Question 6: Which IPC mechanism is best suited for passing large amounts of data between processes with minimal copying?
- Pipes
- Message queues
- Shared memory (Correct answer)
- Signals
Correct answer: Shared memory
Shared memory allows processes to read and write the same memory region directly, avoiding data copying overhead.
Question 7: What is the purpose of the Banker's Algorithm?
- To allocate memory pages using a FIFO strategy
- To avoid deadlock by ensuring the system stays in a safe state (Correct answer)
- To detect memory leaks in running processes
- To schedule processes based on their burst time
Correct answer: To avoid deadlock by ensuring the system stays in a safe state
The Banker's Algorithm is a deadlock avoidance technique that grants resources only if the resulting state is safe.
What condition is NOT required for deadlock to occur?