Video Lecture and E-Content Created by
R.D.SIVAKUMAR,M.Sc.,M.Phil.,M.Tech.,
Assistant Professor of Computer Science &
Assistant Professor and Head, Department of M.Com.(CA),
Ayya Nadar Janaki Ammal College,
Sivakasi – 626 124.
Mobile: 099440-42243
SYNCHRONIZATION HARDWARE
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
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
Synchronization Hardware-R.D.Sivakumar

Synchronization Hardware-R.D.Sivakumar

  • 1.
    Video Lecture andE-Content Created by R.D.SIVAKUMAR,M.Sc.,M.Phil.,M.Tech., Assistant Professor of Computer Science & Assistant Professor and Head, Department of M.Com.(CA), Ayya Nadar Janaki Ammal College, Sivakasi – 626 124. Mobile: 099440-42243 SYNCHRONIZATION HARDWARE
  • 2.
    Many systems providehardware 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
  • 3.
    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