hardware memory management

Upload: krraguram

Post on 05-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 Hardware Memory Management

    1/17

    Click to edit Master subtitle style

    8/17/12

    Memory managementHardware

  • 7/31/2019 Hardware Memory Management

    2/17

    8/17/12

    Introduction

    With the evolution of Multiprogramming concepts the process ofstoring programs in memory increased,

    So it become necessary

    To move programs and data around the memory.

    Vary the amount of memory in use by a program.

    To prevent a program from changing the other.

    Thus to meet these requirements in multiprogramming led to theidea of a dedicated MEMORY MANAGEMENT HARDWARE.

  • 7/31/2019 Hardware Memory Management

    3/17

    8/17/12

    MEMORY MANAGEMENT system

    A memory management system is a collection of hardware andsoftware procedures for managing various programs residing in thememory.

    The memory management software is a part of the overalloperating system available in a computer system.

    Basic components of memory management hardware are

    A facility for dynamic memory relocation that mapslogical memory reference into physical memoryaddress.

    A Provision for sharing common program stored inmemory by different users.

    Protection of information against unauthorized accessbetween users and preventing users from changingoperating system functions.

  • 7/31/2019 Hardware Memory Management

    4/17

    8/17/12

    Dynamic storage Relocation

    Fixed page size used in virtual memory system causes certain

    difficulties with respect to program size and logical structure ofprograms.

    Thus it is more convenient to divide the programs and data intological parts called SEGMENTS.

    A Segment is a set of logically related instructions or data elementsassociated with a given name.

    Segments can be generated by the programmer or by theoperating system.

    Examples for Segments

    Subroutines

    User programs

    Array of data, etc.

  • 7/31/2019 Hardware Memory Management

    5/17

    8/17/12

    Sharing Programs

    Sharing of common programs is the integral part of amultiprogramming system

    Example:

    Other System programs residing in the memory are shared byall users without having to produce multiple copies

    FORTRAN FORTRANCOMPILE

    R

    MEMOR

    Y

    USER

    USER

    USE

    R

  • 7/31/2019 Hardware Memory Management

    6/17

    8/17/12

    Protection

    Protection mainly deals with the protection of one program from

    unwanted interactions with another.

    Example:

    One users unauthorized copying of another usersprogram.

    Protection also deals with the prevention of occasional user fromperforming operating system functions by interrupting the orderlyinstallation procedure.

    The secrecy of certain programs must be kept from unauthorizedpersonnel to prevent abuses in the confidential activities of anorganization.

  • 7/31/2019 Hardware Memory Management

    7/17

    8/17/12

    Segmented-page mapping

    The function of the memory management unit is to map logicaladdresses into physical addresses similar to the virtual memorymanagement concept.

    The address generated by a segmented program is called a Logicaladdress.

    The logical address space use variable-length segments.

    i.e. the length of the program is allowed to grow and contractaccording to the needs of program to be extracted.

  • 7/31/2019 Hardware Memory Management

    8/17

    8/17/12Logical address to physical address

  • 7/31/2019 Hardware Memory Management

    9/17

    8/17/12Segments and blocks

  • 7/31/2019 Hardware Memory Management

    10/17

    8/17/12

    Segment and page table mapping

  • 7/31/2019 Hardware Memory Management

    11/17

    8/17/12

    Translation look-aside buffer

    The mapping of both logical address and physical address is doneby two lookup tables in the memory.

    But This led to decrease in the speed of the system significantly,because the two table model has to refer to memory three timeswhile the conventional system requires only one reference to the

    memory.

    To avoid this speed decrease, a fast associative memory is used tostore the most recently referenced table entry.

    This Associative memory is normally referred as TRANSLATIONLOOK-ASIDE BUFFER.

  • 7/31/2019 Hardware Memory Management

    12/17

    8/17/12Translation look-aside buffer(TLB)

  • 7/31/2019 Hardware Memory Management

    13/17

    8/17/12Example for tlb

  • 7/31/2019 Hardware Memory Management

    14/17

    8/17/12

    Memory protection

    The Access rights of interest that are used for protecting the

    programs residing in the memory are

    Full Read and Write Privileges

    Read only (Write Protection)

    Execute only (Program Protection)

    System only (Operating system Protection)

  • 7/31/2019 Hardware Memory Management

    15/17

  • 7/31/2019 Hardware Memory Management

    16/17

    8/17/12

    Memory protection

    Memory Protection can be assigned to the physical address or thelogical address.

    The protection of memory using the physical address is done byassigning each block of memory with a protection bit which showsthe type of access allowed to that block.

    In Logical address the protection bit is added within the segmenttable or segment register of the memory management hardware.

  • 7/31/2019 Hardware Memory Management

    17/17

    8/17/12

    THANK YOU