Memory management Hardware

Click to edit Master subtitle style

8/17/12

Introduction

With the evolution of Multiprogramming concepts the process of storing 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 the idea of a dedicated MEMORY MANAGEMENT HARDWARE.

8/17/12

MEMORY MANAGEMENT system

A memory management system is a collection of hardware and software procedures for managing various programs residing in the memory. The memory management software is a part of the overall operating system available in a computer system. Basic components of memory management hardware are
Ø

A facility for dynamic memory relocation that maps logical memory reference into physical memory address. A Provision for sharing common program stored in memory by different users. Protection of information against unauthorized access between users and preventing users from changing operating system functions.

Ø

Ø

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 of programs. Thus it is more convenient to divide the programs and data into logical parts called SEGMENTS. A Segment is a set of logically related instructions or data elements associated with a given name. Segments can be generated by the programmer or by the operating system. Examples for Segments
Ø Ø Ø

Subroutines User programs Array of data, etc.

8/17/12

Sharing Programs

Sharing of common programs multiprogramming system

is

the

integral

part

of

a

Example:

USE R USE R

FORTRA N

programs residing in the memory are shared by all users without having to produce multiple copies

USE Other System R

N COMPILE R

MEMOR Y FORTRA

8/17/12

Protection

Protection mainly deals with the protection of one program from unwanted interactions with another. Example: One user’s unauthorized copying of another user’s

program.

Protection also deals with the prevention of occasional user from performing operating system functions by interrupting the orderly installation procedure. The secrecy of certain programs must be kept from unauthorized personnel to prevent abuses in the confidential activities of an organization.

8/17/12

Segmented-page mapping

The function of the memory management unit is to map logical addresses into physical addresses similar to the virtual memory management concept. The address generated by a segmented program is called a Logical address. The logical address space use variable-length segments. i.e. the length of the program is allowed to grow and contract according to the needs of program to be extracted.

8/17/12

Logical address to physical address 8/17/12

Segments and blocks 8/17/12

Segment and page table mapping
8/17/12

Translation look-aside buffer

The mapping of both logical address and physical address is done by 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 times while the conventional system requires only one reference to the memory. To avoid this speed decrease, a fast associative memory is used to store the most recently referenced table entry. This Associative memory is normally referred as TRANSLATION LOOK-ASIDE BUFFER.

8/17/12

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

Example for tlb 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)

8/17/12

Full Read and Write Privileges: Full Read and Write Privileges are given to program that execute their own instructions. Read only (Write Protection): They are useful for sharing some system programs which can be read by all users but no writing is allowed. Execute only (Program Protection): It protects program from being copied. It allow the user to execute a program but the program or the information about the program cannot be copied. System only (Operating system Protection): Portions of operating system will be available in the memory. Thus these programs must be made inaccessible to unauthorized users. Thus all operating system program will contain a descriptor of os protection code to avoid unauthorized users from accessing the operating system segments.

8/17/12

Memory protection

Memory Protection can be assigned to the physical address or the logical address. The protection of memory using the physical address is done by assigning each block of memory with a protection bit which shows the type of access allowed to that block. In Logical address the protection bit is added within the segment table or segment register of the memory management hardware.

8/17/12

THANK YOU

8/17/12

Sign up to vote on this title
UsefulNot useful