Anoperating system manages N (H)%.N) in order to execute properly. Device N is universal and can.be...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Anoperating system manages N (H)%.N) in order to execute properly. Device N is universal and can.be allocated to y process n place of any other device. Thus, each process has an additional device to merent processes and N+1 storage devices (resources) vaicustypas. Because of the different needs of the processes, devices are numbered 0 t iS available, and so greater overlap can be achieved. The following four hene ard :10 errors in the code, Evaluate each algorithm and specify the most appropriate synihronizalion algorithms for process i, have been proposed for this situation. Assume ene of tric lollowing statements. An answer may be given more than once. Also state the casible, but less than maximum overlap among these solutions. I easible, with maximum overlap among these solutions. Dues not synchronize properly. i.e., Potential loss of integrity. May lead to indefinite wait by a process. May lead to deadlock among two or more processes. eason r choosing each answer. . Algorithms use the following variables and semaphores: Initial value Use Name Flag Device[i] 1, for 0<=j<=N M4utex Indicates which process has device N. binary semaphore array for N+1 devices. binary semaphore to protect Flag. -1 +1 :#1: P (sevice (i]); P (0vice ( (i+1) % N]); 1/0 Operation; v (pevice (i]); v (bevice ( (i+1) % N]); Algorithm # 2: P (Device [i]); P (Device (i+1]); I/0 Operation; V (Device[i]): V (Device[i+1]); ....... #3: f (D vice (i]) : 4l (Flag >= 0) P (Device( (i+1) % N]); else ( Flag i; P (Device (N]): 1: 1/0 Operation; V (Device (i]); if (Flag ! i) v (Device ( (i+1) N]); else ( Flag -1; V (Device (N]): Algorithm # 4: P (Device(i1l: "P (Mutex); if (Flag >= 0) ( V (Mutex) ; P (Device( (i+1) % N]); else ( Flag i; v (Mutex); I/0 Operation; V (Device [i]): P (Mutex) ; if (Flag ! i) V (Device ( (i+1) * N); else Flag = -1; V (Mutex); Anoperating system manages N (H)%.N) in order to execute properly. Device N is universal and can.be allocated to y process n place of any other device. Thus, each process has an additional device to merent processes and N+1 storage devices (resources) vaicustypas. Because of the different needs of the processes, devices are numbered 0 t iS available, and so greater overlap can be achieved. The following four hene ard :10 errors in the code, Evaluate each algorithm and specify the most appropriate synihronizalion algorithms for process i, have been proposed for this situation. Assume ene of tric lollowing statements. An answer may be given more than once. Also state the casible, but less than maximum overlap among these solutions. I easible, with maximum overlap among these solutions. Dues not synchronize properly. i.e., Potential loss of integrity. May lead to indefinite wait by a process. May lead to deadlock among two or more processes. eason r choosing each answer. . Algorithms use the following variables and semaphores: Initial value Use Name Flag Device[i] 1, for 0<=j<=N M4utex Indicates which process has device N. binary semaphore array for N+1 devices. binary semaphore to protect Flag. -1 +1 :#1: P (sevice (i]); P (0vice ( (i+1) % N]); 1/0 Operation; v (pevice (i]); v (bevice ( (i+1) % N]); Algorithm # 2: P (Device [i]); P (Device (i+1]); I/0 Operation; V (Device[i]): V (Device[i+1]); ....... #3: f (D vice (i]) : 4l (Flag >= 0) P (Device( (i+1) % N]); else ( Flag i; P (Device (N]): 1: 1/0 Operation; V (Device (i]); if (Flag ! i) v (Device ( (i+1) N]); else ( Flag -1; V (Device (N]): Algorithm # 4: P (Device(i1l: "P (Mutex); if (Flag >= 0) ( V (Mutex) ; P (Device( (i+1) % N]); else ( Flag i; v (Mutex); I/0 Operation; V (Device [i]): P (Mutex) ; if (Flag ! i) V (Device ( (i+1) * N); else Flag = -1; V (Mutex);
Expert Answer:
Answer rating: 100% (QA)
the solution of this problem is given below the reason as asked of each algorithm is given Algorithm 1 5 May Lead to deadlock among two or more proces... View the full answer
Related Book For
Digital Signal Processing
ISBN: ?978-0133737622
3rd Edition
Authors: Jonh G. Proakis, Dimitris G.Manolakis
Posted Date:
Students also viewed these operating system questions
-
The discrete-time system y(n) = ny(n - 1) + x(n) n 0 is at rest [i.e., y(-1) = 0]. Check if the system is linear time invariant and BIBO stable.
-
Each day, Adama Corporation processes 1 ton of a secret raw material into two resulting products, AB1 and XY1. When it processes 1 ton of the raw material, the company incurs joint processing costs...
-
Each day, Zapp Corporation processes 1 ton of a secret raw material into two resulting products, AB1 and XY1. When it processes 1 ton of the raw material the company incurs joint processing costs of...
-
Suppose a snack company introduces a new product called SumSeeds-sunflower seeds with energy boosters like caffeine, taurine, lysine, and ginseng. How would you expect this product's IMC program to...
-
Create a base class called Vehicle that has the manufacturer's name (type String), number of cylinders in the engine (type int), and owner (type Person given in Listing 8.1Truck that is derived from...
-
Records over 10 years indicate that 5% of Acer televisions will have some defective components. If the latest models have the same number of defects, what is the probability that 6 or more of 100...
-
Quilts R Us (QRU) is considering investing in a new patterning attachment with the cash flow profile shown in the table below. QRU's MARR is 13.5 percent/year. a. What is the internal rate of return...
-
E-mail messages sent over the Internet are broken up into electronic packets that may take a variety of different paths to reach their destination where the original message is reassembled. Suppose...
-
3 Hadley has of a box of white envelopes and of a box of gray envelopes. When full, each box of envelopes has the same number of envelopes. Hadley said she has of a box when she puts the white...
-
Lydia Hartley, manager of UltraProducts New Zealand Division, is trying to set the production schedule for the last quarter of the year. The New Zealand Division had planned to sell 100,000 units...
-
1. Alan owes Brian HK$5,000, which is due on 31 March. On 15 March, he sought Brians consent to accept a lesser sum of US$600 on 24 March (i.e., one week in advance of the due date) to discharge the...
-
Recommend to Brian Horlock (CEO) and other line managers on the various approaches that can be employed in order to manage diversity within their organization. Provide relevant examples
-
Discuss roadblocks and how they may be used to enhance the share of voice (SOV).
-
Why existing Systems and Structures Should be Changed to Accommodate Employees
-
Distinguish policies on external competitiveness from policies on internal alignment. Why is external competitiveness so important? Which competitive pay policy would you recommend to an employer?...
-
What are the five characteristics described by McClelland, personal capability, focus on results, and leading change are trainable traits?
-
The United States saw waves of immigration and several changes in immigration law from the mid-1860s to the late 20th century. Discuss the impact immigration, immigration laws, and the backlash to...
-
The percentage of completion and completed contract methods are described in the FASB ASC. Search the codification to find the paragraphs covering these topics, cite them, and copy the results.
-
Consider the causal system y(n) = y(n 1) 1/8y(n 2) + x(n) + 1/3x(n 1) (a) Determine its system function. (b) Determine the type 1 state-space model. (c) Determine the state transition matrix {n}...
-
Determine and sketch the magnitude and phase response of the systems shown in figure. (a) through (c). xin) wn) (a) xin) (b) tn) xn) (c)
-
Determine the parameters and sketch the lattice-ladder filter structure for the system with system function + 0.15;-? 0.72; 2 1 - 0.82- H(2) = 1 + 0.1:-
-
Make a list of six aims that a manager of a high street department store might have. Identify some conflicts that might arise between these aims.
-
If a cinema could sell all its seats to adults in the evenings at the end of the week, but only a few on Mondays and Tuesdays, what price discrimination policy would you recommend to the cinema in...
-
How will a businesss pricing strategy differ at each stage of its products life cycle? First assume that the business has a monopoly position at the launch stage; then assume that it faces a high...
Study smarter with the SolutionInn App