Consider the following resource-allocation policy. Requests for and releases of resources are allowed at any time. If a request for resources cannot be satisfied because the resources are not available, then we check any processes that are blocked waiting for resources. If a blocked process has the desired resources, then these resources are taken away from it and are given to the requesting process. The
a. Can deadlock occur? If you answer “yes,” give an example. If you answer “no,” specify which
necessary condition cannot occur.
b. Can indefinite blocking occur? Explain your answer.
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images
- Consider a file currently consisting of 90 blocks. Assume that the file control block (and the index block, in the case of indexed allocation) is already in memory. Calculate how many disk I/O operations are required for contiguous, linked, and indexed (single-level) allocation strategies, if, for one block, the following conditions hold. In the contiguous-allocation case, assume that there is no room to grow at the beginning but there is room to grow at the end. Also assume that the block information to be added is stored in memory.) i) The block is added at the beginning. ii) The block is added in the middle. iii) The block is added at the end. iv) The block is removed from the beginning. v) The block is removed from the middle. vi) The block is removed from the endarrow_forwardPlease answer the following questions related to Detection Algorithm. Given the below information, fill out Matrixes Request and Work. • Five processes P, through Pa; three resource types A (7 instances), B (2 instances), and C (6 instances) Snapshot at time To: Allocation Request Available Request satisfy safety criteria? Why??arrow_forwardSuppose that an operating system supports two kinds of sequential processes: high-priority interactive processes, and low-priority non-interactive processes. The behavior of the high-priority processes is to alternate between periods of computation of duration Tc and periods of blocking (waiting for input) of duration Tb. The behavior of the low-priority processes is to compute constantly, with no blocking. The operating system’s scheduling policy is round-robin with a quantum q, where Tc < q. Scheduling decisions are made only when a quantum expires, or when the running process blocks. The scheduler selects a low-priority process to run only if no high-priority processes are ready. Suppose there is one high-priority process and one low-priority process in the system, and that both processes will run for a long time. For what fraction of the time does the low-priority process run?arrow_forward
- Consider a system with five processes and three resource type. Resource type X has 7 instances, resource type Y has 10 instances and resource type Z has 5 instances. Suppose that at time 0, the following snapshot of the system has been taken. What is the content of the matrix Need?arrow_forwardSuppose that the following processes arrive for execution at the times indicated. Each process will run for the amount of time listed. In answering the questions, use preemptive scheduling, and base all decisions on the information you have at the time the decision must be made. Process P1 P2 P3 P4 P5 Arrival Time 0 2 4 6 8 Burst Time 12 4 8 2 6 What is the average waiting time for these processes with the Shortest-Job-First scheduling algorithm?arrow_forwardConsider a file system that uses a modifed contiguous-allocation scheme with support for extents. A file is a collection of extents, with each ex- tent corresponding to a contiguous set of blocks. A key issue in such systems is the degree of variability in the size of the extents. What are the advantages and disadvantages of the following schemes: a. All extents are of the same size, and the size is predetermined. b. Extents can be of any size and are allocated dynamically. c. Extents can be of a few fixed sizes, and these sizes are predeter- mined.arrow_forward
- Suppose processes P1-P4 with the given priorities and resource allocations. 1 is the highest priority and 4 is the lowest priority. Let us also assume that the "no preemption" condition is now relaxed by allowing preemption of resources by processes of higher priority. For example, P3 may preempt P2 or P4 if it needs a resource which they are holding. If P3 preempts one of these processes, say P4, then P4 release all the resources it is holding. Show one sequence of events in which resources are allocated to the 4 processes and the resulting preemptions, if any, until all new requests are serviced. Current allocations are shown below. Each resource has 4 instances. Try to minimize the preemptions as they are expensive. Process ID Process Priority Current allocation New request R1 R2 R1 R2 P1 1 2 1 2 1 P2 3 0 1 1 0 P3 2 1 1 0 1 P4 4 1 1 2 1arrow_forwardb.Start from the resource allocation state in Q 13. If a request from a process P3 arrives for (1, 2, 3), can the request be immediately granted ? Why or why not ? c.Start from the resource allocation state in Q 13. Suppose that P4 asks for 2 instances of resource B. Can the system grant this if it wants to avoid deadlock ? Explain.arrow_forwardIn the following resource allocation graph, are the processes deadlocked? If “yes” explain why and state which processes are involved in deadlock. If “not” explain why.arrow_forward
- Subject: Operating Systemsarrow_forwardConsider a file system that uses a modifed contiguous-allocation scheme with support for extents. A file is a collection of extents, with each ex- tent corresponding to a contiguous set of blocks. A key issue in such systems is the degree of variability in the size of the extents. What are the advantages and disadvantages of the following schemes: a. All extents are of the same size, and the size is predetermined. b. Extents can be of any size and are allocated dynamically. c. Extents can be of a few fixed sizes, and these sizes are predeter- mined.arrow_forwardMultiple question A set { P0, P1, Pn} of waiting processes must exist such that P0 is waiting for a resource held by P1, P1 is waiting for a resource held by P2, …, Pn-1 is waiting for a resource held by Pn, and Pn is waiting for a resource held by P0. This condition for deadlock is referred to as a. Hold and Wait b. Circular Wait c. Mutual Exclusion d. No Preemptionarrow_forward
- 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