| Fifo |
Articles about Fifo |
Information AboutFifo |
| CATEGORIES ABOUT FIFO | |
| scheduling algorithms | |
| inter-process communication | |
|
FIFO is an Acronym for '''First In, First Out'''. This expression describes the principle of a Queue or First-come, First-served (FCFS) behavior: what comes in first is handled first, what comes in next waits until the first is finished, etc. Thus it is analogous to the behaviour of persons queuing (or "standing in line", in common American parlance), where the persons leave the queue in the order they arrive. '''FCFS''' is also the other name for the FIFO operating system scheduling algorithm, which gives every process cpu time in the order they come. A Priority Queue is a variation on the queue which does not qualify for the name FIFO, because it is not accurately descriptive of that Data Structure 's behavior. Queuing Theory encompasses the more general concept of queue, as well as interactions between strict-FIFO queues. The expression FIFO can be used in different contexts. PEOPLE
COMPUTER SCIENCE Data structure In Computer Science this term refers to the way data stored in a queue is processed. Each item in the queue is stored in a queue (''simpliciter'') data structure. The first data to be added to the queue will be the first data to be removed, then processing proceeds sequentially in the same order. This is typical behavior for a queue, but see also the LIFO and Stack algorithms. A typical data structure will look like struct fifo_node {
value_type value; }; class fifo {
{
front = front->next; return tmp; } queue(value) {
tempNode->value = value; back->next = tempNode; back = tempNode; } } (For information on the abstract data structure, and an implementation in Scheme , see Queue . For details of a common implementation, see Circular Buffer .) Popular UNIX systems include a sys/queue.h C/C++ header file which provides macros usable by applications necessary to create FIFO queues. Pipes In computing environments that support the Pipes And Filters model for Interprocess Communication , a FIFO is another name for a Named Pipe . ELECTRONICS FIFOs are used commonly in Electronic circuits for buffering and flow control. In hardware form a FIFO primarily consists of a set of read and write pointers, storage and control logic. Storage may be SRAM, flip-flops, latches or any other suitable form of storage. For FIFOs of non-trivial size a dual-port SRAM is usually used where one port is used for writing and the other is used for reading. A synchronous FIFO is a FIFO where the same clock is used for both reading and writing. An asynchronous FIFO uses different clocks for reading and writing. Asynchronous FIFOs introduce Metastability issues. A common implementation of an asychronous FIFO uses a Gray Code (or any unit distance code) for the read and write pointers to ensure reliable flag generation. One further note concerning flag generation is that one must necessarily use pointer arithmetic to generate flags for asynchronous FIFO implementations. Conversely, one may use either a "leaky bucket" approach or pointer arithmetic to generate flags in synchronous FIFO implementations. Examples of FIFO status flags include: full, empty, almost full, or almost empty. SEE ALSO
|
|
|