SlideShare a Scribd company logo
1 of 21
Download to read offline
© 2004 IBM Corporation
IBM Systems and Technology Group
1 z/VM CP Storage Management Education Series
Address Spaces on z/Architecture
An Introduction
Dan FitzGerald
Friday, October 16, 2009 (Revision 2)
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series2
Outline
Concept Review
Background
Introducing the ASCE
Translation Modes and Space Types
Address Space Numbers
Additional Comments
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series3
Concept Review
In this portion of the presentation, we will introduce concepts
that will come up in our discussion on address spaces
Most of this information is available from the z/Architecture
Principles of Operation, Chapter 3.
We will present this information as a series of definitions.
This is intended to be a fast reference/review only, so please
consult the Principles of Operation or your Connections
Coach if you have any questions.
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series4
Concept Review
 Dynamic Address Translation (DAT) – The process via which we
handle virtual memory
 DAT Tables – Hierarchical set of tables used for dynamic address
translation (includes segment tables and page tables)
 Program Status Word (PSW) – Contains information used in the
execution of the currently active program
 Access Registers – A special set of 16 registers, one for each
general purpose register. For use with AR Mode
 AR Mode – Uses the access registers when doing base
displacement addressing
Determined by bits 16 and 17 of the PSW
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series5
Concept Review
 There are four different types of addresses that we will encounter
in z/Architecture. They are known as “absolute”, “real”, “virtual” and
“logical.” Additionally, we will hear about “effective” addresses.
Absolute Address – The address assigned to a main storage
location
These are the unmodified, “actual” addresses of bytes in storage.
Real Address – Identifies a location in real storage
This is an address that we will use for an access to storage
As we will see, real addresses are converted by prefixing into absolute
addresses.
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series6
Concept Review
Virtual Address – Identifies a location in virtual storage
– When a virtual address is used for an access to main storage, it is
translated by means of dynamic address translation (DAT) to a real
address, which is then prefixed to an absolute address.
Logical Address – Your addresses are translated within
whatever mode the architecture is set to
– In z/Architecture, a specific address mode can be set.
For example, your machine may be set to “real address mode”. In this
case, your logical addresses will be treated as real addresses.
Unless otherwise specified, the storage-operand addresses for most
instructions are logical addresses.
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series7
Concept Review
Effective Address – The address which exists before any
transformation by dynamic address translation or any
prefixing is performed
Instruction Address – Addresses used to fetch instructions
from storage
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series8
Background

What is an address space and how do we use it?

Address Space – A set of virtual addresses, together with the
specific transformation parameters which allow each number
to be associated with a byte location in memory.

The Principles of Operation defines a “virtual address” as a
consecutive sequence of integer numbers

There are multiple distinct address spaces on your machine.
Therefore the “same” address can point to different locations,
depending on the address space

On z/Architecture, each process runs in its own address
space
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series9
Background

So, what kinds of address spaces are there and how are
address spaces used?

Each guest has at least one address space

Guests also have the ability to define their own address spaces.

Guest-defined address spaces are known as data spaces.

There are also system address spaces, which CP has
created for its own purposes

The system address space is used by CP to keep track of shared data

The system execution space is the address space that CP “lives” in

Virtual free address space is used for a certain kind of free storage

PTRM space is used to keep track of pageable PGMBKs (a PGMBK is
used for managing pages in virtual storage)
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series10
Introducing the ASCE

When a virtual address is used by a CPU to access main
storage, two things happen:
1. The virtual address is converted to a real address via DAT
2. This real address is converted to an absolute address through the use of
prefixing.

So now the big question: how do we switch between those
different address spaces?

We use something called an ASCE, which can be conceptualized as a
“key” to a given address space.

Address-Space Control Element (ASCE) – 8-byte field containing
the origin and length (“designator”) of the highest-level DAT table
for a specific address space.

The ASCE can be considered to point to the root of the DAT tables for
an address space.
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series11
Introducing the ASCE

An address space's ASCE can be found for use by DAT in
one of three ways:

In a control register

As specified by an access register

Given a “real-space” designation

When the ASCE is given by a real-space designation, then
the DAT is to translate the virtual address by treating it as a
real address

No DAT tables are used in this case
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series12
Introducing the ASCE

Since there are multiple address spaces on the system, it
follows that there must be multiple ASCEs

