Suppose a system in which there are two types of processes, type A processes and type...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Suppose a system in which there are two types of processes, type A processes and type B processes. All processes of type A execute the same code, and all processes of type B execute the same code. The code for each process type is shown below. Process A wait(Y) wait(Y) signal(X) signal(Y) Process B wait(X) signal(Y) Here, X and Y are general semaphores. X is initialized to 2, and Y is initialized to 0. Suppose three processes of type A and two processes of type B are brought into execution simultaneously. Answer the following two questions: a) Is it possible for processes to finish in the order of BBABA? If so, show an execution sequence that results in this order. If not, explain why. (show the semaphore values in each process run) b) Is it possible for processes to finish in the order BBAAB. If so, show an execution sequence that results in this order. If not, explain why. (show the semaphore values in each process run) Suppose a system in which there are two types of processes, type A processes and type B processes. All processes of type A execute the same code, and all processes of type B execute the same code. The code for each process type is shown below. Process A wait(Y) wait(Y) signal(X) signal(Y) Process B wait(X) signal(Y) Here, X and Y are general semaphores. X is initialized to 2, and Y is initialized to 0. Suppose three processes of type A and two processes of type B are brought into execution simultaneously. Answer the following two questions: a) Is it possible for processes to finish in the order of BBABA? If so, show an execution sequence that results in this order. If not, explain why. (show the semaphore values in each process run) b) Is it possible for processes to finish in the order BBAAB. If so, show an execution sequence that results in this order. If not, explain why. (show the semaphore values in each process run)
Expert Answer:
Answer rating: 100% (QA)
Lets analyze the given code and semaphore values to determine if the specified execution orders BBAB... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
In Chapter 22, we briefly discussed the signaling role of educationi.e. the fact that part of the reason many people get more education is not to learn more but rather to signal high productivity to...
-
The production of paper involves a pulping step to break down wood chips into cellulose and lignin. In the Kraft process, an aqueous, pulping-feed solution, known as white liquor, is used that...
-
1. In American roulette, a bettor may place a $1 bet on any one of the 38 numbers on the roulette wheel. They win $35 (plus the return of their bet) if the ball lands on their number; otherwise, they...
-
Three forces act on the bracket. Determine the magnitude and direction of F 1 so that the resultant force is directed along the positive x axis and has a magnitude of 800 N. F3 = 180 N 13 12 y AF=...
-
Explain why governance reporting regulations and principles were introduced.
-
Westinghouse and General Electric are competing on the newest version of clothes washer and dryer combinations. Two pricing strategies exist: price high or price low. The profit from each of the four...
-
1. Letter of the word INDIANOIL are arranged in all possible ways. The number of permutations in which A, I, O occur only at odd places, is : (a) 720 2. (b) 360 (c) 240 (d) 120 How many different...
-
You bought a used electric car 3 years ago for $30,000. For the past 3 years, it had a uniform annual depreciation of $1000/year only since the value remained stable. From the current year, the car...
-
Superior Micro Products uses the weighted-average method in its process costing system. Data for the Assembly Department for May appear below: Work in process, May 1 Cost added during May Equivalent...
-
What organizational design would be most appropriate for a sporting goods manufacturer? For a sport marketing agency? For an organization bidding for the right to host a major international event?...
-
You are planning security protocols for your companys new server room. Whats the sim- plest way to help physically keep potential attackers away from your servers?
-
Definition of Open strategy Definition of Close strategy Comparison between open strategy and close strategy Examples of companies using Open strategy Implementation of open strategy Evaluation...
-
Unix Limited's equity beta is 1.2. The market risk premium is 7 percent and the risk-free rate is 10 percent. Unix has a debt equity ratio of 2:3. Its pre-tax cost of debt is 14 percent. If the tax...
-
Discuss in detail about IFRS 7 & IFRS 9-Financial Instruments and IFRS 13 Fair Value I. Explain in detail about financial instruments and fair value with the help of examples. II. Discuss Objectives,...
-
The following information is available for Partin Company: Sales $598,000 Sales Returns and Allowances 20,000 Cost of Goods Sold 398,000 Selling Expense 69,000 Administrative Expense 25,000 Interest...
-
Ken (age 31) and Amy (age 28) Booth have brought you the following information regarding their income, expenses, and withholding for the year. They are unsure which of these items must be used to...
-
Russell (age 50) and Linda (age 45) Long have brought you the following information regarding their income and expenses for the current year. Russell owns and operates a landscaping business called...
-
Tom has a successful business with $100,000 of income in 2012. He purchases one new asset in 2012, a new machine which is 7-year MACRS property and costs $25,000. If you are Tom's tax advisor, how...
-
A library shelving system has a first cost of \(\$ 20,000\) and a useful life of 10 years. The annual maintenance is expected to be \(\$ 2,500\). The annual benefits to the library staff are expected...
-
Identify one benefit and one disbenefit that would be realized by the public for the following projects: a. A monument memorializing a particularly unfortunate event b. A public library c. A Web site...
-
True or False: OMB's Circular No. A-94, Revised is the definitive document for benefit-cost analysis.
Study smarter with the SolutionInn App