[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.
Interview Questions and Answers :: Cisco

5. A user defined semaphore programmed was written for SemTake and SemGive with one global variable, which was updated on semtake/give.
Question was to point out if that program will work as per semTake/semGive requirement or not? What may be the problem with that?

Answer:

The problem was that while a process would be executing the semTake and another process may preempt before even the global variable is updated.
So, the second process may even take the sem.Which lead to problem ) . What could be a solution to it?

Post Your Answer Here:      Public      Private

Rate This: +0 -0
Report     

Post Your Reply Here:     

Report Error

Report Error

Please Login First Click Here