Memory Addressing Byte ( 8 bits) – smallest addressable unit in memory Bytes: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27.

Slides:



Advertisements
Similar presentations
CPU Structure and Function
Advertisements

Memory Protection: Kernel and User Address Spaces  Background  Address binding  How memory protection is achieved.
Computer Organization and Architecture
Computer System Overview
Intel MP.
Computer Organization and Architecture
Computer Organization and Architecture
OS Memory Addressing.
Architectural Support for OS March 29, 2000 Instructor: Gary Kimura Slides courtesy of Hank Levy.
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
1 Hardware and Software Architecture Chapter 2 n The Intel Processor Architecture n History of PC Memory Usage (Real Mode)
Operating System Support Focus on Architecture
1 Computer System Overview OS-1 Course AA
1 Process Description and Control Chapter 3. 2 Process Management—Fundamental task of an OS The OS is responsible for: Allocation of resources to processes.
1 CSIT431 Introduction to Operating Systems Welcome to CSIT431 Introduction to Operating Systems In this course we learn about the design and structure.
Computer System Overview
Computer Organization and Architecture
1 RISC Machines l RISC system »instruction –standard, fixed instruction format –single-cycle execution of most instructions –memory access is available.
Pentium Addressing Modes
Mainframe Architecture - Evolution Overview  360 Architecture bit GP regs - 8 FP regs at 32 bits or 4 FP regs at 64 bits - 24 bit real addressing.
Overview von Neumann Model Components of a Computer Some Computer Organization Models The Computer Bus An Example Organization: The LC-3.
Group 5 Alain J. Percial Paula A. Ortiz Francis X. Ruiz.
Layers and Views of a Computer System Operating System Services Program creation Program execution Access to I/O devices Controlled access to files System.
UNIT 2 Memory Management Unit and Segment Description and Paging
Operating System A program that controls the execution of application programs An interface between applications and hardware 1.
Review of Memory Management, Virtual Memory CS448.
Computer Systems Overview. Page 2 W. Stallings: Operating Systems: Internals and Design, ©2001 Operating System Exploits the hardware resources of one.
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
VAX-11/780 – A Virtual Address Extension to the DEC PDP-11 Family ( Author : W.D.Strecker ) By Padmaja chowti.
Computer System Overview Chapter 1. Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users.
Instruction Set Architecture
Machine Instruction Characteristics
Chapter 5 Operating System Support. Outline Operating system - Objective and function - types of OS Scheduling - Long term scheduling - Medium term scheduling.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Cosc 2150: Computer Organization Chapter 6, Part 2 Virtual Memory.
CIS250 OPERATING SYSTEMS Memory Management Since we share memory, we need to manage it Memory manager only sees the address A program counter value indicates.
The Structure of Processes (Chap 6 in the book “The Design of the UNIX Operating System”)
Virtual Memory Expanding Memory Multiple Concurrent Processes.
1 CSE451 Architectural Supports for Operating Systems Autumn 2002 Gary Kimura Lecture #2 October 2, 2002.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Lecture 1: Review of Computer Organization
Structure and Role of a Processor
Instruction Sets. Instruction set It is a list of all instructions that a processor can execute. It is a list of all instructions that a processor can.
LECTURE 12 Virtual Memory. VIRTUAL MEMORY Just as a cache can provide fast, easy access to recently-used code and data, main memory acts as a “cache”
OS Memory Addressing. Architecture CPU – Processing units – Caches – Interrupt controllers – MMU Memory Interconnect North bridge South bridge PCI, etc.
Machine dependent Assembler Features
Structure of Processes
Microcomputer Programming
Lecture 14 Virtual Memory and the Alpha Memory Hierarchy
Computer System Overview
Computer-System Architecture
Module 2: Computer-System Structures
Operating Systems.
Architectural Support for OS
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Module 2: Computer-System Structures
CSE451 Virtual Memory Paging Autumn 2002
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Computer System Overview
Architectural Support for OS
Paging and Segmentation
CS703 - Advanced Operating Systems
Chapter 11 Processor Structure and function
Module 2: Computer-System Structures
Module 2: Computer-System Structures
Structure of Processes
Presentation transcript:

