File-Based Communication: fifo use the file system as a medium for communication between processes. They are created as special files in a directory,just like regular files. However, these files are not meant to store data on disk. Instead, they act as virtual channels through which data can flow beTween processes.
Creation: To create a fifo, you use a mkfifo() system call provided by the operating system. Once created, the named pipe file appears in the file system, and processes can interact with it like they would with any other file .
Two Ends: A fifo has two ends: a reading end and a writing end. These ends function as entry and exit points for data. One process can write data to the writing end of the named pipe, and another process can read the same data from the reading end. This creates a unidirectional flow of data.
lifespan and Cleanup: FIFO persist beyond the lifespan of the processes that use them. They remain as files in the file system until explicitly removed. This allows different processes to communicate even if they start and stop at different times.