zoukankan      html  css  js  c++  java
  • Segmentation

    COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION

    There is another way in which addressable memory can be subdivided, known as
    segmentation. Whereas paging is invisible to the programmer and serves the purpose
    of providing the programmer with a larger address space, segmentation is usually
    visible to the programmer and is provided as a convenience for organizing programs
    and data and as a means for associating privilege and protection attributes with
    instructions and data.
    Segmentation allows the programmer to view memory as consisting of mul-
    tiple address spaces or segments. Segments are of variable, indeed dynamic, size.
    Typically, the programmer or the OS will assign programs and data to different seg-
    ments. There may be a number of program segments for various types of programs as
    well as a number of data segments. Each segment may be assigned access and usage
    rights. Memory references consist of a (segment number, offset) form of address.

    This organization has a number of advantages to the programmer over a non-
    segmented address space:

    1. It simplifies the handling of growing data structures. If the programmer does
    not know ahead of time how large a particular data structure will become, it
    is not necessary to guess. The data structure can be assigned its own segment,
    and the OS will expand or shrink the segment as needed.
    2. It allows programs to be altered and recompiled independently without
    requiring that an entire set of programs be relinked and reloaded. Again, this
    is accomplished using multiple segments.
    3. It lends itself to sharing among processes. A programmer can place a utility
    program or a useful table of data in a segment that can be addressed by other
    processes.
    4. It lends itself to protection. Because a segment can be constructed to contain a
    well-defined set of programs or data, the programmer or a system administra-
    tor can assign access privileges in a convenient fashion.

    These advantages are not available with paging, which is invisible to the pro-
    grammer. On the other hand, we have seen that paging provides for an efficient
    form of memory management. To combine the advantages of both, some systems
    are equipped with the hardware and OS software to provide both.

  • 相关阅读:
    Android Studio 快捷键(包含自定义)终极版
    C#开发模式——dll多级引用的问题
    WPF实现QQ群文件列表动画(二)
    WPF实现QQ群文件列表动画(一)
    VS2010Datatable查看器查看超时(Microsoft.VisualStudio.DebuggerVisualizers)
    WPF里ItemsControl的分组实现
    WPF触控程序开发(四)——MultiTouchVista_-_second_release_-_refresh_2的救赎
    WPF异步回调时回调函数如何获取异步函数产生的变量
    裸奔着造房子——对政府禁止采购Win8系统的一些看法
    全球征集-如何实现回文SQL的查询
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6219588.html
Copyright © 2011-2022 走看看