Waste manager implemented in C with threads and monitors