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...
-
Several years ago in its annual report, Philip Morris Companies, a major manufacturer of tobacco and food products, included footnote 16, which was almost five pages long. It consisted of a number of...
-
Identify the steps in preparing a personal budget.
-
Metal Products, LLC, manufactures metal beverage containers. The division that manufactures soft-drink beverage cans for the North American market has two plants that operate 24 hours a day, 365 days...
-
Review Problem Set 8 A312 Name: Group #: Use the following information to answer questions 1-3. Consider the following transactions: Cash received from sale of building $6,000 Depreciation Expense...
-
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.
-
Consider a binomial random variable with n = 9 and p = .3. Isolate the appropriate column in Table 1 and fill in the probabilities below. Fill in the blanks in the table below. 0 1 2 3 4 5 6 7 8 9...
-
Use the information provided below to calculate the economic order quantity (expressed to the next whole number). INFORMATION Savoy Traders intends purchasing 19 200 watches at R80 each in the next...
-
An iron rod with an initial length of 14.46 m has its temperature raised from 14.98 C to 41.90 C. If iron has a coefficient of thermal expansion of 12 10 6 1/C, what is the change in length of the...
-
Find the complete solution of the linear system, or show that it is inconsistent. (If the system has infinitely many solutions, express your answer in terms of t, where x = x(t), y = y(t), and z=t....
-
Provide me with feedback on my concept of "Survival of the Fittest". If you agree with it, please explain why. I think analyzing the direction of a country from an equity perspective involves...
-
1. Teddy wants to evaluate the impact of a skills training intervention on participants. He collects baseline data of both treated and control group and recorded outcomes of 150 and 100 for the...
-
Refer to the data in ED- 5. Per Share 12/ 31/ 2015..$ 45 12/ 31/ 2016.42 Required:
-
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...
-
Finite element formulations in two dimensions can only be constructed as a mappings from a bi-unit square domain. False True
-
Online Driver Education Course with 6 Hours of Training Chapter 12 QUIZ Question 1 to 10 1. Always look carefully for motorcycles before you change lanes because: Their smaller size makes them harder...
-
Consider the price - taker market for dress shirts. The following graph shows the marginal cost ( MC MC ) , average total cost ( ATC ATC ) , and average variable cost ( AVC AVC ) curves for a typical...
Study smarter with the SolutionInn App