Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Random access
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Computer memory concept}} {{More citations needed|date=July 2011}} [[File:Random vs sequential access.svg|thumb|right|Random access compared to [[sequential access]]]] '''Random access''' (also called '''direct access''') is the ability to access an arbitrary element of a sequence in equal time or any datum from a population of [[Address space|addressable]] elements roughly as easily and efficiently as any other, no matter how many elements may be in the set. In [[computer science]] it is typically contrasted to [[sequential access]] which requires data to be retrieved in the order it was stored. For example, data might be stored notionally in a single sequence like a row, in two dimensions like rows and columns on a surface, or in multiple dimensions. However, given all the coordinates, a program can access each record about as quickly and easily as any other. In this sense, the choice of datum is arbitrary in the sense that no matter which item is sought, all that is needed to find it is its address, i.e. the coordinates at which it is located, such as its row and column (or its track and record number on a [[Drum memory|magnetic drum]]). At first, the term "random access" was used because the process had to be capable of finding records no matter in which sequence they were required.<ref name="Exposition1957">{{cite book|author=National Computer Conference and Exposition|title=Proceedings|url=https://books.google.com/books?id=lQQrAQAAIAAJ|access-date=2 October 2013|year=1957}}</ref> However, soon the term "direct access" gained favour because one could directly retrieve a record, no matter what its position might be.<ref name="Division1966">{{cite book|title=Introduction to IBM Direct-access Storage Devices and Organization Methods|url=https://books.google.com/books?id=i6vWAAAAMAAJ|access-date=2 October 2013|year=1966|publisher=International Business Machines Corporation|pages=3β}}</ref> The operative attribute, however, is that the device can access any required record immediately on demand. The opposite is [[sequential access]], where a remote element takes longer time to access.<ref>{{cite web | url=https://technet.microsoft.com/en-us/library/cc938619.aspx | title=Random and Sequential Data Access }}</ref> A typical illustration of this distinction is to compare an ancient [[scroll (parchment)|scroll]] (sequential; all material prior to the data needed must be unrolled) and the [[book]] (direct: can be immediately flipped open to any arbitrary [[page (paper)|page]]). A more modern example is a cassette tape (sequential — one must fast forward through earlier songs to get to later ones) and a [[CD]] (direct access — one can skip to the track wanted, knowing that it would be the one retrieved). In [[data structure]]s, direct access implies the ability to access any entry in a [[List (computing)|list]] in [[constant time]] (independent of its position in the list and of the list's size). Very few data structures can make this guarantee other than [[array data structure|array]]s (and related structures like [[dynamic array]]s). Direct access is required, or at least valuable, in many algorithms such as [[binary search]], [[integer sorting]], or certain versions of [[sieve of Eratosthenes]].<ref name="KNUTH1969">{{cite book|author=D. E. KNUTH|title=The Art of Computer Programming. Vol. 3. Sorting and Searching|url=https://books.google.com/books?id=ZQu9mgEACAAJ|access-date=2 October 2013|year=1969|publisher=Addison-Wesley|isbn=978-0-201-03803-3}}</ref> Other data structures, such as [[linked list]]s, sacrifice direct access to permit efficient inserts, deletes, or re-ordering of data. [[Self-balancing binary search tree]]s may provide an acceptable compromise, where access time is not equal for all members of a collection, but the maximum time to retrieve a given member grows only [[logarithmically]] with its size.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)