Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider a scenario where XYZ shopping mall has only one ATM. At a time only one person can access the ATM for transaction. Time
Consider a scenario where XYZ shopping mall has only one ATM. At a time only one person can access the ATM for transaction. Time 10:00 AM Adil came first to use ATM and start using it. Time 10:04 AM While Adil is using ATM, Daniyal have reached outside tl ATM and wait for his turn. Time 10:06 AM Adil is still not out and continue using ATM for various tasks. During this time first Bilal and then Atif come to use ATM Time 10:08 AM Adil leave the ATM, and next person in the queue using the ATM. Time 10:12 AM ATM is empty for use, next person in the queue start us ATM. At this time Saad came to see the queue but did not join the queue. Time 10:15 AM Last person is using the ATM no more person waiting ir the queue. Assuming this whole scenario as a problem of mutual exclusion using semaphores and Initial value of S = 1, Make a table and mention the value semaphore, State of Queue and type of operation and process(Person) name which is in the critical section for each time stamp.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started