omerzi / consumer-producer-threads Goto Github PK
View Code? Open in Web Editor NEWOperating Systems Multi-Threading exercise, using Threads, Mutex, Condition-Variables wrote with C on Linux. The main thread creates N_PROD producers and N_CONS consumers. Each producer creates an "item" and adding it to a list, each consumer searches for an item with an "undone" status, doing a bit of processing on it until the status of the item changes to "DONE" and prints it to a log file. Try it yourself: Just write "make" to the shell.