C Multithreaded application
$30-250 USD
Paid on delivery
n a company hiring new employees is done in two stages. In the first stage, the “human resources (HR) department” deals with the new applicants. The second stage is han- dled by the “trial department”.
In the HR department, there is one receptionist and three interviewers. When a new applicant arrives at the department, the receptionist registers him/her and assigns his/her application sta- tus as 0. After this step, the applicant goes into the waiting room to wait for an interviewer to become available. Whenever one of the interviewers becomes available, he/she calls the first applicant in line and interviews him/her. While the interviewers interview the applicants, the
24.04.2017
receptionist continues registering incoming new applicants. (Note: Assume that the waiting room has infinite capacity.)
At the end of the interview, the applicant is either accepted to go into the trial period or is re- jected. If an applicant is accepted to go into the trial period, the interviewer marks his/her sta- tus as 2; if he/she is rejected, the interviewer marks his/her status as 1. At this stage, rejected applicants leave the system. Applicants which have been accepted into the trial period go to the waiting room of the trial department to wait for a trainer to become available.
In the trial department, there are four trainers. Whenever one of the trainers becomes availa- ble, he/she calls the first applicant in line and starts training him/her. At the end of the trial period, the applicant is either fully accepted into the position he/she applied for or is rejected. If an applicant is fully accepted, the trainer marks his/her status as 4; if he/she is rejected, the trainer marks his/her status as 3. At the end of this stage, both rejected applicants and fully accepted applicants leave the system.
You are required to implement the following models. Please note that any other model will NOT get any points.
• Each applicant is a process with no threads.
• The HR department is a process with the interviewers and the receptionist as threads
of this process. There are three interviewers and one receptionist.
• The trial department is a process with the trainers as threads of this process. There are
four trainers.
• The status of each applicant is a shared integer variable which can be accessed (read)
by the applicant and modified by the receptionist, the interviewers and the trainers.
Status information:
• “0” means that it is a new applicant who has been registered by the receptionist. This
status is assigned by the receptionist when registration is completed.
• “1” means that the applicant has been rejected after the interview. This status is as-
signed by an interviewer.
• “2” means that the applicant has been accepted to go into the trial period after the in-
terview. This status is assigned by an interviewer.
• “3” means that the applicant has been rejected after the trial period. This status is as-
signed by a trainer.
• “4” means that the applicant has been fully accepted for the position he/she applied
for. This status is assigned by a trainer.
Project ID: #13977343
About the project
9 freelancers are bidding on average $205 for this job
Hi there, I'm a fully qualified Computer Scientist, and vastly experienced R&D engineer, specialising in C and C++. If you need help with this assignment, let me know - as I also teach C++ . Thanks.
Hello, I want to show you all relevant Demo and Designs which is similar to your project completed previously. To make sure about the requirement set and customizations, I want to discuss this project with you further More
Hi,dear. I am a senior software developer. I have just checked your project report, I am able to perform this task with my developer team. I am looking forward to your proposal...