1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
TiliK225 [7]
2 years ago
13

5.14 Describe how the compare and swap() instruction can be used to provide mutual exclusion that satisfies the bounded-waiting

requirement. (15 pts)
Computers and Technology
1 answer:
Naddik [55]2 years ago
8 0

Answer:

Explained below

Explanation:

Compare and Swap(C&S) is simply an atomic operation whereby the compare and swap operations are automatically executed.

Now compare and Swap basically needs 3 arguments namely:

- 2 old values which we will label X and Y

- 1 new value which is written in X that we will call Z

Thus, we now have; C & S = {X, Y, Z}

To explain this well, let X be a variable where X has a value of 7.

Now, if a programmer gives a program me that X be multiplied by 2,then what C&S operation will do is;

I) Y = X where Y is a new variable.

II) Result = C&S(X, Y, X*7)

Variable X is global and this means that mere than one process and more than 1 thread can see the variable X.

Now, if a process named P1 wants multiply the variable X by 7 using C&S operation, it will first make a local copy of variable X (which in this case is now the new variable Y). After that it will atomically compare X & Y and if they are equal, it will replace X with 10X.

However, if they are not equal, P1 will re-read value of X into Y and carry of C&S instruction again.

You might be interested in
Which of the following are points that can demonstrate the accuracy of a website?
Ivahew [28]

websites that can backup their answers so the first one:) im just thinking logically.

3 0
3 years ago
You are the IT administrator for a small corporate network. You have installed the Windows Server 2016 operating system on a ser
Elan Coil [88]

Answer:

In this lab, you perform the following tasks:

• On Disk 1, create a mirrored volume of the System (C:) volume to add fault tolerance.

• Using Disk 2, Disk 3, and Disk 4, create a RAID 5 volume that provides both fault tolerance and improved performance using the following settings:

o Volume size: 2 TB

o Drive letter: R

o Format: NTFS

o Volume label: Data

Complete this lab as follows:

1. Mirror an existing volume as follows:

a. Right-click Start and select Disk Management.

b. Click OK to initialize new disks.

c. Maximize the Disk Management window to better view the volumes.

d. Right-click the System (C:) volume and select Add Mirror.

e. Select Disk 1 that will be used for the mirrored copy.

f. Select Add Mirror.

g. Click Yes to convert the basic disk to a dynamic disk.

2. Create a RAID 5 volume as follows:

a. In Disk Management, right-click a disk with free space and select New RAID 5 Volume.

b. Click Next.

c. Under Available, holding down the Ctrl key, select Disk 3 and Disk 4 to be part of the new volume with Disk 2.

d. Select Add.

e. Click Next.

f. From the drive letter drop-down dialog, select R; then click Next.

g. Make sure that NTFS is selected as the file system.

h. In the Volume label field, enter Data.

i. Select Next.

j. Click Finish to create the volume.

k. Click Yes to convert the basic disk to a dynamic disk.

Explanation:

5 0
3 years ago
Which file format would be appropriate for web graphics​
Eddi Din [679]

Answer:

PNG

Explanation:

PNG files can shrink to incredibly small sizes - especially images that are simple colours, shapes, or text. This makes it the ideal image file type for Web graphics.

4 0
2 years ago
In describing a new problem you are having with your computer, your boss interrupts and states, I had the same problem last week
Anna007 [38]

Answer:

Stereotyping

Explanation:

According to my research on information technology, I can say that based on the information provided within the question it can be said that your boss is exhibiting Stereotyping which could be inhibiting his creative problem-solving approach. Just like in psychology, stereotyping is over-generalized belief about a particular something. Which in this case since his boss saw a similarity in the problem with another problem he previously had, he automatically assumed he knew the cause and how to fix it.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

5 0
3 years ago
Read 2 more answers
Right now I have an i5 2400 and a PYN XLR8 gaming GTX 1650 Super, my CPU is too weak for 1080p gaming, what CPU should I get tha
Dmitry_Shevchenko [17]

Answer:

if its a number you need 5600GHz but im not to sure

Explanation:

8 0
2 years ago
Read 2 more answers
Other questions:
  • In older systems, often the user interface mainly consisted of ____-control screens that allowed a user to send commands to the
    11·1 answer
  • To apply the rule of thirds you first? PLZ HURRY AND ANSWER THIS
    5·2 answers
  • Which OS function does a CLI fulfill? A User interface B Running applications C Hardware interface D Booting
    8·1 answer
  • Located toward the right of the status bar and contains buttons for zooming the display in and out
    13·1 answer
  • 1). What is the proper name of the healing agent?
    5·1 answer
  • 4. Write an appropriate comment for describ-
    11·1 answer
  • Items that are cut or copied are placed on the Clipboard.
    6·2 answers
  • Please help
    11·1 answer
  • QUICK HELP ME PLEASE
    9·1 answer
  • Send link for a qc or paddle
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!