HOME

TheInfoList



OR:

Sequential access is a term describing a group of elements (such as data in a memory array or a disk file or on magnetic tape data storage) being accessed in a predetermined, ordered
sequence In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members (also called ''elements'', or ''terms''). The number of elements (possibly infinite) is called ...
. It is the opposite of
random access Random access (more precisely and more generally called direct access) is the ability to access an arbitrary element of a sequence in equal time or any datum from a population of addressable elements roughly as easily and efficiently as any othe ...
, the ability to access an arbitrary element of a sequence as easily and efficiently as any other at any time. Sequential access is sometimes the only way of accessing the data, for example if it is on a tape. It may also be the access method of choice, for example if all that is wanted is to process a sequence of data elements in order.


Definition

There is no consistent definition in
computer science Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to Applied science, practical discipli ...
of sequential access or sequentiality. In fact, different sequentiality definitions can lead to different sequentiality quantification results. In spatial dimension, request size, stride distance, backward accesses, re-accesses can affect sequentiality. For temporal sequentiality, characteristics such as multi-stream and inter-arrival time threshold has impact on the definition of sequentiality.''Cheng Li et al.'
Assert(!Defined(Sequential I/O))
HotStorage. 2014
In
data structure In computer science, a data structure is a data organization, management, and storage format that is usually chosen for efficient access to data. More precisely, a data structure is a collection of data values, the relationships among them, ...
s, a data structure is said to have sequential access if one can only visit the values it contains in one particular order. The canonical example is the
linked list In computer science, a linked list is a linear collection of data elements whose order is not given by their physical placement in memory. Instead, each element points to the next. It is a data structure consisting of a collection of nodes which ...
. Indexing into a list that has sequential access requires O(''n'') time, where ''n'' is the index. As a result, many algorithms such as quicksort and
binary search In computer science, binary search, also known as half-interval search, logarithmic search, or binary chop, is a search algorithm that finds the position of a target value within a sorted array. Binary search compares the target value to the ...
degenerate into bad algorithms that are even less efficient than their naive alternatives; these algorithms are impractical without
random access Random access (more precisely and more generally called direct access) is the ability to access an arbitrary element of a sequence in equal time or any datum from a population of addressable elements roughly as easily and efficiently as any othe ...
. On the other hand, some algorithms, typically those that do not have index, require only sequential access, such as mergesort, and face no penalty.


See also

* Direct-access storage device * Queued sequential access method


References

{{reflist Computer memory