I would like to hire a Freelance Developer
$10-30 USD
Paid on delivery
I need you to develop some software for me. I would like this software to be developed for Linux using C or C++. This project will include multithreadening operations, not requires a high level programming and task is quite easy.
Description: In a company the human resources (HR) department deals with hiring new employees.
In this department, there is one receptionist and three interviewers. When an applicant
arrives at the department, the receptionist registers him/her. After this step, the receptionist sends the applicant into the waiting room. 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 receptionist continues registering incoming applicants. (Note: Assume that the waiting room has infinite capacity.)
You are required to model this HR department as a process with the interviewers and the receptionist as threads of this process. The receptionist needs nr seconds to register each applicant (this time is fixed and is read as a command line argument). Interviewing an applicant takes ni seconds for an interviewer and ni depends on the job position the applicant is applying for. To simulate applicants with different types of position applications, an interviewer thread should read the time it will take to interview the current applicant from an input file.
(Hint! To simulate the waiting times during the registration and interview stages, you can use the “sleep” command.)
Please note: For this homework, you are required to model the HR department as ONE process with FOUR threads (one receptionist thread and three interviewer threads). Solving the problem with multiple processes and no threads, will NOT get any points.
Please preserve the order and meaning of the program arguments.
Please test your program with different input files and make sure to achieve expected results.
Please check that your program correctly removes all allocated resources (e.g. shared memory locations, semaphores, and any others you have used).
Input parameters and input file formats: Input files for testing your program must be in the format given below where each line contains the ni interviewing times for each applicant. Input file must be in “.txt” file format. Assume that there are 4 applicants with following interviewing times. For example, interviewing time for the first applicant is 50 seconds, for the second one 30 seconds, so on.
[url removed, login to view]
50
30
70
60
..
Test: Your program will be tested in the form:
./program [url removed, login to view] nr
Output format: Your program must print the events on the screen in their order of occurrence
in the format given below. Assume that nr = 1 seconds in this example.
Applicant 1 applied to the receptionist
Applicant 2 applied to the receptionist
Applicant 3 applied to the receptionist
Applicant 4 applied to the receptionist
Applicant 1’s registeration is done
Interviewer 1 started interview with Applicant 1
Applicant 2’s registeration is done
Applicant 3’s registeration is done
Interviewer 3 started interview with Applicant 2
Interviewer 2 started interview with Applicant 3
Applicant 4’s registeration is done
Interviewer 3 finished interview with Applicant 2
Interviewer 3 started interview with Applicant 4
Interviewer 1 finished interview with Applicant 1
Interviewer 2 finished interview with Applicant 3
Interviewer 3 finished interview with Applicant 4
All applicants have interviewed successfully.
Project ID: #13695110
About the project
4 freelancers are bidding on average $84 for this job
I m software engineer. I have read the description and I would like to work for you. For further details please inbox me. Thank you
Hi I will help you on your projects. I can create your project and other works. Unique projects. On time delivery. Unlimited revisions. Faithful service. 100% full refund accept. Please send me your project descrip More