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% (4 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...
-
Gonzo Co. owns a building in Georgia. The buildings historical cost is $970,000, and $440,000 of accumulated depreciation has been recorded to date. During 20X1, Gonzo incurred the following expenses...
-
A single row impulse turbine develops \(130 \mathrm{~kW}\) at a blade speed of \(180 \mathrm{~m} / \mathrm{s}\) using \(2 \mathrm{~kg} / \mathrm{s}\) of steam. The steam leaves the nozzle at \(400...
-
A disk with radius R has uniform surface charge density (a) By regarding the disk as a series of thin concentric rings, calculate the electric potential V at a point on the disk's axis a distance x...
-
Why are organization-wide strategic planning and planning for performance improvement interrelated activities? Reference :...
-
1. Snyders of Hanover, which sells about 80 million bags of pretzels, snack chips, and organic snack items each year, had its financial department use spreadsheets and manual processes for much of...
-
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...
-
Lap Dogs Inc. is planning for next year and has the following summarized results so far ($000): Income Statement EBIT ..........236 Interest ...........? EBT ............? Income tax .........? EAT...
-
During the COVID pandemic, what lessons did you learn related to your organizations capability/inability to respond quickly, efficiently, and effectively to the influx of critically ill patients. As...
-
An investor is considering two alternative investments. The first alternative is to invest in an instrument that matures in two years. The second alternative is to invest in an instrument that...
-
In todays healthcare environment, DNPs are faced with increasing challenges in addressing ever-changing complexity and persistent uncertainty. Using assumption-based planning, identify three key...
-
The following appeared in the Federal Reserve Bank of San Francisco's Economic Letter, January 25, 2002: Financial institutions are in the business of risk management and reallocation, and they have...
-
The following quotation is from the October 29 , 1990 issue of Corporate Financing Week: Chase Manhattan Bank is preparing its first asset-backed debt issue, becoming the last major consumer bank to...
-
Two parallel plate capacitors are identical, except that one of them is empty and the other contains a material with a dielectric constant of 4.2 in the space between the plates. The empty capacitor...
-
You have just begun your summer internship at Omni Instruments. The company supplies sterilized surgical instruments for physicians. To expand sales, Omni is considering paying a commission to its...
-
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...
-
Golden Gate Mining Co. (GGMC) currently has a gold mine operating in Canada and is looking to purchase another gold mine in Peru, operating as Inca Gold Inc. (ICI). You currently work for the CFO at...
-
Cokolo Inc. has entered into the following two derivatives contracts: Purchased put options on 1,000 Trenton Co. shares that have an exercise price of $52 per share and expire in 60 days Negotiated a...
-
As a financial manager (consultant), undertake an investigation on your allocated company to evaluate its strategic financial position. Prepare a business report for the board of directors of the...
Study smarter with the SolutionInn App