Underrun
   HOME

TheInfoList



OR:

In
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
, buffer underrun or buffer underflow is a state occurring when a
buffer Buffer may refer to: Science * Buffer gas, an inert or nonflammable gas * Buffer solution, a solution used to prevent changes in pH * Lysis buffer, in cell biology * Metal ion buffer * Mineral redox buffer, in geology Technology and engineeri ...
used for communicating between two devices or processes is fed with
data Data ( , ) are a collection of discrete or continuous values that convey information, describing the quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpreted for ...
at a lower speed than the data is being read from it. This requires the program reading from the buffer to pause its processing while the buffer refills. Having to deal with such situations can cause undesired and sometimes serious side effects because the data being buffered is often not suited for stop-start access of this kind. In terms of
concurrent programming Concurrent means happening at the same time. Concurrency, concurrent, or concurrence may refer to: Law * Concurrence, in jurisprudence, the need to prove both ''actus reus'' and ''mens rea'' * Concurring opinion (also called a "concurrence"), a ...
, a buffer underrun can be considered a form of
resource starvation In computer science, resource starvation is a problem encountered in concurrent computing where a process is perpetually denied necessary resources ''Resource'' refers to all the materials available in our environment which are Technology, te ...
. The term as defined above is distinct from buffer overflow, a condition where a portion of memory forms a buffer of a fixed size yet is filled with more than that amount of data, thus overwriting memory locations outside of the allocated chunk. However, buffer underrun and underflow are also sometimes used to mean buffer underwrite, where a program is tricked into writing data into memory locations before the beginning of the buffer, overriding potential data there such as permission bits.


General causes and solutions

Buffer ''underruns'' are often the result of transitory issues involving the ''connection'' which is being buffered: either a connection between two processes, with others competing for CPU time, or a physical link, with devices competing for
bandwidth Bandwidth commonly refers to: * Bandwidth (signal processing) or ''analog bandwidth'', ''frequency bandwidth'', or ''radio bandwidth'', a measure of the width of a frequency range * Bandwidth (computing), the rate of data transfer, bit rate or thr ...
. The simplest guard against such problems is to increase the size of the buffer—if an incoming
data stream In connection-oriented communication, a data stream is the transmission of a sequence of digitally encoded signals to convey information. Typically, the transmitted symbols are grouped into a series of packets. Data streaming has become u ...
needs to be read at 1 bit per second, a buffer of 10 bits would allow the connection to be blocked for up to 10 seconds before failing, whereas one of 60 bits would allow a blockage of up to a minute. However, this requires more memory to be available to the process or device, which can be expensive. It assumes that the buffer starts full—requiring a potentially significant pause before the reading process begins—and that it will always remain full unless the connection is currently blocked. If the data does not, on average, arrive ''faster'' than it is needed, any blockages on the connection will be cumulative; "dropping" one bit every minute on a hypothetical connection with a 60-bit buffer would lead to a buffer underrun if the connection remained active for an hour. In real-time applications, a large buffer size also increases the latency between input and output, which is undesirable in low-latency applications such as video conferencing.


CD and DVD recording issues

