MEMORY ORGANIZTION & ADDRESSING Presented by: Bshara Choufany.

Slides:



Advertisements
Similar presentations
MEMORY popo.
Advertisements

Part IV: Memory Management
Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
Allocating Memory.
Room: E-3-31 Phone: Dr Masri Ayob TK 2123 COMPUTER ORGANISATION & ARCHITECTURE Lecture 5: CPU and Memory.
Chapter 9 – Real Memory Organization and Management
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Memory Management -3 CS 342 – Operating Systems Ibrahim Korpeoglu Bilkent.
©Brooks/Cole, 2003 Chapter 5 Computer Organization.
Memory Organization.
Memory Management Chapter 5.
Chapter 9 Virtual Memory Produced by Lemlem Kebede Monday, July 16, 2001.
Computer Organization Cs 147 Prof. Lee Azita Keshmiri.
MEMORY MANAGEMENT By KUNAL KADAKIA RISHIT SHAH. Memory Memory is a large array of words or bytes, each with its own address. It is a repository of quickly.
Computer Organization and Architecture
Virtual Memory Deung young, Moon ELEC 5200/6200 Computer Architecture and Design Lectured by Dr. V. Agrawal Lectured by Dr. V.
 2004 Deitel & Associates, Inc. All rights reserved. Chapter 9 – Real Memory Organization and Management Outline 9.1 Introduction 9.2Memory Organization.
CS1104-8Memory1 CS1104: Computer Organisation Lecture 8: Memory
Computer Architecture Part III-C: Memory Access and Management.
5.1 Chaper 4 Central Processing Unit Foundations of Computer Science  Cengage Learning.
VIRTUAL MEMORY. Virtual memory technique is used to extents the size of physical memory When a program does not completely fit into the main memory, it.
Memory Systems Architecture and Hierarchical Memory Systems
Invitation to Computer Science 5th Edition
SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally MEMORYMANAGEMNT.
Memory Management Chapter 7.
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Lecture 19: Virtual Memory
1 CSCI 2510 Computer Organization Memory System I Organization.
Memory Management. Roadmap Basic requirements of Memory Management Memory Partitioning Basic blocks of memory management –Paging –Segmentation.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
OPERATING SYSTEMS Lecture 3: we will explore the role of the operating system in a computer Networks and Communication Department 1.
1 Memory Management Chapter 7. 2 Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated to ensure a reasonable.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
Chapter 4 MARIE: An Introduction to a Simple Computer.
1 Memory Management Chapter 7. 2 Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated to ensure a reasonable.
Basic Memory Management 1. Readings r Silbershatz et al: chapters
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU).
Computer Systems. Bits Computers represent information as patterns of bits A bit (binary digit) is either 0 or 1 –binary  “two states” true and false,
Informationsteknologi Wednesday, October 3, 2007Computer Systems/Operating Systems - Class 121 Today’s class Memory management Virtual memory.
CS6502 Operating Systems - Dr. J. Garrido Memory Management – Part 1 Class Will Start Momentarily… Lecture 8b CS6502 Operating Systems Dr. Jose M. Garrido.
Computer operation is of how the different parts of a computer system work together to perform a task.
Chapter 7 Memory Management Eighth Edition William Stallings Operating Systems: Internals and Design Principles.
Chapter 11 System Performance Enhancement. Basic Operation of a Computer l Program is loaded into memory l Instruction is fetched from memory l Operands.
 2004 Deitel & Associates, Inc. All rights reserved. Chapter 9 – Real Memory Organization and Management Outline 9.1 Introduction 9.2Memory Organization.
Main Memory Main memory – –a collection of storage locations, –each with a unique identifier called the address. Word- –Data are transferred to and from.
CH (5) Computer Organization
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني System buses.
Memory management The main purpose of a computer system is to execute programs. These programs, together with the data they access, must be in main memory.
CS161 – Design and Architecture of Computer
Memory Hierarchy Ideal memory is fast, large, and inexpensive
Computer Organization
Memory Management.
Non Contiguous Memory Allocation
Chapter 2 Memory and process management
Memory COMPUTER ARCHITECTURE
CS161 – Design and Architecture of Computer
Chapter 9 – Real Memory Organization and Management
CSI 400/500 Operating Systems Spring 2009
Main Memory Management
CMSC 611: Advanced Computer Architecture
Computer Architecture
Unit 6: Real Memory organization management
Chapter 8: Memory management
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Lecture 3: Main Memory.
Memory Organization.
Registers.
Chapter 5 Computer Organization
Computer Organization & Architecture 3416
Operating Systems: Internals and Design Principles, 6/E
Presentation transcript:

MEMORY ORGANIZTION & ADDRESSING Presented by: Bshara Choufany

Outline: Introduction Memory Allocation Memory Hierarchy Memory Addressing

1- Introduction: Memory is divided into tiers: - Main Memory * Relatively expensive * Relatively small capacity * High-performance - Second Storage * Cheap * Large Capacity * Slow

-Memory can be organized in two ways 1.One process uses the entire space 2.Each process gets its own partition in memory * Dynamically allocated * Statically allocated

 Dynamic allocated memory is the allocation of memory storage for use in a computer program during the run time of that program  Static allocated memory refers to the process of allocating memory at compile-time before the associated program is executed  Dynamically allocated memory exists until it is released wither explicitly by the programmer, exiting a block, or by the garbage collector.  Static memory allocation has a fixed duration

