CECS 326 Final Part 3
CECS 326 Final Exam Review
Prepare yourself for the CECS 326 Final Exam with this comprehensive quiz! Test your knowledge on deadlocks, resource management, and virtual memory concepts crucial for computer science students. Engage with the 25 thought-provoking questions designed to reinforce your learning and identify areas for improvement.
- Validate your understanding of key concepts.
- Review essential topics in systems programming.
- Track your learning progress effectively.
Given the following snapshot of a certain system with four processes P1 through P4 and three resource types A (3 instances), B (3 instances), and C (4 instances).
True
False
A deadlock occurs when the system has no available free resources.
True
False
Recovery from a deadlock through rollback tends to involve less loss of work but incur greater overhead.
True
False
A system in an unsafe state will ultimately deadlock.
True
False
Which of the following statements is true?
A deadlock is guaranteed to occur as long as there are more than one instances of Process_1 and Process_2 are running.
A deadlock may occur sometime, but not necessarily every time that the two processes are running concurrently.
A deadlock may occur sometime only if there are more than one instances of Process_1 and Process_2 are running.
A deadlock is guaranteed to occur when the two processes are running concurrently.
Which of the following techniques is not appropriate for recovery from deadlock?
Taking the appropriate resources from one or more of the deadlocked processes and terminating these processes.
Roll back one process at a time until the deadlock cycle is eliminated.
Terminating one process at a time until the deadlock cycle is eliminated.
Terminating all deadlocked processes.
Assume there are three resources R1, R2, and R3, that are each assigning unique ranking integer values 15, 10, and 25, respectively. What is a resource ordering which prevents a circular wait?
R2, R1, R3
R3, R1, R2
R1, R2, R3
R3, R2, R1
Suppose at this time, P3 requests one unit of the resource. Which of the following is correct?
The request will be granted, since the state after granting the request will be safe.
The request will be granted, since the current state is safe.
The request will not be granted, since the current state is not safe.
The request will not be granted, since the state after granting the request will be unsafe.
A claim edge in a resource-allocation graph indicates that ______.
A process may release a resource that it has already been assigned
A process has been allocated a resource
A process may request a resource
A process has requested a resource
In a system that uses deadlock detection algorithm, _______.
A deadlock is detected sometime after it has occurred but not necessarily immediately
A deadlock is detected as soon as it occurs
A deadlock is detected just before it occurs
A deadlock is detected sometime before it occurs, but not necessarily just before
One necessary condition for deadlock is ______, which states that a resource can be released only voluntarily by the process holding the resource.
Hold and wait
Circular wait
No preemption
Mutual exclusion
A cycle in a resource-allocation graph is ______.
A sufficient condition for a deadlock in the case that each resource has more than once instance
A necessary and sufficient condition for deadlock in the case that each resource has more than one instance
A necessary and sufficient condition for a deadlock in the case that each resource has exactly one instance
Neither necessary nor sufficient for indicating deadlock in the case that each resource has exactly one instance
Which of the following is NOT a factor in choosing which process to terminate during recovery from a deadlock?
What the priority of the process is.
How many more resources the process needs in order to complete.
How many processes will need to be terminated.
Who the parent of the process is.
In general, virtual memory decreases the degree of multiprogramming in a system.
True
False
MMU stands for Main Memory Unit.
True
False
On a system with demand paging, a process will experience a high page fault rate when the process begins execution.
True
False
The instruction that causes a page fault needs to be re-started after the fault has been handled.
True
False
Belady's anomaly states that ______.
For some page replacement algorithms, the page-fault rate may decrease as the number of allocated frames increases
For some page replacement algorithms, the page-fault rate may increase as the number of allocated frames increases
Giving more memory to a process will improve its performance
As the number of allocated frames increases, the page-fault rate may decrease for all page replacement algorithms
An advantage of virtual memory is that ______.
A program can be much larger than the size of physical memory
The programmers can concentrate programming the problem instead of worrying about the amount of physical memory available
It provides a way to execute a program that is only partially loaded in memory
All of the above
Which of the following is a benefit of allowing a program that is only partially in memory to execute?
Programs can be written to use more memory than is available in physical memory.
CPU utilization and throughput is increased.
Less I/O is needed to load or swap each user program into memory.
All of the above.
Which of the following is NOT part of the procedure performed by the kernel in servicing page fault?
Restart the instruction that was interrupted.
Determine location of the desired page in secondary storage, and schedule an operation to read it into the allocated page frame.
When the storage read is complete, adjust page table.
Find a page and allocate it to the process.
The working set strategy _______.
Swaps out a process if OS cannot allocate enough page frames to accommodate its working set
Swaps in a new process if there is enough memory available to accommodate its working set
Keeps the degree of multiprogramming as high as possible while preventing thrashing
All of the above
None of the above
Optimal page replacement ______.
Is the page-replacement algorithm most often implemented
Can suffer from Belady's anomaly
Requires that the system keep track of previously used pages
Is used mostly for comparison with other page-replacement schemes
In demand paging, _____.
A page is loaded in memory only when it is needed during execution
A page loaded in memory may never be accessed
All pages that a program will access during execution are loaded in memory in the beginning
A page is loaded in memory just before it is needed
Given the reference string of page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and a system with three page frames. Using demand paging and the FIFO replacement algorithm, what is the number of page faults for the given reference string?
14
10
8
7
{"name":"CECS 326 Final Part 3", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Prepare yourself for the CECS 326 Final Exam with this comprehensive quiz! Test your knowledge on deadlocks, resource management, and virtual memory concepts crucial for computer science students. Engage with the 25 thought-provoking questions designed to reinforce your learning and identify areas for improvement. Validate your understanding of key concepts. Review essential topics in systems programming. Track your learning progress effectively.","img":"https:/images/course8.png"}