first-in first-out


first-in first-out

(algorithm)(FIFO, or "queue") A data structure or hardwarebuffer from which items are taken out in the same order theywere put in. Also known as a "shelf" from the analogy withpushing items onto one end of a shelf so that they fall offthe other. A FIFO is useful for buffering a stream of databetween a sender and receiver which are not synchronised -i.e. not sending and receiving at exactly the same rate.Obviously if the rates differ by too much in one direction fortoo long then the FIFO will become either full (blocking thesender) or empty (blocking the receiver). A Unix pipeis a common example of a FIFO.

A FIFO might be (but isn't ever?) called a LILO - last-inlast-out. The opposite of a FIFO is a LIFO (last-infirst-out) or "stack".