Question
Create a single dimensional array between 10 and 1000 entries to represent seats in the theater. Initialize all valuables to A for available. Create a
Create a single dimensional array between 10 and 1000 entries to represent seats in the theater. Initialize all valuables to "A" for available. Create a function named agent that will be changing the available seats to "S" for sold. Multiple threads of the "agent" function will be working concurrently on the exact same array., and all threads will end once all seats have been sold (all values set to "S").
This Homework will require the use of process.h and semaphore.h, which we will use to create threads and avoid race conditions, respectively.
ALL OF THIS TO BE DONE IN C.
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