One of the simplest IPC primitives that block instead of wasting CPU time is the pair sleep and wakeup. sleep is a system call that causes the caller to block, that is, be suspended until another process wakes it up. The wakeup call has one parameter, the process to be awakened. Alternatively, both sleep and wakeup each have one parameter, a memory address used to match up sleeps with wakeups.
Sleep and Wake up - JaeHyeon’s Blog
One of the simplest IPC primitives that block instead of wasting CPU time is the pair sleep and wakeup. sleep is a system call that causes the caller to block, that is, be suspended until another process wakes it up. The wakeup call has one parameter, the process to be awakened. Alternatively, both sleep and wakeup each have one parameter, a memory address used to match up sleeps with wakeups.
https://jaehyeon48.github.io/os/sleep-and-wakeup/