Computer Systems A Programmer's Perspective Second Edition

Well-written computer programs tend to exhibit good
locality
. That is, they tend
to reference data items that are near other recently referenced data items, or
that were recently referenced themselves. This tendency, known as the
principle
of locality
, is an enduring concept that has enormous impact on the design and
performance of hardware and software systems.
 
 
Section 6.2 Locality

587
Locality is typically described as having two distinct forms:
temporal locality
and
spatial locality
. In a program with good temporal locality, a memory location
that is referenced once is likely to be referenced again multiple times in the near
future. In a program with good spatial locality, if a memory location is referenced
once, then the program is likely to reference a nearby memory location in the near
future.
 
Programmers should understand the principle of locality because, in general,

programs with good locality run faster than programs with poor locality
. All levels
of modern computer systems, from the hardware, to the operating system, to
application programs, are designed to exploit locality. At the hardware level, the
principle of locality allows computer designers to speed up main memory accesses
by introducing small fast memories known as
cache memories
that hold blocks of
the most recently referenced instructions and data items. At the operating system
level, the principle of locality allows the system to use the main memory as a cache
of the most recently referenced chunks of the virtual address space. Similarly, the
operating system uses main memory to cache the most recently used disk blocks in
the disk file system. The principle of locality also plays a crucial role in the design
of application programs. For example, Web browsers exploit temporal locality by
caching recently referenced documents on a local disk. High-volume Web servers
hold recently requested documents in front-end disk caches that satisfy requests
for these documents without requiring any intervention from the serve.
 
 
 
 

locality的更多相关文章

  1. [Algorithm] 局部敏感哈希算法(Locality Sensitive Hashing)

    局部敏感哈希(Locality Sensitive Hashing,LSH)算法是我在前一段时间找工作时接触到的一种衡量文本相似度的算法.局部敏感哈希是近似最近邻搜索算法中最流行的一种,它有坚实的理论 ...

  2. Locality Sensitive Hash 局部敏感哈希

    Locality Sensitive Hash是一种常见的用于处理高维向量的索引办法.与其它基于Tree的数据结构,诸如KD-Tree.SR-Tree相比,它较好地克服了Curse of Dimens ...

  3. 局部敏感哈希-Locality Sensitive Hashing

    局部敏感哈希 转载请注明http://blog.csdn.net/stdcoutzyx/article/details/44456679 在检索技术中,索引一直须要研究的核心技术.当下,索引技术主要分 ...

  4. LSH(Locality Sensitive Hashing)原理与实现

    原文地址:https://blog.csdn.net/guoziqing506/article/details/53019049 LSH(Locality Sensitive Hashing)翻译成中 ...

  5. spark - Locality Level

    这几个值在图中代表 task 的计算节点和 task 的输入数据的节点位置关系 PROCESS_LOCAL: 数据在同一个 JVM 中,即同一个 executor 上.这是最佳数据 locality. ...

  6. Locality Sensitive Hashing,LSH

    1. 基本思想 局部敏感(Locality Senstitive):即空间中距离较近的点映射后发生冲突的概率高,空间中距离较远的点映射后发生冲突的概率低. 局部敏感哈希的基本思想类似于一种空间域转换思 ...

  7. Spark笔记之数据本地性(data locality)

    一.什么是数据本地性(data locality) 大数据中有一个很有名的概念就是"移动数据不如移动计算",之所以有数据本地性就是因为数据在网络中传输会有不小的I/O消耗,如果能够 ...

  8. HBase基于region数目和data locality来balance regions

    1.  在Hbase的运维过程中,我们经常需要做如下操作: 移动 regionserver 到其他的 regionserver group中 下线一台机器 增加一台机器 移动 table 到其他 re ...

  9. 局部敏感哈希-Locality Sensitivity Hashing

    一. 近邻搜索 从这里开始我将会对LSH进行一番长篇大论.因为这只是一篇博文,并不是论文.我觉得一篇好的博文是尽可能让人看懂,它对语言的要求并没有像论文那么严格,因此它可以有更强的表现力. 局部敏感哈 ...

随机推荐

  1. 前端调试效率低?试试这10个“Chrome开发者工具”使用技巧

    摘要:今天给大家分享一些使用“Chrome开发者工具”的小技巧.包括调试,优化页面渲染速度等.希望能提升Web开发人员的工作效率. 今天给大家分享一些使用“Chrome开发者工具”的小技巧.包括调试, ...

  2. sql server系统表详细说明

    sysaltfiles  主数据库 保存数据库的文件 syscharsets  主数据库字符集与排序顺序 sysconfigures 主数据库 配置选项 syscurconfigs 主数据库当前配置选 ...

  3. 使用NGUINGUI的相关介绍

    1.3  使用NGUI 要使用NGUI,需要首先为游戏项目导入NGUI插件资源,然后再创建UI Root对象,在这以后才可以添加各种UI控件,下面本节会详解介绍这些知识本文选自NGUI从入门到实战! ...

  4. ARP侦查工具Netdiscover

    ARP侦查工具Netdiscover Netdiscover是一个主动/被动的ARP侦查工具.该工具在不使用DHCP的无线网络上非常有用.使用Netdiscover工具可以在网络上扫描IP地址,ARP ...

  5. android sdk 安装排错

    如果你遇到了消息为“Failed to fetch URL…” 的错误提示,那么你需要将HTTPS方式改为HTTP方式,方法如下: 碰到这样错误,请按下边的操作. 1)在菜单选择Tools—Optio ...

  6. [leetCode][003] Intersection of Two Linked Lists

    [题目]: Write a program to find the node at which the intersection of two singly linked lists begins. ...

  7. 关于 Xcode bitcode 错误

    关于 bitcode 报错 有类似上图关于bitcode的错误用以下方法解决:

  8. Hibernate工作原理及为什么要用?

    Hibernate工作原理及为什么要用? 原理:1.通过Configuration().configure();读取并解析hibernate.cfg.xml配置文件2.由hibernate.cfg.x ...

  9. myeclipse 8.5最新注册码

    myeclipse 8.5最新注册码(过期时间到2016年) Subscriber:huazai          Subscription Code:uLR8ZC-855550-6156585630 ...

  10. 冒泡排序:一百以内十个随机数放入数组排序并打印<

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...