The Gateway to Computer Science Excellence
0 votes
48 views

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?

in Operating System by (249 points) | 48 views
0
I think it is option 1. We don't find deadlock in any of the modern hardware. What we term as system "hang" is the starvation.

1 Answer

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
by Loyal (9.8k points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,644 questions
56,531 answers
195,625 comments
101,353 users