Memory Addressing Byte ( 8 bits) – smallest addressable unit in memory Bytes: Halfword: (16 bits) 16 bits on Halfword boundary (lsb of address = 0) Words: bits on Word boundary (ls 2 bits of address = 0) Doublewords: bits on Doubleword boundary (ls 3 bits of address = 0) Quadwords Quadword 4 Octowords Octoword 5

Memory Addressing Virtual Address- created by Processor... The logical address is an address in the address space of the current process Real Address Created by the Memory Translation mechanism..Virtual to real A real address identifies a location in real storage. When a real address is used for an access to main storage, it is converted, by means of prefixing, to an absolute address. (usually associated with an LPAR) Absolute Address An absolute address is the address assigned to a main-storage location. Multiple LPARS (each with a real address space) have blocks In the Absolute address space. In an SMP configuration, each Processor's real page zero has a different absolute address See fig Mem 1

Virtual Memory Virtual Address A virtual address identifies a location in virtual storage. When used for an access main storage, it is translated to either (a) to a real address, which is then converted by prefixing to an absolute address, or (b) directly to an absolute address History 360 -> 24 bit real (original models did not have virtual) 370 -> 24 bit real and 24 bit virtual addressing then 31 bit virtual then 26 bit real (page table entry size limit)

370 Address Translation An Address space defined by a Segment Table Designation(STD) STD is loaded into Control Register (CR) 1 - see Fig (1.5) Break virtual address into Seg#, Page# and offset in page Control Register 1 points to Segment table.. Seg# selects entry in Seg table- it refers to a Page Table Page# selects entry in Page Table Page table entry contains real page #

Dual Address Space Capability - Two address spaces defines by CR1 and CR 7 CR1 is primary, CR7 is secondary - Designed to allow to operate on 2 address spaces and Pass control between address spaces - Bit in PSW controls the address space mode Instructions are in the Primary space Operands are in Primary or Secondary space (Bit in PSW) - Special Instructions move data between address spaces,change bit in PSW, and transfer control between address spaces - Address spaces identified by an Address Space Number (ASN)

The Program Status Word (PSW)  -Contains PC plus lots of additional Information IO interrupt Enable Protect Key Condition Code User or Kernel Mode Address Translation Interrupt Information when interrupted -Originally 64 bits long, System z expands to 128 See fig 1.7

Memory Addressing Feature Evolution  Dual address space (DAS, 1981) ► Added secondary address space (designated by CR7) - CR1 now designates primary address space - instructions to switch between addressing modes - Added instructions to move between address spaces ► Added PSW address-space-control (ASC, bit 16) - 0 = primary space, 1 = secondary space 370 / Extended Architecture (XA, 1984) ► Added basic-addressing-mode (B) control (PSW.32) ► Allows switching between 24- and 31-bit addressing modes

Memory Addressing Feature Evolution(2) Advanced-space facility (ASF, 1989) ►Added home address space (CR13) ►Added access-register translation ►Extended PSW address-space control (bits 16-17) 00 = primary, 01 = AR, 10 = secondary, 11 = home ►Added linkage stack ►Added numerous instructions for linkage-stack manipulation z/Architecture (2000) ► Added extended-addressing mode (E) control (PSW.31) ► Allows switching between 24/31-bit modes and 64-bit mode

Memory Addressing Feature Evolution(3) Advanced-space facility (ASF, 1989) -Access Registers (AR) AR-specified virtual address- a virtual address to be translated by means of an access-register-specified address-space- Logical addresses are treated as AR-specified addresses when in the access-register mode. -Home Virtual Address Home virtual address- a virtual address to be translated by means of the home address-space. Logical addresses and instruction addresses are treated as home virtual addresses when in the home-space mode.