The ASCE that DAT chooses to use at a given time is
determined by the translation mode specified in the PSW.

There are four translation modes:

Primary-space mode

Secondary-space mode

Access-register mode

Home-space more
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series13
Translation Modes and Space Types

When the CPU is in primary or secondary-space mode...

The CPU can translate virtual addresses belonging the primary or
secondary address spaces, respectively

When the CPU is in access-register mode...

It can translate virtual addresses of up to 16 address spaces

These address spaces are the primary address space and the
individual address spaces specified in up to 15 access-registers

Why only 15 access registers? The assembler automatically interprets
any base reference to (general or access) register 0 as a reference to
the value 0.

When the CPU is in the home-space mode...

it can translate virtual addresses of the home address space
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series14
Translation Modes and Space Types

Recall that each running process has its own address space

This can be one of three types which tie in with the aforementioned
translation modes: primary, secondary and home

The primary address space is the base address space for the
process

The secondary address space is an additional address space
to be used that isn't the primary address space

The home address space contains the principle control
blocks that represent a given process. For more information,
refer to Chapter 5 of Principles of Operation.
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series15
Translation Modes and Space Types

It is likely that you will spend most of your time working in
CMS. Normal CMS users by default only have one address
space, the primary one.

This is pointed to by the “BASE” ASCBK

Other guests (Linux, DB2, special CMS setups) may be
running multiple address spaces

These additional address spaces will have ASCBKs “chained” to
(pointed to by) the BASE ASCBK
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series16
Address Space Numbers

Address Space Number – Each address space may be
assigned an Address Space Number, or ASN, by the Control
Program

The ASN uses a two-level table structure in main storage

The ASN 2nd
-level entry contains information about the given address
space

If the ASN 2nd
-table entry is marked valid, it contains the
ASCE that defines that address space
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series17
Address Space Numbers

Usually, the ASNs for the primary and secondary address
spaces are assigned positions in control registers

The ASN for the primary address space can be found in bits 48-63 of
control register 4

The ASN for the secondary address space can be found in bits 48-63
of control register 3

The ASN for the home address space is not assigned a position in a
control register

In access register mode, the situation is a bit different...

An AR with a value of 0 specifies a primary address space; its
associated ASCE is in control register 1

An AR with a value of 1 specifies a secondary address space; its
associated ASCE is in control register 7

An AR containing any other value designates an entry in the access
list.
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series18
Address Space Numbers

Access List – A table in which each entry contains the real
address of an ASN 2nd
-table entry

When an AR x specifies an access list entry n, the ASN 2nd
-table entry
that n points to will contain the ASCE for the address space of x
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series19
Address Space Numbers

The ASN 2nd
-table entry contains a sequence number
(ASTESN)

The ASTESN may be used to control storage references to
its associated address space

These come into play when we're in AR mode and using the
access list

When the access list is used to perform a storage reference, an
ASTESN in the access list entry is compared to the ASTESN in the
2nd
-table entry

These values must be equal; otherwise, an ASTE-sequence
exception is recognised
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series20
Address Space Numbers

The ASTESN allows an access list entry to be made
unusable if authorization is changed or the designated ASN
2nd
-table entry is reassigned to a different address space

In plain English: your ASN 2nd
-table entry may be reused. In which
case, it would have the same address

When we reuse these entries, the ASTESN in the ASN 2nd-table
entry is changed

Now consider an instruction is issued for an AR-mode
address space where access register x points to access list
entry n...

Let's say that n points to some 2nd
-table entry that has since been
reused

Now the ASTESN in n does not match the ASTESN in the 2nd
-table
entry; an ASTE-sequence exception is issued
IBM Systems and Technology Group
© 2004 IBM Corporation
10/16/09Revision 2z/VM CP Storage Management Education Series21
Additional Comments

In CP Storage Management, we only use the Primary
Address Space, the Home Address Space and AR-Mode

Additionally, you won't be using ASN translation or ASN
Authorization. As such, these topics have been omitted from
this presentation

More information on these can be found between pages 3-23 and 3-
31 of the Principles of Operation

More Related Content

What's hot

Multithreading
MultithreadingMultithreading
MultithreadingA B Shinde
 
Centralized shared memory architectures
Centralized shared memory architecturesCentralized shared memory architectures
Centralized shared memory architecturesGokuldhev mony
 
