Computer Systems: Program... -Access
Computer Systems: Program... -Access
3rd Edition
ISBN: 9780134071923
Author: Bryant
Publisher: PEARSON
bartleby

Concept explainers

Question
Book Icon
Chapter 12, Problem 12.30HW

A.

Program Plan Intro

Deadlocks:

  • The deadlock denotes a situation where a collection of threads remains blocked.
  • It denotes waiting for a condition that would never be true.
  • The progress graph denotes invaluable tool for understanding deadlock.
  • If “P” and “V” operations are been ordered incorrectly, the forbidden regions for two semaphores would overlap.
  • If any execution trajectory reaches deadlock state “d” then no further progress will be possible.
  • In this case each thread waits for the other one for a “V” operation that never occurs.
  • The overlapping forbidden regions would induce a set of states called “deadlock region”.
  • The deadlock is inevitable is trajectory touches a state in deadlock region.
  • Once it enters deadlock regions, the trajectories could never leave.

Mutex lock ordering rule:

  • A program is deadlock-free if each thread acquires its mutexes in order.
  • It releases them in reverse order and given a total ordering for all mutexes.
  • The mutex should be achieved in order to ensure deadlock free scheme.

B.

Program Plan Intro

Deadlocks:

  • The deadlock denotes a situation where a collection of threads remains blocked.
  • It denotes waiting for a condition that would never be true.
  • The progress graph denotes invaluable tool for understanding deadlock.
  • If “P” and “V” operations are been ordered incorrectly, the forbidden regions for two semaphores would overlap.
  • If any execution trajectory reaches deadlock state “d” then no further progress will be possible.
  • In this case each thread waits for the other one for a “V” operation that never occurs.
  • The overlapping forbidden regions would induce a set of states called “deadlock region”.
  • The deadlock is inevitable is trajectory touches a state in deadlock region.
  • Once it enters deadlock regions, the trajectories could never leave.

Mutex lock ordering rule:

  • A program is deadlock-free if each thread acquires its mutexes in order.
  • It releases them in reverse order and given a total ordering for all mutexes.
  • The mutex should be achieved in order to ensure deadlock free scheme.

C.

Program Plan Intro

Deadlocks:

  • The deadlock denotes a situation where a collection of threads remains blocked.
  • It denotes waiting for a condition that would never be true.
  • The progress graph denotes invaluable tool for understanding deadlock.
  • If “P” and “V” operations are been ordered incorrectly, forbidden regions for two semaphores would overlap.
  • If any execution trajectory reaches deadlock state “d” then no further progress will be possible.
  • In this case each thread waits for the other one for a “V” operation that never occurs.
  • The forbidden regions that are overlapping would induce a set of states called “deadlock region”.
  • The deadlock is inevitable is trajectory touches a state in deadlock region.
  • Once it enters deadlock regions, the trajectories could never leave.

Mutex lock ordering rule:

  • A program is deadlock-free if each thread acquires its mutexes in order.
  • It releases them in reverse order and given a total ordering for all mutexes.
  • The mutex should be achieved in order to ensure deadlock free scheme.

Blurred answer
Students have asked these similar questions
design a java program that implements thread priority based on setPriority() method using different level of priority for two threads .Both these threads donot run on preemptive platform in the same way.Thus,prioritize the threads by running each thread for few seconds.After this main thread stops this thread.Moreover, the program should display the no of times each thread made it through the loop is displayed
Write a c program that creates 5 threads and prints which thread is running and after the thread is closed, a new thread starts its execution. Each thread should run sequentially one by one. OUTPUT: thread-1 running thread-1 closed thread-2 running thread-2 closed
Write a Java program to implement two threads such that one thread prints all the numbers that are divisible by 3 or 5 but not both from 1 to 100 and other thread prints all the numbers that are divisible by both 3 and 5 from 1 to 100. (use Thread class ). Note : Each thread has a delay of 200 millisecond after printing one number
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education