The mechanism used in Figure 13.13 to make scheduler code reentrant employs a single OS-provided lock for
Question:
The mechanism used in Figure 13.13 to make scheduler code reentrant employs a single OS-provided lock for all the scheduling data structures of the application. Among other things, this mechanism prevents threads on separate processors from performing P or V operations on unrelated semaphores, even when none of the operations needs to block. Can you devise another synchronization mechanism for scheduler-related operations that admits a higher degree of concurrency but that is still correct?
Figure 13.13
Transcribed Image Text:
shared scheduler.Jock : low_levelJock shared ready Jist : queue of thread per-process private current.thread : thread procedure reschedule() -- assume that scheduler_lock is already held and that timer signals are disabled t: thread loop t:= dequeuelready_list) if t+ null exit -- else wait for a thread to become runnable release lock(scheduler lock) -- window allows another thread to access ready.list (no point in reenabling -- signals; we're already trying to switch to a different thread) acquire Jocklscheduler lock) transfer(t) -- caller must release scheduler.lock and reenable timer signals after we return procedure yield() disable signals() acquire lock(scheduler lock) enqueuelready.list, current.thread) reschedule() release locklscheduler.lock) reenable_signals() procedure sleep.on(ref Q: queue of thread) -- assume that caller has already disabled timer signals and acquired -- scheduler lock, and will reverse these actions when we return enqueue(Q, current thread) reschedule()
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 100% (7 reviews)
There are many subtle variations on scheduler implemen...View the full answer
Answered By
HILLARY KIYAYI
I am a multi-skilled, reliable & talented Market analysis & Research Writer with a proven ability to produce Scholarly Papers, Reports, Research and Article Writing and much more. My ultimate quality is my English writing/verbal skill. That skill has proven to be the most valuable asset for project writing, Academic & Research writing, Proofreading, HR Management Writing, business, sales, and a variety of other opportunities.
4.80+
24+ Reviews
60+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
The test-and-set spin lock is the simplest synchronization mechanism possible on most commercial shared-memory machines. This spin lock relies on the exchange primitive to atomically load the old...
-
In Figure block A (mass 10 kg) is in equilibrium, but it would slip if block B (mass 5.0 kg) were any heavier. For angle = 30?, what is the coefficient of static friction between block A and the...
-
When scheduling classrooms for student use, Cher Ware needs to know all the software packages in a given room. She would like to enter the CAMPUS LOCATION and the ROOM on an inquiry display. The...
-
Discuss the factors that impact on recruitment and selection in organisations. 1.regulatory and legislative factors 2.organisational factors 3.labour market factors.
-
To control an isentropic steam turbine, a throttle valve is placed in the steam line leading to the turbine inlet. Steam at 6 MPa and 600°C is supplied to the throttle inlet, and the turbine...
-
Problem 7-18 Activity-Based Costing and Bidding on Jobs [LO7-2, LO7-3, LO7-4] Mercer Asbestos Removal Company removes potentially toxic asbestos insulation and related products from buildings. There...
-
From the following information extracted from the books of Modern Hotel, you are required to prepare the Income Statement for the year ended 31st December 2005 in accordance with the Uniform System...
-
In his 1865 science fiction novel From the Earth to the Moon, Jules Verne described how three astronauts are shot to the Moon by means of a huge gun. According to Verne, the aluminum capsule...
-
The XYZ Company is closely held and, therefore, cannot generate reliable inputs with which to use the CAPM method for estimating a companys cost of internal equity. Hoovers bonds yield 11.52%, and...
-
Irene Pypypiv has been working as a dishwasher at a bakery, while attending pastry arts school. As a graduation present, Irenes parents give her a graduation present of $40,000, which matches the...
-
Show how to implement a lock-based concurrent set as a singly linked sorted list. Your implementation should support insert, find, and remove operations, and should permit operations on separate...
-
The code of Example 13.35 could fairly be accused of displaying poor abstraction. If we make desired condition a delegate (a subroutine or object closure), can we pass it as an extra parameter, and...
-
A compound with molecular formula C 8 H 8 O 3 exhibits the following IR, 1 H NMR and 13 C NMR spectra. Deduce the structure of this compound.
-
An employer has calculated the following amounts for an employee during the last week of June 2021. Gross Wages $1,800.00 Income Taxes $414.00 Canada Pension Plan $94.00 Employment Insurance $28.00...
-
Section Two: CASE ANALYSIS (Marks: 5) Please read the following case and answer the two questions given at the end of the case. Zara's Competitive Advantage Fashion houses such as Armani and Gucci...
-
The activity of carbon in liquid iron-carbon alloys is determined by equilibration of CO/CO2 gas mixtures with the melt. Experimentally at PT = 1 atm, and 1560C (1833 K) the equilibrated gas...
-
Apply knowledge of concepts and theories covered in the course to leader - the leader can either be themselves if they lead a team, someone real and personally known to them (such as a boss or leader...
-
A resistor in a dc circuit R = 1.2 2. The power dissipated P is a second-degree function of the voltage V. Graph P versus V from V = 0.0 V to V = 3.0 V.
-
Let Find the following: (a) The y-coordinate of the point on the graph of y = f (x) where x = 16 (b) f (2) (c) f (13) 8x + 1/x if x <0 f(x) = { 4 if 0 2
-
Define deferred revenue. Why is it a liability?
-
One of the useful parameters in a LAN is the number of bits that can fit in one meter of the medium (n b/m ). Find the value of n b/m if the data rate is 100 Mbps and the medium propagation speed is...
-
Another useful parameter in a LAN is the bit length of the medium (L b ), which defines the number of bits that the medium can hold at any time. Find the bit length of a LAN if the data rate is 100...
-
Based on Figure 12.15, how do we interpret success in an Aloha network? Figure 12.15 Station has a frame to send K= 0 Legend K: Number of attempts Tg: Backoff time IFS: Interframe Space RTS: Request...
-
Sociology
-
I am unsure how to answer question e as there are two variable changes. In each of the following, you are given two options with selected parameters. In each case, assume the risk-free rate is 6% and...
-
On January 1, Interworks paid a contractor to construct a new cell tower at a cost of $850,000. The tower had an estimated useful life of ten years and a salvage value of $100,000. Interworks...
Study smarter with the SolutionInn App