Implement a multiple-reader-single-writer lock given a
compare-and-swap instruction. Readers cannot overtake
waiting writers.



Implement a multiple-reader-single-writer lock given a compare-and-swap instruction. Readers canno..

Answer / raj

Semaphores

Is This Answer Correct ?    3 Yes 9 No

Post New Answer

More Puzzles Interview Questions

Consider a number 235, where last digit is the sum of first two digits i.e. 2 + 3 = 5. How many such 3-digit numbers are there?

4 Answers   TCS,


iwant to know which type of questions were coming in tcs company

3 Answers   Syntel, TCS,


Vipul was studying for his examinations and the lights went off. It was around 1:00 AM. He lighted two uniform candles of equal length but one thicker than the other. The thick candle is supposed to last six hours and the thin one two hours less. When he finally went to sleep, the thick candle was twice as long as the thin one. For how long did Vipul study in candle light?

13 Answers   Cognizant,


There are 9 coins. Out of which one is odd one i.e weight is less or more. How many iterations of weighing are required to find odd coin?

4 Answers   Accenture,


Find the missing number in the series: 14 11 ? 14 6 12 8 plz reply.

7 Answers   Bhel, Quick Heal, Silicon House,






In a locked empty room from inside a man hanged himself to a fan above 10 feet and there is nothing in the room on which he could have stand and hung up but there is some water on the floor can anybody give the answee

2 Answers   Amazon,


The secret agent X emailed a code word to his head office. They are "AIM DUE OAT TIE MOD". But four of these five words are fake and only one contains the information. The agent X also mailed a sentence as a clue - if I tell you any one character of the code word, you would be able to tell the number of vowels in the code word. Can you tell which is the code word?

6 Answers   TCS,


There are 3 colored boxes - Red, Green and Blue. Each box contains 2 envelopes. Each envelope contains money - two of them contain Rs. 25000 each, two of them contain Rs. 15000 each and remaining two contain Rs. 10000 each. There is one statement written on the cover of each box. * Red Box: Both, a red box and a blue box contain Rs. 10000 each. * Green Box: Both, a green box and a red box contain Rs. 25000 each. * Blue Box: Both, a blue box and a green box contain Rs. 15000 each. Only one of the above 3 statements is true and the corresponding box contains the maximum amount. Can you tell which box contains the maximum amount and how much?

2 Answers  


what job position/s are you currently holding with your current employer?

0 Answers   Qatar Airlines,


If you are in a jail. there a window having two rodes one is made of Iron and other is of magnet. using a rope how could you find magnet or iron rod.

4 Answers  


Who ever has red card says truth black card says false 2 guys a and b a says "iam b i have red card " who is he wat card he has thats all from apti i know

11 Answers   Patni,


You have four 9's and you may use any of the (+, -, /, *) as many times as you like. I want to see a mathematical expression which uses the four 9's to = 100 How many such expressions can you make?

1 Answers   Sahara,


Categories