Computer Network - Network Layer
Computer Network - Network LayerComputer Network - Network Layer
Computer Network - Network LayerManoj Kumar
 
Race conditions
Race conditionsRace conditions
Race conditionsMohd Arif
 
Operating System-Process Scheduling
Operating System-Process SchedulingOperating System-Process Scheduling
Operating System-Process SchedulingShipra Swati
 
FTP - File Transfer Protocol
FTP - File Transfer ProtocolFTP - File Transfer Protocol
FTP - File Transfer ProtocolPeter R. Egli
 
Distributed operating system(os)
Distributed operating system(os)Distributed operating system(os)
Distributed operating system(os)Dinesh Modak
 
Levels of Virtualization.docx
Levels of Virtualization.docxLevels of Virtualization.docx
Levels of Virtualization.docxkumari36
 
Architecture of Mobile Computing
Architecture of Mobile ComputingArchitecture of Mobile Computing
Architecture of Mobile ComputingJAINIK PATEL
 
Operating system services 9
Operating system services 9Operating system services 9
Operating system services 9myrajendra
 
Single &Multi Core processor
Single &Multi Core processorSingle &Multi Core processor
Single &Multi Core processorJustify Shadap
 
System models in distributed system
System models in distributed systemSystem models in distributed system
System models in distributed systemishapadhy
 
Os structure
Os structureOs structure
Os structureMohd Arif
 
4-Taxonomy of virtualization.docx
4-Taxonomy of virtualization.docx4-Taxonomy of virtualization.docx
4-Taxonomy of virtualization.docxshruti533256
 

What's hot (20)

Multithreading
MultithreadingMultithreading
Multithreading
 
Centralized shared memory architectures
Centralized shared memory architecturesCentralized shared memory architectures
Centralized shared memory architectures
 
Computer Network - Network Layer
Computer Network - Network LayerComputer Network - Network Layer
Computer Network - Network Layer
 
Race conditions
Race conditionsRace conditions
Race conditions
 
System calls
System callsSystem calls
System calls
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
Operating System-Process Scheduling
Operating System-Process SchedulingOperating System-Process Scheduling
Operating System-Process Scheduling
 
FTP - File Transfer Protocol
FTP - File Transfer ProtocolFTP - File Transfer Protocol
FTP - File Transfer Protocol
 
Parallel processing
Parallel processingParallel processing
Parallel processing
 
Evolution of os
Evolution of osEvolution of os
Evolution of os
 
scheduling
schedulingscheduling
scheduling
 
Distributed operating system(os)
Distributed operating system(os)Distributed operating system(os)
Distributed operating system(os)
 
Levels of Virtualization.docx
Levels of Virtualization.docxLevels of Virtualization.docx
Levels of Virtualization.docx
 
Architecture of Mobile Computing
Architecture of Mobile ComputingArchitecture of Mobile Computing
Architecture of Mobile Computing
 
Operating system services 9
Operating system services 9Operating system services 9
Operating system services 9
 
Single &Multi Core processor
Single &Multi Core processorSingle &Multi Core processor
Single &Multi Core processor
 
System models in distributed system
System models in distributed systemSystem models in distributed system
System models in distributed system
 
Virtual memory ppt
Virtual memory pptVirtual memory ppt
Virtual memory ppt
 
Os structure
Os structureOs structure
Os structure
 
4-Taxonomy of virtualization.docx
4-Taxonomy of virtualization.docx4-Taxonomy of virtualization.docx
4-Taxonomy of virtualization.docx
 

Viewers also liked

Desktop Linux - Part 1, Basics
Desktop Linux - Part 1, BasicsDesktop Linux - Part 1, Basics
Desktop Linux - Part 1, BasicsDaniel FitzGerald
 
Process' Virtual Address Space in GNU/Linux
Process' Virtual Address Space in GNU/LinuxProcess' Virtual Address Space in GNU/Linux
Process' Virtual Address Space in GNU/LinuxVarun Mahajan
 
Mainframe
MainframeMainframe
Mainframeshivas
 
See->Sort->Sketch : Pen & Paper Tools to get from Research to Design : IA Sum...
See->Sort->Sketch : Pen & Paper Tools to get from Research to Design : IA Sum...See->Sort->Sketch : Pen & Paper Tools to get from Research to Design : IA Sum...
See->Sort->Sketch : Pen & Paper Tools to get from Research to Design : IA Sum...Kate Rutter
 
