First in, First out

A policy which states items will be processed in order of arrival. Implemented by a queue.

Also known as FCFS (First come, First served).

There's FIFO (first-in, first-out, queue). Less well known as LILO (last-in, last-out).

The opposite is LIFO or FILO (last-in, first-out / first-in, last-out, stack).

FIFOs can be really useful for inter-process communication (IPC). One process opens one end for writing, another process opens the other end for reading, and voila, IPC. Operating Systems usually help out with things like synchronization, usually causing the first process that opens the FIFO to block (stop running) until another process opens the other end. This is, of course, optional, so you can let your application do other stuff while it waits around for some other application to get its shit together and open the pipe. Of course if you *want* your process to block and it doesn't because of a bug in the OS (like in some versions of Solaris), then you've got problems.

Log in or register to write something here or to contact authors.