If semaphore variable is 8 after 6 wait operations and 3
signal operations.what is semaphore

Answers were Sorted based on User's Feedback



If semaphore variable is 8 after 6 wait operations and 3 signal operations.what is semaphore..

Answer / deepika

let us assume semaphore value to be x before these operations.
Then 6 wait operations reduce its value by 6. So

new value of semaphore = x-6

3 signal operation increases the value by 3. So

new value is now = x-6+3
= x-3

But new value is 8. Thus

x-3=8
x=11

Hence our answer and semaphore value is 11.

Is This Answer Correct ?    8 Yes 2 No

If semaphore variable is 8 after 6 wait operations and 3 signal operations.what is semaphore..

Answer / vinay

Deepika is right !! sorry

Is This Answer Correct ?    2 Yes 0 No

If semaphore variable is 8 after 6 wait operations and 3 signal operations.what is semaphore..

Answer / vinay

assumin it is counting semphore 6 wait operation causes semaphore value to reduce to 8-6=2 ,
then 3 signal oper make it 2+3=5
ans=5

Is This Answer Correct ?    4 Yes 10 No

Post New Answer

More Operating Systems AllOther Interview Questions

Difference Between Jfs & Jfs2?

0 Answers   IBM,


Where do I find disk cleanup?

0 Answers  


Can I close my computer while updating?

0 Answers  


which one of following is not memory management model? choices are buddy system, monitors, paging, swapping

6 Answers   Hughes, Satyam,


How do I run wget?

0 Answers  


What is gnu os?

0 Answers  


How do I combine multiple folders on a mac?

0 Answers  


i want information about real time operating systems because i have an interview tomoorow in valeo company.

1 Answers  


How To Convert A Normal Vg To Big & Scalable Vg And Also Big To Scalable Vg?

0 Answers   IBM,


How do I free up disk space?

0 Answers  


How do you fix a computer that won't start up?

0 Answers  


Can I restore my computer to yesterday?

0 Answers  


Categories