coding_assignment_2
COMSC 260 Applied Operating Systems
Spring 2021
Coding Assignment #2,
Due: 11:59 PM on Sunday, April 11, 2021
Grading: 7% of the course’s final grade
Submission: submit to Bridges a zip file or a tgz file that comprises your e
or and
warning free source code and three sample outputs.
A group of workers (n threads) is working on a project together and a task (sleep x
seconds) is assigned to each worker. All workers are working independently and may
finish their tasks in an a
itrary order. When a worker is done with its task, it must wait
for other workers to finish their tasks. When the last worker finishes its task, all workers
are released and can start a new project (program exists).
Design and implement a synchronization program for the group of workers using the
mutex and semaphore APIs defined in the POSIX thread (pthread) li
ary.