The Students and Teaching Assistant(TA) named Threads
Using threads, create n students. Each will run as a separate thread. The TA will run as a separate thread as well. Student threads will seek help from the TA. If the TA is available, they will obtain help. Otherwise, they will either sit on a chair in the hallway or, if no chairs are available, will seek help at a later time ( random period of time). If a student arrives and notices that the TA is sleeping, the student must notify the TA using semaphore. When the TA finishes helping a student, the TA must help each of the students in turn. If no students are present, the Ta may return to napping. Simulating the TA providing help to a student is to have the appropriate threads sleep for a random period of time.
23 freelancer đang chào giá trung bình $32 cho công việc này
Good day! I`m expert Java Dev with more than +7 years in It area. I have a success career in web/soft development using cutting edge Tech with latest frameworks in Java. Best Regards
Have over 13 years of experience in C,C++ Application development using shared memory, semaphore and other IPCs Stay tuned, I'm is still working on this proposal.