Embed presentation

![Many systems provide hardware support for critical
sections.
Many systems provide special hardware instructions
that allow us either to test and modify the content of a
word set.
If two test and set instructions are executed
simultaneously, they will be executed sequentially in
some arbitrary order.
The process enter its critical section only if waiting[i]
== false and key == false.
SYNCHRONIZATION HARDWARE](https://image.slidesharecdn.com/r-150315060255-conversion-gate01/85/Synchronization-Hardware-R-D-Sivakumar-2-320.jpg)
![While (true)
{
waiting[i] = true;
key = true;
while (waiting [i]
&& key)
key =
testandset(lock);
waiting [i] = false;
critical section
j = j + 1;
// waiting [j] =
false;
}
EXAMPLE](https://image.slidesharecdn.com/r-150315060255-conversion-gate01/85/Synchronization-Hardware-R-D-Sivakumar-3-320.jpg)


The document discusses synchronization hardware that provides support for critical sections. It describes how many systems provide special hardware instructions that allow testing and modifying the content of a word set. If two test and set instructions are executed simultaneously, they will be executed sequentially in some arbitrary order. The process can enter its critical section only if waiting[i] == false and key == false.

![Many systems provide hardware support for critical
sections.
Many systems provide special hardware instructions
that allow us either to test and modify the content of a
word set.
If two test and set instructions are executed
simultaneously, they will be executed sequentially in
some arbitrary order.
The process enter its critical section only if waiting[i]
== false and key == false.
SYNCHRONIZATION HARDWARE](https://image.slidesharecdn.com/r-150315060255-conversion-gate01/85/Synchronization-Hardware-R-D-Sivakumar-2-320.jpg)
![While (true)
{
waiting[i] = true;
key = true;
while (waiting [i]
&& key)
key =
testandset(lock);
waiting [i] = false;
critical section
j = j + 1;
// waiting [j] =
false;
}
EXAMPLE](https://image.slidesharecdn.com/r-150315060255-conversion-gate01/85/Synchronization-Hardware-R-D-Sivakumar-3-320.jpg)