Buffer underruns can cause serious problems during CD/DVD burning, because once the writing is started, it cannot stop and resume flawlessly; thus the pause needed by the underrun can cause the data on the disc to become invalid. Since the buffer is generally being filled from a relatively slow source, such as a
hard disk A hard disk drive (HDD), hard disk, hard drive, or fixed disk is an electro-mechanical data storage device that stores and retrieves digital data using magnetic storage with one or more rigid rapidly rotating hard disk drive platter, pla ...
or another CD/DVD, a heavy CPU or memory load from other concurrent tasks can easily exhaust the capacity of a small buffer. Therefore, a technique called buffer underrun protection was implemented by various individual CD/DVD writer vendors, under various
trademark A trademark (also written trade mark or trade-mark) is a form of intellectual property that consists of a word, phrase, symbol, design, or a combination that identifies a Good (economics and accounting), product or Service (economics), service f ...
s, such as
Plextor Plextor (styled PLEXTOR) ( zh, 浦科特; ) is a Taiwanese (formerly Japanese) consumer electronics brand, best known for solid-state drives and optical disc drives. Company The brand name Plextor was used for all products manufactured by the El ...
BurnProof,
Nero Nero Claudius Caesar Augustus Germanicus ( ; born Lucius Domitius Ahenobarbus; 15 December AD 37 – 9 June AD 68) was a Roman emperor and the final emperor of the Julio-Claudian dynasty, reigning from AD 54 until his ...
UltraBuffer, Yamaha SafeBurn, JustLink, and Seamless Link. With this technique, the laser is indeed able to stop writing for any amount of time and resume when the buffer is full again. The gap between successive writes is extremely small. Another way to protect against the problem, when using
rewritable media Computer data storage or digital data storage is a technology consisting of computer components and recording media that are used to retain digital data. It is a core function and fundamental component of computers. The central processin ...
(
CD-RW RW (Compact Disc-Rewritable) is a digital media, digital optical disc data storage device, storage format introduced by Ricoh in 1997. A CD-RW compact disc (CD-RWs) can be written, read, erased, and re-written. CD-RWs, as opposed to CDs, r ...
,
DVD-RW DVD recordable and DVD rewritable are a collection of optical disc formats that can be written to by a DVD recorder and by computers using a DVD writer. The "recordable" discs are write-once read-many (WORM) media, where as "rewritable" discs a ...
,
DVD-RAM DVD-RAM (DVD Random Access Memory) is a DVD-based disc specification presented in 1996 by the DVD Forum, which specifies rewritable DVD-RAM media and the appropriate DVD writers. DVD-RAM media have been used in computers as well as camcorde ...
), is to use the UDF file system, which organizes data in smaller " packets", referenced by a single, updated address table, which can therefore be written in shorter bursts.


Multimedia playback

If the
framebuffer A framebuffer (frame buffer, or sometimes framestore) is a portion of random-access memory (RAM) containing a bitmap that drives a video display. It is a memory buffer containing data representing all the pixels in a complete video frame. Mode ...
of the
graphics controller A graphics card (also called a video card, display card, graphics accelerator, graphics adapter, VGA card/VGA, video adapter, display adapter, or colloquially GPU) is a computer expansion card that generates a feed of graphics output to a displa ...
is not updated, the picture of the computer screen will appear to hang until the buffer receives new data. Many video player programs (e.g.
MPlayer MPlayer is a free and open-source media player software application. It is available for Linux, OS X and Microsoft Windows. Versions for OS/2, Syllable Desktop, Syllable, AmigaOS, MorphOS and AROS Research Operating System are also available. A ...
) feature the ability to drop frames if the system is overloaded, intentionally allowing a buffer underrun to keep up the tempo. The buffer in an audio controller is a
ring buffer In computer science, a circular buffer, circular queue, cyclic buffer or ring buffer is a data structure that uses a single, fixed-size buffer as if it were connected end-to-end. This structure lends itself easily to buffering data streams. Ther ...
. If an underrun occurs and the audio controller is not stopped, it will either keep repeating the sound contained in the buffer, or output silence depending on the implementation. Such effect is commonly referred to as "machinegun" or Max Headroom stuttering effect. This happens if the
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
hangs during audio playback. An error handling routine (e.g.
blue screen of death The blue screen of death (BSoD) or blue screen error, blue screen, fatal error, bugcheck, and officially known as a stop erroris a fatal system error, critical error screen displayed by the Microsoft Windows operating systems to indicate a cr ...
) may eventually stop the audio controller. Intentionally imitating this audio glitch during the creation of music or sound art, either by manually splicing audio or re-triggering samples, or by using plugins, is called the
Stutter edit The stutter edit, or stutter effect, is the rhythmic repetition of small fragments of audio, occurring as the common 16th note repetition, but also as 64th notes and beyond, with layers of digital signal processing operations in a rhythmic fashion ...
.


References

{{DEFAULTSORT:Buffer Underrun Data transmission