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.

11 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

When does a page fault occur?

  1. If the page is corrupted
  2. If the page is present in main memory
  3. If the page is not in the main memory
  4. If one tries to divide a number by 0
  5. If the page is present in secondary memory
Question 2 Multiple Choice (Single Answer)

If a property of locality holds in a program, then which of the following is true?

  1. Number of page faults will be more.
  2. Page faults will be less.
  3. Page faults will remain the same.
  4. Page faults will vary irregularly.
  5. Searching for any page will take more time.
Question 3 Multiple Choice (Single Answer)

Which of the following is/are necessary condition(s) for deadlock?

  1. Non-preemption
  2. Circular wait
  3. Preemption
  4. Only 1, 2 and 4
  5. Mutual exclusion
Question 4 Multiple Choice (Single Answer)

What do you mean by an overlay?

  1. A specific memory location
  2. Overloading the system with many files
  3. A part of operating system
  4. Single contiguous memory to run large programs
  5. Storing the files on hard disk
Question 5 Multiple Choice (Single Answer)

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 __________.

  1. starvation
  2. aging
  3. deadlock
  4. dormant
  5. spooling
Question 6 Multiple Choice (Single Answer)

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

  1. deadlocked state is safe
  2. an unsafe state may lead to a deadlock situation
  3. deadlocked state is a subset of an unsafe state
  4. both (2) and (3)
Question 7 Multiple Choice (Single Answer)

When does a deadlock occur with a single resource?

  1. If there are more than two processes competing for that resource
  2. If there are only two processes competing for that resource
  3. If there is a single process competing for that resource
  4. None of these
Question 8 Multiple Choice (Single Answer)

Page fault occurs when

  1. the page is not in main memory
  2. the page is in main memory
  3. the page is corrupted by application software
  4. we try to divide a number by zero
Question 9 Multiple Choice (Single Answer)

Which of the following algorithms is used for deadlock avoidance?

  1. Dijkstra's Banking Algorithm
  2. Round Robin Algorithm
  3. Shortest Job First Algorithm
  4. First Come First Serve Algorithm
Question 10 Multiple Choice (Single Answer)

Mutual exclusion problem occurs between

  1. two disjoint processes
  2. processes that share resources
  3. processes that don't use the same resources
  4. two processes in critical region
Question 11 Multiple Choice (Single Answer)

The method for dealing with the deadlock problem is

  1. to use a protocol to make sure that the system enters into a deadlock state
  2. to allow the system to enter a deadlock state and then recover
  3. to ignore the problem, and pretend that deadlocks never occur in the system. The UNIX operating system uses this solution
  4. both (2) and (3)