关于我的任务,我已经坚持在我的多线程c应用程序上创建起点。要求很简单,但我正在寻找一个积极的开始......
系统正在处理4个线程,1个接待员,3个接线员。我们有一个由程序读取的输入文件保存采访时间,如:
30
40
60
50
..
申请人数可能无限制。接待员在计划参数的几秒钟内进行登记操作(假设这是1)并且在那个时间登记每个申请人。每次有人注册时,都会被送到候诊室,并且任何可用的面试官线程都会进行面试,以便在等候名单中对申请人进行面试(订单是ib文本文件)。申请可以随意选择一个免费的面试线程......
输出应类似于以下内容:
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
我不是在寻找答案,而是试图创建我的模型,但我自己无法想象。
任何帮助都将受益于开始。
非常感谢提前。