Microsoft Interview Question
1,056 Interview Reviews |
Back to all Microsoft Interview Questions & Reviews
Interview questions and reviews posted anonymously by interview candidates
Interview Question for Software Development Engineer at Microsoft:
Implement a solution for the bounded buffer problem where you have a queue of work items and several producer/consumer threads.
| Tags: | threads, synchronization See more , See less 8 |
See more for this Microsoft Software Development Engineer Interview
Helpful Question?
Yes |
No
Inappropriate?
Answers & Comments (2)
empty
full
access
producer()
{
wait(empty)
wait(access)
// Fill the q
signal(access)
signal(full)
}
consumer()
{
wait(full)
wait(access)
// Consume the q
signal(access)
signal(empty)
}
Note : Use signal NOT broadcast when using POSIX cond_wait if you know what i mean.
Helpful Answer?
Yes |
No
Inappropriate?
Members can
answer or comment on this question
–
Join Now (It's Free) or
Sign In



0 of 0 people found this helpful
by Interview Candidate: