Operating Systems: Deadlocks and Memory Management
Questions covering deadlock conditions, prevention, and avoidance strategies, along with page fault handling and memory management concepts in operating systems.
Questions
When does a page fault occur?
- If the page is corrupted
- If the page is present in main memory
- If the page is not in the main memory
- If one tries to divide a number by 0
- If the page is present in secondary memory
If a property of locality holds in a program, then which of the following is true?
- Number of page faults will be more.
- Page faults will be less.
- Page faults will remain the same.
- Page faults will vary irregularly.
- Searching for any page will take more time.
Which of the following is/are necessary condition(s) for deadlock?
- Non-preemption
- Circular wait
- Preemption
- Only 1, 2 and 4
- Mutual exclusion
What do you mean by an overlay?
- A specific memory location
- Overloading the system with many files
- A part of operating system
- Single contiguous memory to run large programs
- Storing the files on hard disk
The situation in which a waiting process remains in waiting state because the resources that are required are held by another waiting process is called __________.
- starvation
- aging
- deadlock
- dormant
- spooling
If the system can allocate resources to each process (upto its maximum) in some order and still avoid deadlock, the state of the system is safe. Then
- deadlocked state is safe
- an unsafe state may lead to a deadlock situation
- deadlocked state is a subset of an unsafe state
- both (2) and (3)
When does a deadlock occur with a single resource?
- If there are more than two processes competing for that resource
- If there are only two processes competing for that resource
- If there is a single process competing for that resource
- None of these
Page fault occurs when
- the page is not in main memory
- the page is in main memory
- the page is corrupted by application software
- we try to divide a number by zero
Which of the following algorithms is used for deadlock avoidance?
- Dijkstra's Banking Algorithm
- Round Robin Algorithm
- Shortest Job First Algorithm
- First Come First Serve Algorithm
Mutual exclusion problem occurs between
- two disjoint processes
- processes that share resources
- processes that don't use the same resources
- two processes in critical region
The method for dealing with the deadlock problem is
- to use a protocol to make sure that the system enters into a deadlock state
- to allow the system to enter a deadlock state and then recover
- to ignore the problem, and pretend that deadlocks never occur in the system. The UNIX operating system uses this solution
- both (2) and (3)