Mainframe Architecture & Product Overview
Mainframe Architecture & Product OverviewMainframe Architecture & Product Overview
Mainframe Architecture & Product Overviewabhi1112
 
How to Write a Research Paper
How to Write a Research Paper How to Write a Research Paper
How to Write a Research Paper Jamaica Olazo
 
Writing A Research Paper In 10 Easy Steps
Writing A Research Paper In 10 Easy StepsWriting A Research Paper In 10 Easy Steps
Writing A Research Paper In 10 Easy Stepslauren
 

Viewers also liked (9)

Desktop Linux - Part 1, Basics
Desktop Linux - Part 1, BasicsDesktop Linux - Part 1, Basics
Desktop Linux - Part 1, Basics
 
Process' Virtual Address Space in GNU/Linux
Process' Virtual Address Space in GNU/LinuxProcess' Virtual Address Space in GNU/Linux
Process' Virtual Address Space in GNU/Linux
 
Mainframe
MainframeMainframe
Mainframe
 
See->Sort->Sketch : Pen & Paper Tools to get from Research to Design : IA Sum...
See->Sort->Sketch : Pen & Paper Tools to get from Research to Design : IA Sum...See->Sort->Sketch : Pen & Paper Tools to get from Research to Design : IA Sum...
See->Sort->Sketch : Pen & Paper Tools to get from Research to Design : IA Sum...
 
Mainframe Architecture & Product Overview
Mainframe Architecture & Product OverviewMainframe Architecture & Product Overview
Mainframe Architecture & Product Overview
 
Thesis on film studio
Thesis on film studioThesis on film studio
Thesis on film studio
 
Mainframe
MainframeMainframe
Mainframe
 
How to Write a Research Paper
How to Write a Research Paper How to Write a Research Paper
How to Write a Research Paper
 
Writing A Research Paper In 10 Easy Steps
Writing A Research Paper In 10 Easy StepsWriting A Research Paper In 10 Easy Steps
Writing A Research Paper In 10 Easy Steps
 

Similar to Address Spaces Education

Linux memorymanagement
Linux memorymanagementLinux memorymanagement
Linux memorymanagementpradeepelinux
 
System Z operating system
System Z operating systemSystem Z operating system
System Z operating systemArpana shree
 
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)Nicolas Brousse
 
Workshop: Deploy a Deep Learning Framework on Amazon ECS
Workshop: Deploy a Deep Learning Framework on Amazon ECSWorkshop: Deploy a Deep Learning Framework on Amazon ECS
Workshop: Deploy a Deep Learning Framework on Amazon ECSAmazon Web Services
 
CICS TS for z/VSE Update including CICS connectivity options
CICS TS for z/VSE Update including CICS connectivity optionsCICS TS for z/VSE Update including CICS connectivity options
CICS TS for z/VSE Update including CICS connectivity optionsIBM
 
A Step By Step Guide To Put DB2 On Amazon Cloud
A Step By Step Guide To Put DB2 On Amazon CloudA Step By Step Guide To Put DB2 On Amazon Cloud
A Step By Step Guide To Put DB2 On Amazon CloudDeepak Rao
 
Amazon elastic compute cloud
Amazon elastic compute cloudAmazon elastic compute cloud
Amazon elastic compute cloudkavyagaur3
 
Leveraging Open Source to Manage SAN Performance
Leveraging Open Source to Manage SAN PerformanceLeveraging Open Source to Manage SAN Performance
Leveraging Open Source to Manage SAN Performancebrettallison
 
Memory : operating system ( Btech cse )
Memory : operating system ( Btech cse )Memory : operating system ( Btech cse )
Memory : operating system ( Btech cse )HimanshuSharma1389
 
Elastic Compute Cloud (EC2) on AWS Presentation
Elastic Compute Cloud (EC2) on AWS PresentationElastic Compute Cloud (EC2) on AWS Presentation
Elastic Compute Cloud (EC2) on AWS PresentationKnoldus Inc.
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formatsMazin Alwaaly
 
