Beruflich Dokumente
Kultur Dokumente
Buffers
Buffers are often used in conjunction with I/O to hardware, such as disk
drives, sending or receiving data to or from a network, or playing sound
on a speaker. A line to a rollercoaster in an amusement park shares many
similarities. People who ride the coaster come in at an unknown and
often variable pace, but the roller coaster will be able to load people in
bursts (as a coaster arrives and is loaded). The queue area acts as a
buffer: a temporary space where those wishing to ride wait until the ride
is available. Buffers are usually used in a FIFO (first in, first out)
method, outputting data in the order it arrived.
Because the processes of reading and writing data to a disk are relatively
slow, many programs keep track of data changes in a buffer and then
copy the buffer to a disk. For example, word processors employ a buffer
to keep track of changes to files. Then when you save the file, the word
processor updates the disk file with the contents of the buffer. This is
much more efficient than accessing the file on the disk each time you
make a change to the file.
Note that because your changes are initially stored in a buffer, not on the
disk, all of them will be lost if the computer fails during an editing
session. For this reason, it is a good idea to save your file periodically.
Most word processors automatically save files at regular intervals.
Buffers are commonly used when burning data onto a compact disc,
where the data is transferred to the buffer before being written to the
disc.
Routers
A router is a device that forwards data packets across computer
networks. Routers perform the data "traffic directing" functions on the
Internet. A router is connected to two or more data lines from different
networks. When data comes in on one of the lines, the router reads the
address information in the packet to determine its ultimate destination.
Then, using information in its routing table, it directs the packet to the
next network on its journey or drops the packet. A data packet is
typically passed from router to router through the networks of the
Internet until it gets to its destination computer unless the source IP is on
a private network