Memory Allocation Contiguous vs. Noncontiguous Memory Allocation Ways of organizing programs in memory – Contiguous allocation Program must exist as a single block of contiguous addresses Sometimes it is impossible to find a large enough block Low overhead – Noncontiguous allocation Program divided into chunks called segments Each segment can be placed in different part of memory Easier to find “holes” in which a segment will fit Increased number of processes that can exist simultaneously in memory offsets the overhead incurred by this technique

Single-User Contiguous Memory Allocation One user had control of entire machine – Resources did not need to be shared – Originally no operating systems on computer Programmer wrote code to perform resource management – Input-Output Control Systems (IOCS) Libraries of prewritten code to manage I/O devices Precursor to operating systems

Single-user contiguous memory allocation

- Memory Hierarchy

Memory Hierarchy Main memory – Should store currently needed program instructions and data only Secondary storage – Stores data and programs that are not actively needed Cache memory – Extremely high speed – Usually located on processor itself – Most-commonly-used data copied to cache for faster access – Small amount of cache still effective for boosting performance

Memory Hierarchy

- Classification System of Memory

Recall: - Two major types of Memory: * RAM (Read Access Memory) i.Perform ii.Read iii.Write * ROM (Read-Only Memory) i.A Programmable logic device ii.Perform only the read operation

Registers associated with the memory system: Both RAM and ROM can be characterized by two registers and a number of control signals. For Example: Consider a memory of 2ⁿ words, each having M bits. Then, the Memory Address Register (MAR) is an n-bit register used to specify the memory address The Memory Buffer Register (MBR) is an M-bit register used to hold data to be written to the memory or just read from the memory. This register is also called Memory Data Register (MDR)

- Organization of Memory Units  A basic memory unit provides the ability to store and access a fixed number of bits.  Each bit within such a unit may be selected individually for reading and writing.  Memory units are usually distributed as bit slices.  If A chip can store 64K bits, each chip will be used to store one bit each from 64K different locations, rather than a complete byte from 8K different locations

Bit Slice Memory Organizition

- Memory as a linear Array Consider a byte-addressable memory with N bytes of memory. Byte memory [N]; // Address ranges from 0 to (N-1) Let’s say for example that these notes were written on a computer with 384MB of memory. 384MB=384*2²⁰ bytes, since memory is byte addressable, N= 384* = 402,653,184 Also note that: 384 MB = ( )*2 20 =

- Memory Addressing  A memory address is an identifier for a memory location, at which a computer program or a hardware device can store data and later retrieve it.  It’s a binary number from a finite monotonically sequence that uniquely describes the memory itself.  In modern byte-addressable computers, each address identifies a single byte of storage

Samples of Memory Addressing

- Addressing Strategies 1- Coordinate-Addressed: Memory is accessed by supplying a number (address) which is used directly to identify a particular physical storage location. Data is copied into or out the selected location. Coordinate-Addressed are typically constructed as a collection of individual units such as chips, each capable of storing a limited number of bits.

2- Content-Addressed: Also called Associative. It is accessed by supplying a data value for certain portions (fields) of a storage location, rather than the physical address of that location. The memory automatically identifies any locations that match the given data, and the contents of these locations may be accessed.

- Two registers are associated with the Content- Addressed Memory (CAM):  MASK  DATA  Each register has the size of one full word  Each word includes some comparison logic and one or more TAG bits.  Each set of tag bits forms a bit-slice register, with one bit for each word of the memory

A Content-Addressable Memory Includes a set of words, each consisting of a number of bits. Common for such a memory to have very large word sizes, often 100 bits or more.

- Types of operations that may be possible on associative memories: READ & WRITE SEARCH: Identify words that match a particular pattern COUNT MATCHES: This operation indicates how many tag bits are set. MASKED WRITE: Write data from the data register into only the bits selected by the mask register

MULTIWRITE: Write data into all tagged words at the same time. STORE: Write a data word into any empty location, rather than a selected one. ADDRESS OPERATIONS: Determine the coordinate address of a tagged word, or read or write by address. TAG OPERATIONS: Set, clear or read a tag register, or copy among multiple tag registers.

Example of Search Register Setup The above figure shows these two registers set to search for all words that contain the pattern 1101 in bits 10 through 7, and 010 in bits 3 through 1.

- Two was to assign memory units to the address space: 1 – BANK ADDRESSING:  Uses the high-order bits of the address to select units  Each unit represents a consecutive sequence of addresses  Bank switching assigns different units to parts of memory likely to be used for different purposes 2 - INTERLEAVING:  uses the low-order bits of the address to select units.  consecutive memory locations are assigned to different memory units.  When it is desired to read a consecutive sequence at high speed, such as pipelined instruction fetching or block data transfer to disk, the transfers can be effectively overlapped since they will tend to come from independent units.

Figure 1- Bank Selection Figure 2- Interleaving

- Memory Management Strategies Strategies divided into several categories – Fetch strategies Demand or anticipatory Decides which piece of data to load next – Placement strategies Decides where in main memory to place incoming data – Replacement strategies Decides which data to remove from main memory to make more space

Course: CS 147 Computer Architecture Instructor: Dr. Sin-Min Lee Date: 03/19/09