Clabby Analytics Research Report: The Mainframe Virtualization Advantage
Clabby Analytics Research Report: The Mainframe Virtualization AdvantageClabby Analytics Research Report: The Mainframe Virtualization Advantage
Clabby Analytics Research Report: The Mainframe Virtualization AdvantageIBM India Smarter Computing
 
1 Describe different types of Assemblers.Assembly language.docx
 1 Describe different types of Assemblers.Assembly language.docx 1 Describe different types of Assemblers.Assembly language.docx
1 Describe different types of Assemblers.Assembly language.docxaryan532920
 
CDI debugger for embedded C/C+
CDI debugger for embedded C/C+CDI debugger for embedded C/C+
CDI debugger for embedded C/C+Teodor Madan
 
S104873 nas-sizing-jburg-v1809d
S104873 nas-sizing-jburg-v1809dS104873 nas-sizing-jburg-v1809d
S104873 nas-sizing-jburg-v1809dTony Pearson
 
CS304PC:Computer Organization and Architecture Session 12 Instruction Format...
CS304PC:Computer Organization and Architecture  Session 12 Instruction Format...CS304PC:Computer Organization and Architecture  Session 12 Instruction Format...
CS304PC:Computer Organization and Architecture Session 12 Instruction Format...Asst.prof M.Gokilavani
 

Similar to Address Spaces Education (20)

DAT Education
DAT EducationDAT Education
DAT Education
 
Prefixing Education
Prefixing EducationPrefixing Education
Prefixing Education
 
Linux memorymanagement
Linux memorymanagementLinux memorymanagement
Linux memorymanagement
 
System Z operating system
System Z operating systemSystem Z operating system
System Z operating system
 
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)
 
Workshop: Deploy a Deep Learning Framework on Amazon ECS
Workshop: Deploy a Deep Learning Framework on Amazon ECSWorkshop: Deploy a Deep Learning Framework on Amazon ECS
Workshop: Deploy a Deep Learning Framework on Amazon ECS
 
CICS TS for z/VSE Update including CICS connectivity options
CICS TS for z/VSE Update including CICS connectivity optionsCICS TS for z/VSE Update including CICS connectivity options
CICS TS for z/VSE Update including CICS connectivity options
 
A Step By Step Guide To Put DB2 On Amazon Cloud
A Step By Step Guide To Put DB2 On Amazon CloudA Step By Step Guide To Put DB2 On Amazon Cloud
A Step By Step Guide To Put DB2 On Amazon Cloud
 
Data conversion
Data conversionData conversion
Data conversion
 
Amazon elastic compute cloud
Amazon elastic compute cloudAmazon elastic compute cloud
Amazon elastic compute cloud
 
Leveraging Open Source to Manage SAN Performance
Leveraging Open Source to Manage SAN PerformanceLeveraging Open Source to Manage SAN Performance
Leveraging Open Source to Manage SAN Performance
 
Memory : operating system ( Btech cse )
Memory : operating system ( Btech cse )Memory : operating system ( Btech cse )
Memory : operating system ( Btech cse )
 
Elastic Compute Cloud (EC2) on AWS Presentation
Elastic Compute Cloud (EC2) on AWS PresentationElastic Compute Cloud (EC2) on AWS Presentation
Elastic Compute Cloud (EC2) on AWS Presentation
 
Diveinto AWS
Diveinto AWS Diveinto AWS
Diveinto AWS
 
Computer architecture instruction formats
Computer architecture instruction formatsComputer architecture instruction formats
Computer architecture instruction formats
 
Clabby Analytics Research Report: The Mainframe Virtualization Advantage
Clabby Analytics Research Report: The Mainframe Virtualization AdvantageClabby Analytics Research Report: The Mainframe Virtualization Advantage
Clabby Analytics Research Report: The Mainframe Virtualization Advantage
 
1 Describe different types of Assemblers.Assembly language.docx
 1 Describe different types of Assemblers.Assembly language.docx 1 Describe different types of Assemblers.Assembly language.docx
1 Describe different types of Assemblers.Assembly language.docx
 
CDI debugger for embedded C/C+
CDI debugger for embedded C/C+CDI debugger for embedded C/C+
CDI debugger for embedded C/C+
 
S104873 nas-sizing-jburg-v1809d
S104873 nas-sizing-jburg-v1809dS104873 nas-sizing-jburg-v1809d
S104873 nas-sizing-jburg-v1809d
 
