You are on page 1of 1

For other uses, see Abstraction (disambiguation).

A typical vision of a computer architecture as a series of abstraction layers: h


ardware, firmware, assembler, kernel, operating system and applications (see als
o [1]).
In computing, an abstraction layer or abstraction level is a way of hiding the i
mplementation details of a particular set of functionality, allowing the separat
ion of concerns to facilitate interoperability and platform independence. Softwa
re models that use layers of abstraction include the OSI 7-layer model for compu
ter network protocols, the OpenGL graphics drawing library, and the byte stream
input/output (I/O) model originated by Unix and adopted by MS-DOS, Linux, and mo
st other modern operating systems.
In the Unix operating system, most types of input and output operations are cons
idered to be streams of bytes read from a device or written to a device. This st
ream of bytes model is used for file I/O, socket I/O, and terminal I/O in order
to provide device independence. In order to read and write to a device at the ap
plication level, the program calls a function to open the device which may be a
real device such as a terminal or a virtual device such as a network port or a f
ile in a file system. The device's physical characteristics are mediated by the
operating system which in turn presents an abstract interface that allows the pr
ogrammer to read and write bytes from/to the device. The operating system then p
erforms the actual transformation needed to read and write the stream of bytes t
o the device.
Most graphics libraries such as OpenGL provide an abstract graphical device mode
l as an interface. The library is responsible for translating the commands provi
ded by the programmer into the specific device commands needed to draw the graph
ical elements and objects. The specific device commands for a plotter are differ
ent from the device commands for a CRT monitor but the graphics library hides th
e implementation and device dependent details by providing an abstract interface
which provides a set of primitives that are generally useful for drawing graphi
cal objects.
In computer science, an abstraction level is a generalization of a model or algo
rithm, away from any specific implementation. These generalizations arise from b
road similarities that are best encapsulated by models that express similarities
present in various specific implementations. The simplification provided by a g
ood abstraction layer allows for easy reuse by distilling a useful concept or me
taphor so that situations where it may be accurately applied can be quickly reco
gnized.
A good abstraction will generalize that which can be made abstract; while allowi
ng specificity where the abstraction breaks down and its successful application
requires customization to each unique requirement or problem.
Frequently abstraction layers can be composed into
vels. The ISO-OSI networking model comprises seven
r of the OSI ISO networking model encapsulates and
the needs of much digital communications, thereby
e associated engineering solutions.

a hierarchy of abstraction le
abstraction layers. Each laye
addresses a different part of
reducing the complexity of th

A famous aphorism of David Wheeler reads: All problems in computer science can b
e solved by another level of indirection;[2] this is often deliberately mis-quot
ed with "abstraction" substituted for "indirection". It is also sometimes misatt
ributed to Butler Lampson. Kevlin Henney's corollary to this is, "...except for
the problem of too many layers of indirection."

You might also like