Skip to main content

10 multiple-choice questions related to deadlock prevention in DBMS:

Here are 10 multiple-choice questions related to deadlock prevention in DBMS with their answers:


Question 1: Deadlock Definition

Q1: A deadlock in DBMS occurs when:

  • A) Multiple transactions wait indefinitely for each other to release resources
  • B) A single transaction is completed
  • C) A transaction is rolled back
  • D) The database is updated

Answer: A) Multiple transactions wait indefinitely for each other to release resources


Question 2: Deadlock Prevention Techniques

Q2: Which of the following is a technique used for deadlock prevention?

  • A) Wait-Die Scheme
  • B) Two-Phase Commit
  • C) Data Replication
  • D) Shadow Paging

Answer: A) Wait-Die Scheme


Question 3: Resource Allocation Graph

Q3: In the context of deadlock prevention, a Resource Allocation Graph (RAG) is used to:

  • A) Schedule transactions
  • B) Detect cycles and potential deadlocks
  • C) Optimize queries
  • D) Manage memory

Answer: B) Detect cycles and potential deadlocks


Question 4: Wait-Die Scheme

Q4: In the Wait-Die Scheme, if an older transaction requests a resource held by a younger transaction, it:

  • A) Waits for the resource
  • B) Is aborted
  • C) Preempts the resource
  • D) Rolls back

Answer: A) Waits for the resource


Question 5: No Preemption

Q5: The "No Preemption" rule in deadlock prevention states that:

  • A) Resources cannot be forcibly taken from transactions
  • B) Transactions must always wait for resources
  • C) Resources are always available
  • D) Transactions can request resources multiple times

Answer: A) Resources cannot be forcibly taken from transactions


Question 6: Circular Wait Condition

Q6: Preventing which of the following conditions can help in deadlock prevention?

  • A) Circular Wait
  • B) Mutual Exclusion
  • C) Hold and Wait
  • D) Starvation

Answer: A) Circular Wait


Question 7: Hold and Wait Condition

Q7: To prevent deadlock, the "Hold and Wait" condition can be avoided by:

  • A) Ensuring transactions request all resources at once
  • B) Allowing transactions to hold resources indefinitely
  • C) Granting resources in a cyclic order
  • D) Preventing transactions from requesting resources

Answer: A) Ensuring transactions request all resources at once


Question 8: Wait-for Graph

Q8: A Wait-for Graph is used to:

  • A) Allocate resources
  • B) Detect deadlocks
  • C) Backup data
  • D) Normalize the database

Answer: B) Detect deadlocks


Question 9: Priority-Based Prevention

Q9: In priority-based deadlock prevention schemes, if a low-priority transaction requests a resource held by a high-priority transaction, it:

  • A) Preempts the resource
  • B) Is rolled back
  • C) Waits for the resource
  • D) Releases all resources

Answer: C) Waits for the resource


Question 10: Timestamp Ordering

Q10: In Timestamp Ordering, if a transaction with a higher timestamp requests a resource held by a transaction with a lower timestamp, it:

  • A) Waits for the resource
  • B) Is aborted
  • C) Is granted the resource immediately
  • D) Preempts the resource

Answer: A) Waits for the resource

Comments

Popular posts from this blog

Top 5 Safe Chat Apps for Kids with Parental Controls

Now a days kids are growing up with technology at their fingertips. While communication apps help children stay connected with family and friends, safety remains a top concern for parents. Unregulated platforms can expose children to inappropriate content, online predators, and cyberbullying. That’s why choosing a kid-friendly chat app with parental controls is essential. To help parents find the best options, we’ve compiled a list of the top five safest chat apps for kids that offer safe and controlled environment. 1. Messenger Kids (By Meta) Best for: Safe video calls and text messaging with parental supervision Features: Parents approve all contacts No ads or in-app purchases Fun filters, stickers, and games Monitored messaging and activity reports Why It’s Safe: Messenger Kids is designed for children under 13 and requires parental approval for every contact. Parents can monitor chats and control screen time through the Parent Dashboard. Download Messenger Kids 2...

10 Routing Protocol MCQ

10 multiple-choice questions on Routing protocol s  with explanations, useful for UGC NET, SET, GATE, ISRO, and other competitive exams . Question 1: Purpose of Routing Protocols Q1: What is the primary purpose of a routing protocol? A) To assign IP addresses to devices B) To determine the best path for data packets to reach their destination C) To encrypt data during transmission D) To physically connect different networks Answer: B) To determine the best path for data packets to reach their destination Explanation: Routing protocols help routers determine the most efficient path for data transmission across a network, ensuring fast and reliable communication. Question 2: Classification of Routing Protocols Q2: Routing protocols can be broadly classified into which two main categories? A) TCP and UDP B) Distance Vector and Link-State C) IPv4 and IPv6 D) Static and Dynamic Answer: B) Distance Vector and Link-State Explanation: Routing prot...

10 Distance Vector and Link-State Routing MCQ

  10 multiple-choice questions  on  Distance Vector and Link-State Routing with explanations, useful for  UGC NET, SET, GATE, ISRO, and other competitive exams . Question 1: Basic Concept of Distance Vector Routing Q1: In a distance vector routing protocol, how do routers share routing information? A) By flooding the entire network with routing updates B) By periodically exchanging routing tables with their immediate neighbors C) By using a link-state database to determine the shortest path D) By dynamically updating paths based on link failure reports Answer: B) By periodically exchanging routing tables with their immediate neighbors Explanation: In Distance Vector Routing, routers share their routing tables with neighbors at regular intervals, leading to a simple but slow convergence mechanism. Question 2: Example of Distance Vector Routing Protocol Q2: Which of the following is an example of a Distance Vector routing protocol? A) OSPF ...