Computer Science: An Overview (13th Edition) (What's New in Computer Science)
13th Edition
ISBN: 9780134875460
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
Exercise 2:
Draw a State machine Diagram for a Telephone line (a process in a smartphone OS) with the following behavior:
When the telephone app is not active, the telephone line is idle. When the app is activated, the line gives a dial tone and can accept the dialing of digits.
If after getting the dial tone, the user doesn't dial a number within a time interval of 10 seconds, then a time-out occurs, and the line gets idle again. A button on the app can re- activate the line.
After dialing a number, if the number is invalid then a recorded message is played at the end of which the line becomes idle.
Upon entry of a valid number, the phone app tries to connect a call & routes it to the proper destination.
If the called person answers the phone, the conversation can occur, and the line is in an on- call state. When the called person hangs up, the phone app disconnects and the line goes to the idle state.
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.…
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.…
Chapter 3 Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
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
- Write 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_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_forwardWhen a user programme and an operating system collaborate to construct a virtual machine, they both produce a highly distinct instance of the machine's representation. Specify the several ways in which they are not the same.arrow_forward
- How may the principle of mutual exclusion (ME), from all viewpoints (i.e., within the scope of your studies), be seen as a necessary framework for the efficient operation of an operating system, according to your research?arrow_forwardConsider a computer system with multiple resources and concurrent processes competing for them. Deadlock is a situation that might arise in such a system. What conditions must hold simultaneously for a deadlock to occur in this system? A. Mutual Exclusion, Hold and Wait, No Preemption, Circular Wait B. Mutual Exclusion, First Come First Serve, Circular Wait, Limited Resources C. Mutual Exclusion, Hold and Wait, Priority Inheritance, Circular Wait D. Hold and Wait, No Preemption, Circular Wait, Resource Optimizationarrow_forwardA system is made up of three processes that share five resources of the same kind that are all used in the same manner. Each process may be completed with a maximum of two resources. Are there any deadlocks in the system that can be demonstrated?arrow_forward
- Running the procedure on a virtual machine may be the most time- and resource-efficient choice. What best describes the present scenario in your own words, regardless of your opinion?arrow_forwardAnswer the given question with a proper explanation and step-by-step solution. Answer the questions about c languagearrow_forwardIn the picture attached, the Say that the system is running 3 jobs, A, B, and C, and that all of them are CPU-intensive (i.e., each one does one infinitely long CPU burst). The system begins with A on the CPU at the beginning its time quantum while B and C are in the Ready Queue, in that order. a) Show the execution pattern (as a string of A’s, B’s, C’, and o’s) assuming that the scheduler time quantum is equal to 4 ms. Show the execution for more than 20ms (but less than 30ms). b) In the long run (i.e, assuming jobs don’t ever terminate), what percentage of the CPU time is wasted doing context-switching/scheduling? The answers I came up with is as follows: a) AAAAoBBBoCCCoAAAoBBBoCCCoAAA, because for the first 4ms, A gets to execute it's full time quantum, however, when context-switching to the next job, the switch is included in the time quantum. b) 2.77% spent context switching, divide the number of o's by the total amount of runtime.arrow_forward
- Assume we are given the task to build a system that can distinguish junk e-mail. What is in a junk e-mail that lets us know that it is junk? How can the computer detect junk through a syntactic analysis? What would you like the computer to do if it detects a junk e-mail-delete it automatically, move it to a different file, or just highlight it on the screen?arrow_forwardWhat describes how the principle of least privlege applies to the use of computers? A, It guarantees that no information inifially held in an object can be used outside its execution environment B, A process is allowed access only to the resources il needs to complete Its task and limit damage from a faulty process C, It is a process that can access an object in a domain only if that domain has a key that malches one of the locks of the object D It is the use of access controls to monitor and limit access to applications, programs, and websites during specific times of use.arrow_forwardAn operating system has 3 user processes running in a set, each requiring 2 units of resource R. The minimum number of units of R such that no deadlocks will ever arise is: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