749 views
0 votes
0 votes

By using Intel hardware xchg instruction ensures that

  1. The critical section is deadlock free

  2. Solution is starvation free

  3. Process enters CS in FIFO order

  4. More than one process enters critical section at same time

Which of the above statement is TRUE?

1 Answer

0 votes
0 votes
An XCHG instruction in Intel Processor is used. It is one of mechanism to implement proper Synchronization .

Let Us first discuss the working of Xchg Instruction

Syntax is xchg(oldvalue, newvalue) . An instruction is executed successfully if we swap the old value with newValue and in return get oldvalue . this is an atomic instruction .

Whoever executed this instruction fast will have acess to Cs . Hence with having small knowledge of xchg instruction you can say that FIFO order is not maintained, A slow process will have to starve , and yes no proceess can enter at same time (since it is atomic )

So solution for the above question is 1

Related questions

2 votes
2 votes
1 answer
1
1 votes
1 votes
0 answers
2
Hirak asked May 9, 2019
753 views
0 votes
0 votes
4 answers
4
gulsanchouhan asked Oct 14, 2017
1,981 views
If the value of a counting semaphore s = 4, then the maximum number of requests for the critical section before it blocks is _____________ ?1. 02. 13. 24. 4