[转]为什么叫随机存取存储器(Random Access Memory)?

        首先, RAM翻译为随机存取存储器, 是个垃圾翻译, 能说点人话吗?  依据我的经验, 如果不明白一个东西是什么, 那就去找英文资料来看,  英文适合描述准确的东西, 而中文, 适合描述不清不楚的东西, 比如暧昧。 

        来看看wiki怎么说:

 

In computer sciencerandom access (more precisely and more generally called direct access) is the ability to access any item of data from a population of addressable elements roughly as easily and efficiently as any other, no matter how many elements may be in the set. It is typically contrasted to sequential access.

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 data item is arbitrary in the sense that no matter which item is sought, all that is needed to find it, is its address, that is to say, the coordinates at which it is located, such as its row and column (or its track and record number on a 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.[1]However, soon the term "direct access" gained favour because one could directly retrieve a record, no matter what its position might be.[2] 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.[1]

A typical illustration of this distinction is to compare an ancient 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). 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 structures, direct access implies the ability to access any entry in a list in constant time (independent of its position in the list and of list's size). Very few data structures can guarantee this, other than arrays (and related structures like dynamic arrays). Direct access is required, or at least valuable, in many algorithms such as binary searchinteger sorting or certain versions of sieve of Eratosthenes.[3]

Other data structures, such as linked lists, sacrifice direct access to permit efficient inserts, deletes, or reordering of data. Self-balancing binary search trees 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.

 

       所以说, RAM的存取时间与数据的位置无关,  这一点跟磁盘就很不一样(还记得之前博文中的磁盘原理吧! 那就是个机械运动, 与位置有关)。对了, 我们还说过磁带, 一个新的磁带, 如果你想听中间的第5首歌, 怎么办? 凉拌! 只能快进,还不一定准, 何其悲哉。这就是所谓的顺序存取, 与本文说的随机存取相对。 

      不多说。

 

        

 


---------------------
作者:stpeace
来源:CSDN
原文:https://blog.csdn.net/stpeace/article/details/78146665
版权声明:本文为作者原创文章,转载请附上博文链接!
内容解析By:CSDN,CNBLOG博客文章一键转载插件

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值