For the vast majority of use cases, pipes are intended to be used with small amounts of data, but there might be scenarios where a larger amount is needed. The standard POSIX, to which we adhere in this chapter, says that a write of less than pipe_BUF bytes must be atomic. It furthermore dictates that pipe_BUF must be at least 512 bytes (on Linux, it is 4 KB); otherwise, you have to take care of the synchronization at the user level by using mechanisms such as semaphores and mutexes.