Computer Science: An Overview (12th Edition)
12th Edition
ISBN: 9780133760064
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 3, Problem 37CRP
Program Plan Intro
Deadlock:
It is a condition in which two or more processes are blocked from progressing because each is waiting for a resource that is allocated to another.
Deadlock cannot occur unless all three of the following conditions are satisfied:
- There is competition for non-sharable resources.
- The resources are requested on a partial basis; that is, having received some resources, a process will return later to request more.
- Once a resource has been allocated, it cannot be forcibly retrieved.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Consider a computer system with three users: Alice, Bob, and Cindy. Alice owns file X, and Bob and Cindy can read it. Bob owns file Y, and Cindy can read and write the file Y, but Alice can only read it. Cindy owns file Z, but neither Alice nor Bob can read or write it. If a user owns a file, he/she can also execute the file.
Create the ACM (access control matrix) of the system
Show the ACL and CL of the ACM
Now Cindy allows Alice to read Z, Alice removes Bob's ability to read X, and Bob removes all the rights of Alice and Cindy to Y. Show the ACM after these changes.
Consider a computer system which has four identical units of a resource R. There are three processes each with a maximum claim of two units of resource R. Processes can request these resources in any way that is, two in one shot or one by one. The system always satisfies a request for a resource if enough resources are available. If the processes don't request any other kind of resource, show that the system never deadlocks?
Consider a system consisting of 5 processes, P = {P1, P2, P3, P4, P5} and 3 resources types, R = {R1, R2, R3}. The number of instances for each resource type are 2, 2 and 1 respectively. The state of the system at time, it is described as follow:
P1 requests an instance of R2
P2 requests an instance of R1
P3 requests an instance of R2 and holds an instance of R1 and an instance of R3
P4 requests an instance of R3
P5 holds all instances of R2
Assuming that all resources are non-sharable, construct a Resource Allocation Graph to depict the process state.
Chapter 3 Solutions
Computer Science: An Overview (12th Edition)
Ch. 3.1 - Identify examples of queues. In each case,...Ch. 3.1 - Which of the following activities require...Ch. 3.1 - Prob. 3QECh. 3.1 - Prob. 4QECh. 3.2 - Prob. 1QECh. 3.2 - What is the difference between application...Ch. 3.2 - Prob. 3QECh. 3.2 - Prob. 4QECh. 3.3 - Summarize the difference between a program and a...Ch. 3.3 - Summarize the steps performed by the CPU when an...
Ch. 3.3 - Prob. 3QECh. 3.3 - If each time slice in a multiprogramming system is...Ch. 3.3 - Prob. 5QECh. 3.4 - Prob. 1QECh. 3.4 - Suppose a two-lane road converges to one lane to...Ch. 3.4 - Prob. 3QECh. 3.4 - Prob. 4QECh. 3.5 - Prob. 1QECh. 3.5 - Prob. 2QECh. 3.5 - If a process in a multiprogramming system could...Ch. 3 - List four activities of a typical operating...Ch. 3 - Summarize the distinction between batch processing...Ch. 3 - Prob. 3CRPCh. 3 - Prob. 4CRPCh. 3 - What is a multitasking operating system?Ch. 3 - Prob. 6CRPCh. 3 - On the basis of a computer system with which you...Ch. 3 - a. What is the role of the user interface of an...Ch. 3 - What directory structure is described by the path...Ch. 3 - Define the term process as it is used in the...Ch. 3 - Prob. 11CRPCh. 3 - What is the difference between a process that is...Ch. 3 - What is the difference between virtual memory and...Ch. 3 - Suppose a computer contained 512MB (MiB) of main...Ch. 3 - What complications could arise in a...Ch. 3 - What is the distinction between application...Ch. 3 - Prob. 17CRPCh. 3 - Summarize the booting process.Ch. 3 - Why is the booting process necessary?Ch. 3 - If you have a PC, record the sequence activities...Ch. 3 - Suppose a multiprogramming operating system...Ch. 3 - Prob. 22CRPCh. 3 - Prob. 23CRPCh. 3 - Prob. 24CRPCh. 3 - Prob. 25CRPCh. 3 - Would greater throughput be achieved by a system...Ch. 3 - Prob. 27CRPCh. 3 - What information is contained in the state of a...Ch. 3 - Identify a situation in a multiprogramming system...Ch. 3 - List in chronological order the major events that...Ch. 3 - Prob. 31CRPCh. 3 - Prob. 32CRPCh. 3 - Explain an important use for the test-and-set...Ch. 3 - Prob. 34CRPCh. 3 - Prob. 35CRPCh. 3 - Prob. 36CRPCh. 3 - Prob. 37CRPCh. 3 - Each of two robot arms is programmed to lift...Ch. 3 - Prob. 39CRPCh. 3 - Prob. 40CRPCh. 3 - Prob. 41CRPCh. 3 - Prob. 42CRPCh. 3 - Prob. 43CRPCh. 3 - Prob. 44CRPCh. 3 - Prob. 45CRPCh. 3 - Prob. 46CRPCh. 3 - Prob. 47CRPCh. 3 - Prob. 48CRPCh. 3 - Prob. 49CRPCh. 3 - Prob. 50CRPCh. 3 - Prob. 51CRPCh. 3 - Prob. 52CRPCh. 3 - How is the window manager related to the operating...Ch. 3 - Prob. 54CRPCh. 3 - Prob. 55CRPCh. 3 - Suppose you are using a multiuser operating system...Ch. 3 - Prob. 2SICh. 3 - Prob. 3SICh. 3 - Prob. 4SICh. 3 - Prob. 5SI
Knowledge Booster
Similar questions
- A deadlock occurs when a group of processes is stalled because one process is holding a resource and waiting for another process to obtain it. Consider the situation when two trains are approaching each other on the same track and there is only one track: once they are in front of each other, neither train can proceed. In operating systems, a similar scenario happens when two or more processes possess certain resources while waiting on resources owned by other processes (s). In the picture below, Process 1 is holding Resource 1 and waiting for Process 2 to acquire Resource 2, while Process 2 is waiting for Resource 1. Give an example of a realistic deadlock avoidance approach and describe the basic strategy behind it.arrow_forwardDraw a resource allocation graph for the following processes and resources. There are four processes running (P1, P2, P3 and P4) and four resources each with single instance (R1, R2, R3 and R4). P1 is holding R4 and requesting R2. P2 is holding R3 and requesting R4. P3 is holding R2 and requesting R1. P4 is holing R1. Is it a deadlock situation?arrow_forwardAssume a primitive time-sharing operating system is running on a computer with 50,000 32-bit words of main memory, with the resident monitor consuming 10,000 of that. When control is to be assigned to an interactive user, the user’s program and data were loaded into the remaining 40,000 words of main memory. A program is always loaded to start at the location of the 10,000th word; this simplified both the monitor and memory management. Assume that there are four interactive users with the following memory requirements, in words: Job1: 10,000, Job2: 30,000, Job3: 1000, Job4: 5,000 Draw the main memory state diagram considering the following: (a) The monitor loads Job1 and transfers control to it. (b) The monitor decides to load Job2 and transfer control to it. (c) Next, the monitor decides to load Job3 and transfer control to it. (d) Next, the monitor decides to load Job1 and transfer control to it. (e) Next, the monitor decides to load Job4 and transfer control…arrow_forward
- Assume a primitive time-sharing operating system is running on a computer with 50,000 32-bit words of main memory, with the resident monitor consuming 10,000 of that. When control is to be assigned to an interactive user, the user’s program and data were loaded into the remaining 40,000 words of main memory. A program is always loaded to start at the location of the 10,000th word; this simplified both the monitor and memory management. Assume that there are four interactive users with the following memory requirements, in words: Job1: 10,000, Job2: 30,000, Job3: 1000, Job4: 5,000 Draw the main memory state diagram considering the following: (a) The monitor loads Job1 and transfers control to it. (b) The monitor decides to load Job2 and transfer control to it. (c) Next, the monitor decides to load Job3 and transfer control to it. (d) Next, the monitor decides to load Job1 and transfer control to it. (e) Next, the monitor decides to load Job4 and transfer control to it.…arrow_forwardConsider a computer system with three users: Alice, Bob, and Cyndy. Alice owns the file alicerc, and Bob and Cyndy can read it. Cyndy can read and write the file bobrc, which Bob owns, but Alice can only read it. Only Cyndy can read and write the file cyndyrc, which she owns. Assume that the owner of each of these files can execute it. Create the corresponding access control matrix. Cyndy gives Alice permission to read cyndyrc, and Alice removes Bob's ability to read alicerc. Show the new access control matrixarrow_forwardInterrupts are system wide events that stops the execution of a currently running process. Examples of interrupts include (but are not limited to) mouse clicks, process termination, key presses, etc. Some interrupts are considered as more important to be handled first then the others. For example, a hardware interrupt such as hard drive read operation has lesser priority than a memory read. In this way, the most appropriate data structure for representing of such events is the priority queue. Demonstrate by writing an algorithm or a flowchart how to insert the following interrupts in a heap so the highest priority element should move out first. Interrupts Priorities INT 0 100 INT 10 51 INT 11 52 INT 21 54arrow_forward
- Interrupts are system wide events that stop the execution of a currently running process. Examples of interrupts include (but are not limited to) mouse clicks, process termination, key presses, etc. Some interrupts are considered as more important to be handled first then the others. For example, a hardware interrupt such as hard drive read operation has lesser priority than a memory read. In this way, the most appropriate data structure for representing of such events is the priority queue. Demonstrate by writing an algorithm or a flowchart how to insert the following interrupts in a heap so the highest priority element should move out first. Interrupts Priorities INT 0 100 INT 10 51 INT 11 52 INT 21 54arrow_forwardAssume a primitive time-sharing operating system is running on a computer with 50,000 32-bit words of main memory, with the resident monitor consuming 10,000 of that. When control is to be assigned to an interactive user, the user’s program and data were loaded into the remaining 40,000 words of main memory. A program is always loaded to start at the location of the 10,000th word; this simplified both the monitor and memory management. Assume that there are four interactive users with the following memory requirements, in words: Job1: 10,000, Job2: 30,000, Job3: 1000, Job4: 5,000 Draw the main memory state diagram considering the following: (a) The monitor loads Job1 and transfers control to it. (b) The monitor decides to load Job2 and transfer control to it. (c) Next, the monitor decides to load Job3 and transfer control to it. (d) Next, the monitor decides to load Job1 and transfer control to it. (e) Next, the monitor decides to load Job4 and transfer control to it.…arrow_forwardWrite a C program to simulate producer-consumer problem using semaphores. TASK: DESCRIPTION Producer-consumer problem, is a common paradigm for cooperating processes. A producer process produces information that is consumed by a consumer process. One solution to the producer-consumer problem uses shared memory. To allow producer and consumer processes to run concurrently, there must be available a buffer of items that can be filled by the producer and emptied by the consumer. This buffer will reside in a region of memory that is shared by the producer and consumer processes. A producer can produce one item while the consumer is consuming another item. The producer and consumer must be synchronized, so that the consumer does not try to consume an item that has not yet been produced.arrow_forward
- Consider for a minute that you are a software engineer who has invented a system that analyzes photos of a range of recyclable items (such as a can, bottle or a crate). It is accessible through a Web Application Programming Interface (Web API), which allows users to transfer photos over the internet. The system provides, for each photograph, the total number of occurrences of each distinct item shown in the image. Consider if it would be reasonable to give this service for free. Justify your answerarrow_forwardCreate a state machine diagram of operating system processes according to the following description: In general, processes are created and are then waiting to be scheduled if they are able to run. They might be blocking on some external condition (IO, semaphores, other synchronization,...) and might be therefore not able to run. If they are scheduled they are running. At any point they can become blocked due to some external condition. Processes can also be swapped out to the page file / swapping space, which can happen when they are waiting for some external condition or when they are waiting to be scheduled. We are assuming that processes can be terminated at any time.arrow_forwardConsider a memory system which only allows you to do sequential search. For example a read/write tapedrive. If you want to look for a file you have to search sequentially looking at the first file, then the secondfile and so on until you find the file. A reasonable strategy would be place the most recently retrieved fileat the front (imagine that the tape system can magically do this). This way the files that are accessed moreoften will be ”at the front” and require less searching time in the long run. Consider the case with only 3files A, B, and C.1. Let Xn denote the sequence of the memory system after the nth search. For example, if the files wereordered A and then B followed by C, then X0 = ABC. Enumerate the state space.2. If X0 = ABC, list all possible states of X1.3. If pA, pB, and pC = 1 − pA − pB are the probabilities with which files A, B, and C are accessed,respectively, determine the one-step state transition matrix.4. If pA = 0.6, pB = 0.10, pC = 0.3, determine the steady…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education