Consider a computer that does not have a TEST AND SET LOCK instruction but does have an
Question:
Consider a computer that does not have a TEST AND SET LOCK instruction but does have an instruction to swap the contents of a register and a memory word in a single indivisible action. Can that be used to write a routine enter_region such as the one found in Fig. 2-12?
Transcribed Image Text:
enter_region: TSL REGISTER, LOCK CMP REGISTER,#0 JNE ENTER REGION RET leave region: | copy LOCK to register and set LOCK to 1 was LOCK zero? | if it was non zero, LOCK was set, so loop | return to caller; critical region entered MOVE LOCK, #0 RET | store a 0 in LOCK I return to caller Figure 2-12. Entering and leaving a critical region using the TSL instruction.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 75% (4 reviews)
Yes it is possible to write a routine enterregion such as the one found in Figure 212 on a computer that does not have a TEST AND SET LOCK instruction ...View the full answer
Answered By
Bhartendu Goyal
Professional, Experienced, and Expert tutor who will provide speedy and to-the-point solutions. I have been teaching students for 5 years now in different subjects and it's truly been one of the most rewarding experiences of my life. I have also done one-to-one tutoring with 100+ students and help them achieve great subject knowledge. I have expertise in computer subjects like C++, C, Java, and Python programming and other computer Science related fields. Many of my student's parents message me that your lessons improved their children's grades and this is the best only thing you want as a tea...
3.00+
2+ Reviews
10+ Question Solved
Related Book For
Operating Systems Design And Implementation
ISBN: 9780131429383
3rd Edition
Authors: Andrew Tanenbaum, Albert Woodhull
Question Posted:
Students also viewed these Computer science questions
-
THIRD AVENUE SOFTWARE HEALTH-CARE APP PROJECT This case is new for the ninth edition of Information Technology Project Management . The case provides an opportunity to apply agile and Scrum...
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
The IQ and VIQ are tools insurance producers use to learn more about internal assumptions regarding factors that ultimately control policy performance. They have information in all of the following...
-
Microsoft Corporation is the defendant in numerous lawsuits claiming unfair trade practices. Microsoft has strong incentives not to disclose these contingent liabilities . However, GAAP requires that...
-
The density of atmospheric air varies with elevation, decreasing with increasing altitude. (a) Using the data given in the table, obtain a relation for the variation of density with elevation, and...
-
In Problem 3.6 a regression model was developed for the gasoline mileage data using the regressor vehicle length \(x_{8}\) and vehicle weight \(x_{10}\). Calculate the PRESS statistic for this model....
-
A car dealer acquires a used car for $ 14,000, terms FOB shipping point. Additional costs in obtaining and offering the car for sale include $ 250 for transportation-in, $ 900 for import duties, $...
-
This has to do with linear programming. Creatine L-Glutamine BCAAs Cost (grams) (grams) (grams) ($) Xtendo 0 2.5 7 0.80 (Scivation) RecoverMode 3 3 5 1.20 (Evolution Nutrition) Strongevity 3 1 0 1.00...
-
Is a statement like ln file file.lock an effective locking mechanism for a user program like the scripts used in the previous problem? Why (or why not)?
-
Give an example of a race condition that could possibly occur when buying airplane tickets for two people to go on a trip together.
-
Rennau Ltd has acquired a new machine, which it has had installed in its factory. Which of the following items should be capitalised into the cost of the building? (a) Labour and travel costs for...
-
True or False: The annual percentage rate is the same as the effective annual interest rate.
-
What is Stats?
-
True or False: When repaying a loan with equal monthly payments, the amount of interest and the amount of principal in a loan payment remain proportionally the same over the loan period.
-
If you invest $5,000 three years from now, how much will be in the account 15 years from now if i = 10 percent compounded annually? a. $8,053 b. $15,692 c. $20,886 d. $27,800
-
When repaying a loan using Plan 3 (equal end-of-period payments), which of the following is true? a. Interest payments will increase and principal payments will decrease from period to period. b....
-
Are International Financial Reporting Standards (IFRS) issued by the International Accounting Standards Board (IASB) considered authoritative by the Codification?
-
1. Firms may hold financial assets to earn returns. How the firm would classify financial assets? What treatment will such financial assets get in the financial statements in accordance with US GAAP...
-
Consider the set of keys K = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}. a. Draw a (2,4) tree storing K as its keys using the fewest number of nodes. b. Draw a (2,4) tree storing K as its keys using the...
-
Consider the sequence of keys (5,16,22,45,2,10,18,30,50,12,1). Draw the result of inserting entries with these keys (in the given order) into a. An initially empty (2,4) tree. b. An initially empty...
-
Give a proof of Proposition 11.10 Proposition 11.10 The algorithm for deleting an entry from a red-black tree with n entries takes O(log n) time and performs O(log n) recolorings and at most two...
-
Simplify: 16q42 V Report your answer with a positive value of q.
-
In a long-distance relay of 50 miles, the four runners on one team had the the times 1 hour, 3 minutes, 46 seconds; 57 minutes, 30 seconds; 1 hour, 58 seconds; and 45 minutes, 4 seconds. What was the...
-
Factor 4k + 28k + 48. The factored expression is
Study smarter with the SolutionInn App