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

I have two coins for 75 paise.1 coin is not 50 paise, how?

41 Answers   HCL, Infosys, KI, SNS International,


There is a shortage of tubelights, bulbs and fans in a village - Kharghar. It is found that ?All houses do not have either tubelight or bulb or fan. ?exactly 19% of houses do not have just one of these. ?atleast 67% of houses do not have tubelights. ?atleast 83% of houses do not have bulbs. ?atleast 73% of houses do not have fans. What percentage of houses do not have tubelight, bulb and fan?

1 Answers  


Three friends divided some bullets equally. After all of them shot 4 bullets the total number of bullets remaining is equal to the bullets each had after division. Find the original number divided.

16 Answers   Directi, Infosys, L&T, Shreyas, TCS, Turing Software,


Somebody marked the six faces of a die with the numbers 1, 2 and 3 - each number twice. The die was put on a table. Four people - Abu, Babu, Calu and Dabu - sat around the table so that each one was able to see only three sides of the die at a glance. ? Abu sees the number 1 and two even numbers. ? Babu and Calu can see three different numbers each. ? Dabu sees number 2 twice and he can't remember the third number. What number is face down on the table?

2 Answers  


Find out all possible groups of three different numbers that add up to 13 and arrange them according to given condition. If one number is 9, it must go with 1 and 3. If one number is 8, it must go with either 1 and 4 or 2 and 3. If one number is 7, it must go with either 1 and 5 or 2 and 4. If one number is 6, it must go with either 2 and 5 or 3 and 4.

2 Answers   HCL,






You have 8 coins. 3 of them weigh x units, 3 y units, 1 a units and 1 b units. They are all mixed and look identical. You have to find the lightest coin in minimum number of weighing (balance)

1 Answers   Oracle,


arrange these alphabets evenymroin in to three words

17 Answers   Avaya,


In which month child has been less weeping?

2 Answers  


rich man keeps me in pocket, poor men throws me away, children eat me, am a tamil word _u_ _e_ _l

9 Answers   Adama Agricultural Solutions, Infosys, Mannar Company, Wipro,


Find the values of each of the alphabets. N O O N S O O N + M O O N ---------- J U N E

21 Answers   Bhel, CAT, IBM, Infosys, Mind Tree, Wipro,


Certain words are coded as follows : BEAR-9281, DRUM-0683,PRY- 485 AND DOOR-7899.What is the code for ‘R’?

2 Answers   Satyam,


ek cricket match chal raha he jitne ke liye 7 ball me 3 runs lag rahe he. dono batsman ke runs he 94and 94. 3 balls me se koi bhi whide,extra, noball nahi gira.fir bhi dono batsman ne centuri puri ki.aur teem match jeet gayi. to dono batsman ne apni centuri puri ki kese?

13 Answers  


Categories