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 am the owner of a pet store. If I put in one canary per cage, I have one bird too many. If I put in two canaries per cage, I have one cage too many. How many cages and canaries do I have? (Expalin in Detail) a.4 canaries and 3 cages b.3 canaries and 4 cages c.4 canaries and 5 cages d.None of the above

4 Answers   CTS, DELL,


There are 4 mugs placed upturned on the table. Each mug have the same number of marbles and a statement about the number of marbles in it. The statements are: Two or Three, One or Four, Three or One, One or Two. Only one of the statement is correct. How many marbles are there under each mug?

1 Answers  


Find the smallest number such that if its rightmost digit is placed at its left end, the new number so formed is precisely 50% larger than the original number.

9 Answers   CTS, Google,


In rail road there are some stations. Each station should have tickets to all other stations.If they add some new stations they need 46 more tickets.How many stations are there before and after adding the stations?

0 Answers   Infosys,


A fish had a tail as long as its head plus a quarter the lenght of its body. Its body was three-quarters of its total length. Its head was 4 inches long. What was the length of the fish?

2 Answers  






500 men are arranged in an array of 10 rows and 50 columns according to their heights. Tallest among each row of all are asked to come out. And the shortest among them is A. Similarly after resuming them to their original positions, the shortest among each column are asked to come out. And the tallest among them is B. Now who is taller A or B ?

14 Answers   ANZ, Infosys,


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  


One side of the bottom layer of a triangular pyramid has 12 balls. How many are there in the whole pyramid? Note that the pyramid is equilateral and solid.

2 Answers  


Two trains at speed 60 km/hr comes in the opposite direction. At a particular time the distance between the two trains is 18km. A shuttle flies between the trains at the speed of 80 km/hr. At the time the two trains crashes what is the distance traveled by shuttle?

4 Answers   CTS, iGate, UGS,


If A,B,C,D,E r 5 members of a family.4 of them give true statements : 1. E is my mother in law 2. C is my son in law's brother 3. B is my father's brother 4. A is my brother's wife Who made the stmt. and what r the realtions among them Ans. E

4 Answers   Infosys,


All types of puzzles asked in SBI exam.

0 Answers   State Bank Of India SBI,


a circle is drawn...roughly in paper...the interviewer asked me to find centre point of circle?the radius,circumference is not known?how to find it?

19 Answers   Accenture, HCL, Infosys, Manhattan,


Categories