CS304PC:Computer Organization and Architecture Session 12 Instruction Format...
CS304PC:Computer Organization and Architecture  Session 12 Instruction Format...CS304PC:Computer Organization and Architecture  Session 12 Instruction Format...
CS304PC:Computer Organization and Architecture Session 12 Instruction Format...
 

Address Spaces Education

  • 1. © 2004 IBM Corporation IBM Systems and Technology Group 1 z/VM CP Storage Management Education Series Address Spaces on z/Architecture An Introduction Dan FitzGerald Friday, October 16, 2009 (Revision 2)
  • 2. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series2 Outline Concept Review Background Introducing the ASCE Translation Modes and Space Types Address Space Numbers Additional Comments
  • 3. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series3 Concept Review In this portion of the presentation, we will introduce concepts that will come up in our discussion on address spaces Most of this information is available from the z/Architecture Principles of Operation, Chapter 3. We will present this information as a series of definitions. This is intended to be a fast reference/review only, so please consult the Principles of Operation or your Connections Coach if you have any questions.
  • 4. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series4 Concept Review  Dynamic Address Translation (DAT) – The process via which we handle virtual memory  DAT Tables – Hierarchical set of tables used for dynamic address translation (includes segment tables and page tables)  Program Status Word (PSW) – Contains information used in the execution of the currently active program  Access Registers – A special set of 16 registers, one for each general purpose register. For use with AR Mode  AR Mode – Uses the access registers when doing base displacement addressing Determined by bits 16 and 17 of the PSW
  • 5. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series5 Concept Review  There are four different types of addresses that we will encounter in z/Architecture. They are known as “absolute”, “real”, “virtual” and “logical.” Additionally, we will hear about “effective” addresses. Absolute Address – The address assigned to a main storage location These are the unmodified, “actual” addresses of bytes in storage. Real Address – Identifies a location in real storage This is an address that we will use for an access to storage As we will see, real addresses are converted by prefixing into absolute addresses.
  • 6. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series6 Concept Review Virtual Address – Identifies a location in virtual storage – When a virtual address is used for an access to main storage, it is translated by means of dynamic address translation (DAT) to a real address, which is then prefixed to an absolute address. Logical Address – Your addresses are translated within whatever mode the architecture is set to – In z/Architecture, a specific address mode can be set. For example, your machine may be set to “real address mode”. In this case, your logical addresses will be treated as real addresses. Unless otherwise specified, the storage-operand addresses for most instructions are logical addresses.
  • 7. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series7 Concept Review Effective Address – The address which exists before any transformation by dynamic address translation or any prefixing is performed Instruction Address – Addresses used to fetch instructions from storage
  • 8. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series8 Background  What is an address space and how do we use it?  Address Space – A set of virtual addresses, together with the specific transformation parameters which allow each number to be associated with a byte location in memory.  The Principles of Operation defines a “virtual address” as a consecutive sequence of integer numbers  There are multiple distinct address spaces on your machine. Therefore the “same” address can point to different locations, depending on the address space  On z/Architecture, each process runs in its own address space
  • 9. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series9 Background  So, what kinds of address spaces are there and how are address spaces used?  Each guest has at least one address space  Guests also have the ability to define their own address spaces.  Guest-defined address spaces are known as data spaces.  There are also system address spaces, which CP has created for its own purposes  The system address space is used by CP to keep track of shared data  The system execution space is the address space that CP “lives” in  Virtual free address space is used for a certain kind of free storage  PTRM space is used to keep track of pageable PGMBKs (a PGMBK is used for managing pages in virtual storage)
  • 10. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series10 Introducing the ASCE  When a virtual address is used by a CPU to access main storage, two things happen: 1. The virtual address is converted to a real address via DAT 2. This real address is converted to an absolute address through the use of prefixing.  So now the big question: how do we switch between those different address spaces?  We use something called an ASCE, which can be conceptualized as a “key” to a given address space.  Address-Space Control Element (ASCE) – 8-byte field containing the origin and length (“designator”) of the highest-level DAT table for a specific address space.  The ASCE can be considered to point to the root of the DAT tables for an address space.
  • 11. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series11 Introducing the ASCE  An address space's ASCE can be found for use by DAT in one of three ways:  In a control register  As specified by an access register  Given a “real-space” designation  When the ASCE is given by a real-space designation, then the DAT is to translate the virtual address by treating it as a real address  No DAT tables are used in this case
  • 12. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series12 Introducing the ASCE  Since there are multiple address spaces on the system, it follows that there must be multiple ASCEs  The ASCE that DAT chooses to use at a given time is determined by the translation mode specified in the PSW.  There are four translation modes:  Primary-space mode  Secondary-space mode  Access-register mode  Home-space more
  • 13. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series13 Translation Modes and Space Types  When the CPU is in primary or secondary-space mode...  The CPU can translate virtual addresses belonging the primary or secondary address spaces, respectively  When the CPU is in access-register mode...  It can translate virtual addresses of up to 16 address spaces  These address spaces are the primary address space and the individual address spaces specified in up to 15 access-registers  Why only 15 access registers? The assembler automatically interprets any base reference to (general or access) register 0 as a reference to the value 0.  When the CPU is in the home-space mode...  it can translate virtual addresses of the home address space
  • 14. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series14 Translation Modes and Space Types  Recall that each running process has its own address space  This can be one of three types which tie in with the aforementioned translation modes: primary, secondary and home  The primary address space is the base address space for the process  The secondary address space is an additional address space to be used that isn't the primary address space  The home address space contains the principle control blocks that represent a given process. For more information, refer to Chapter 5 of Principles of Operation.
  • 15. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series15 Translation Modes and Space Types  It is likely that you will spend most of your time working in CMS. Normal CMS users by default only have one address space, the primary one.  This is pointed to by the “BASE” ASCBK  Other guests (Linux, DB2, special CMS setups) may be running multiple address spaces  These additional address spaces will have ASCBKs “chained” to (pointed to by) the BASE ASCBK
  • 16. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series16 Address Space Numbers  Address Space Number – Each address space may be assigned an Address Space Number, or ASN, by the Control Program  The ASN uses a two-level table structure in main storage  The ASN 2nd -level entry contains information about the given address space  If the ASN 2nd -table entry is marked valid, it contains the ASCE that defines that address space
  • 17. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series17 Address Space Numbers  Usually, the ASNs for the primary and secondary address spaces are assigned positions in control registers  The ASN for the primary address space can be found in bits 48-63 of control register 4  The ASN for the secondary address space can be found in bits 48-63 of control register 3  The ASN for the home address space is not assigned a position in a control register  In access register mode, the situation is a bit different...  An AR with a value of 0 specifies a primary address space; its associated ASCE is in control register 1  An AR with a value of 1 specifies a secondary address space; its associated ASCE is in control register 7  An AR containing any other value designates an entry in the access list.
  • 18. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series18 Address Space Numbers  Access List – A table in which each entry contains the real address of an ASN 2nd -table entry  When an AR x specifies an access list entry n, the ASN 2nd -table entry that n points to will contain the ASCE for the address space of x
  • 19. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series19 Address Space Numbers  The ASN 2nd -table entry contains a sequence number (ASTESN)  The ASTESN may be used to control storage references to its associated address space  These come into play when we're in AR mode and using the access list  When the access list is used to perform a storage reference, an ASTESN in the access list entry is compared to the ASTESN in the 2nd -table entry  These values must be equal; otherwise, an ASTE-sequence exception is recognised
  • 20. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series20 Address Space Numbers  The ASTESN allows an access list entry to be made unusable if authorization is changed or the designated ASN 2nd -table entry is reassigned to a different address space  In plain English: your ASN 2nd -table entry may be reused. In which case, it would have the same address  When we reuse these entries, the ASTESN in the ASN 2nd-table entry is changed  Now consider an instruction is issued for an AR-mode address space where access register x points to access list entry n...  Let's say that n points to some 2nd -table entry that has since been reused  Now the ASTESN in n does not match the ASTESN in the 2nd -table entry; an ASTE-sequence exception is issued
  • 21. IBM Systems and Technology Group © 2004 IBM Corporation 10/16/09Revision 2z/VM CP Storage Management Education Series21 Additional Comments  In CP Storage Management, we only use the Primary Address Space, the Home Address Space and AR-Mode  Additionally, you won't be using ASN translation or ASN Authorization. As such, these topics have been omitted from this presentation  More information on these can be found between pages 3-23 and 3- 31 of the Principles of Operation