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...
-
Sylvia Plath was not as _______ a poet as was her husband Ted Hughes, having produced just two volumes of poetry in her short lifespan. a. Dejected b. Celebrated c. Satiric d. Jubilant e. Prolific g....
-
Reproduce Figure 2.4 using geom_histogram(aes(y = ..density..)) as shown below for Example 2.5. ggplot_build() extracts the computed values for the histogram. Use the extracted vales to confirm that...
-
Butler Manufacturing Corporation raised capital for a plant expansion by borrowing from a bank and making a stock offering. Butler engaged Weaver, CPA, to audit its December 2014 financial...
-
Compute the selling price of 7.00%, 15-year bonds with a par value of $480,000 and semiannual interest payments. The annual market rate for these bonds is 6.00%. Use present value Table B.1 and Table...
-
Ramona Company incurred the following costs. 1. Sales tax on factory machinery purchased $ 5,000 2. Painting of and lettering on truck immediately upon purchase 700 3. Installation and testing 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...
-
Figure illustrates the BOM for product A. The MPS start row in the master production schedule for product A calls for 50 units in week 2.65 units in weeks 5, and 80 units in week 8. Item C is...
-
Even though the initial box office earnings for "The Wizard of Oz" were disappointing, the film eventually became a financial success due to: Renewed interest in witchcraft CBS' broadcast television...
-
If the rate of reaction in the sun were to increase, the surface temperature would increase. If the temperature of the surface of the sun were to increase by 300 K, estimate the percentage increase...
-
Speedy Couriers Question in the End Week 1 Homework Task 1 Use the Framework definition requirements to explain your treatment of Accounts Receivable in the Balance Sheet Your answer should discuss...
-
Which of following sentences demonstrates the concept of clarity and precision? a. The unexpected retirement of five tax preparers created a heavier workload for the remaining staff, causing them to...
-
Complete the loan inputs tables, and then the loan amortization schedule for a car loan of $34,000.00 that will be repaid over 72 months, and an interest rate of 8.25%
-
The financial statements at the end of Atlas Realty's first month of operations follow: Instructions By analyzing the interrelationships among the four financial statements, determine the proper...
-
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...
-
Show the adjusting entries that you would make given the additional data below. In addition to the formal journal entry, please also indicate the type of adjusting entry that is being made, ...
-
I need one to three paragraphs written about the awk command in unix. Everything should be in a power point presentation. Make sure it contains the following: Command name Description How to use the...
-
If a firm does not grow as expected subsequent to convertible or bond-with-warrant issues, does that make it more or less likely that the securities will be converted or exercised?
Study smarter with the SolutionInn App