Memory Addressing Feature Evolution(4) Advanced-space facility (ASF, 1989) The home address space represents the initial address space - the space where the control blocks exist, and, - if other address spaces are called, the space that gets the blame (i.e., terminated) should the task encounter an unrecoverable error. ASF also introduced a linkage stack. -This is a push-down stack - used by authorized and unauthorized programs - avoids the need for classic saving of registers

Memory Addressing Feature Evolution(5) Advanced-space facility (ASF, 1989) In 2000, z/Architecture added 64-bit addressing resulting in the addition of the extended-addressing-mode control in the PSW. Some Architecture info: PSW: Access key (4 bits), problem/supervisor-state (1 bit), address-space control (2 bits), and addressing mode control (2 bits) CR1: Primary address-space-control element (ASCE) CR7: Secondary ASCE

Memory Addressing Feature Evolution(6) Advanced-space facility (ASF, 1989) Example..see Fig 1.8 Program Calls A->B ->C -> D ->E ->F ->B...R returns to F then F ->G Data Movement AS3 ↔ AS2 then AS3 ↔ AS1 then AS3 ↔ AS4

Memory Protection Memory Storage keys See fig Mem2 -For each 4k real Memory Page a 6 bit entry/page contains Storage Key required to Access page A Fetch Protection bit (F) A Change bit (C) A Reference bit (R) -Key Protection Key in PSW must match Key in storage array -except Key 0 in PSW … go anywhere

Memory Protection(2) - In Access Register Mode An Address space can be made “Fetch only” via a bit in the access llist entry - in zArchitecture – a Protect bit in Page table and Segment Table provide “Fetch” Protgection - Low Real Addresses are protected to insure Interrupt areas.

Memory Addressing – 24 bit vs 31 bit - Compatibility issues with 24 and 31 bit addressing Instructions that clear high order byte e.g. Load Address LA 26 bit real requires changes to Page Table (2 more bits) BAL passes CC in bits 0 and replace with BAS BSM Branch and set Addressing mode set old mode in high order bit BASSM Branch and save and Set Addressing Mode (Minimize code changes)

ESA/370 and ESA/390 ESA/370 -added 16 (32 bit) Access registers -Added 2 new modes: Access register and Home Access reg provide Add. Space (by GPR) for operands Home address space uses CR 13 as base reg for Segment Table - see fig Mem2.5 for address translation changes - see fig Mem 4 for Control register assignments

Z Architecture Goals Complete 64 Bit 64 bit GPRs and Operands 64 bit Control Regs 64 bit Virtual Addressing 64 bit Real addressing Complete application compatibility (including 31 bit to 64 bit inter-operation) Mostly complete compatibility for Middle-ware Features easy for programmers to exploit

Z Architecture Compatibility -Separate operand addressing from operand data width e.g. 64 bit data with 31 bit addressing 64 bit addressing with 32 bit data can mix 32 bit data with 64 bit data Bit in PSW selects mode - Requires more instructions ( about 100) Most instructions are “non-Modal” i.e. addressing mode does not effect execution of the instruction - Extra Instructions don't fit in OP code, need an extension byte see fig Mem6

Z Architecture 64 bit Address Space 24 bit “line” to handle 360 apps (“dusty deck”) 31 bit “bar” See fig 3a. For address pace layout 64 Bit address translation... See Fig 3 Address Space Control Element (ASCE) Variable number of layers for translation (2 - 4) ==> Segment Table (ST) ==> Page Table(PT) ==> Region Third Level(RTL)==>ST==>PT ==> Region Second Level(RSL)==>RTL => ST => PT ==> Region First Level (RFL)=>RSL ==>RTL => ST => PT

Z Architecture Interrupt Types IO SVC EXT e.g. Timer Machine Check Program Check e.g. page fault Restart e.g. SIGP from another process Cause PSW Swap at low memory Address Interrupt code provides additional Information e.g. uuu

Z Architecture PSW Format See fig Mem7 Instruction Types See fig Mem8 Low memory Layout See fig Mem9

Z Architecture Goals

Z Architecture Goals

Z Architecture Goals

Z Architecture Goals