Question
I need help with (1) a list of every semaphore, its purpose, and its initial value, and (2) pseudocode for each function. Here is the
I need help with (1) a list of every semaphore, its purpose, and its initial value, and (2) pseudocode for each function. Here is the description below
Overview
The clinic to be simulated has doctors, each of which has their own nurse. Each doctor has an office of his or her own in which to visit patients. Patients will enter the clinic to see a doctor, which should be randomly assigned. Initially, a patient enters the waiting room and waits to register with the receptionist. Once registered, the patient sits in the waiting room until the nurse calls. The receptionist lets the nurse know a patient is waiting. The nurse directs the patient to the doctors office and tells the doctor that a patient is waiting. The doctor visits the patient and listens to the patients symptoms. The doctor advises the patient on the action to take. The patient then leaves.
Threads
Receptionist one thread
Doctor one thread each, maximum of 3 doctors
Nurse one per doctor thread, identifier of doctor and corresponding nurse should match
Patient one thread each, up to 30 patients
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