You are asked to design and implement a new synchronization primitive that will allow multiple processes to block on an event until some other process signals the event. When a process signals the event, all processes that are blocked on the event are unblocked. If no processes are blocked on an event when it is signaled, then the signal has no effect. Implement the following using C functions. • intdoeventopen(); Creates a new event, returning event ID on success, -1 on failure. • intdoeventclose(inteventID); Destroy the event with the given event ID and signal any processes waiting on the event to leave the event. Return number of processes signaled on success and -1 on failure. • intdoeventwait(inteventID); Blocks process until the event is signaled. Return 1 on success and -1 on failure. • in doevents(in eventID); Unblocks all waiting processes; ignored if no processes are blocked. Return number of processes signaled on success and -1 on failure.
Answers
Answered by
1
Answer:
such a long question it must be limited
Similar questions
Political Science,
5 months ago
Computer Science,
5 months ago
Math,
5 months ago
English,
9 months ago
Physics,
9 months ago
Chemistry,
1 year ago
Hindi,
1 year ago
English,
1 year ago