System i Architecture Part 1. Module 2



Similar documents
Introduction to Virtual Machines

Instruction Set Architecture (ISA)

Integrated and reliable the heart of your iseries system. i5/os the next generation iseries operating system

Building Applications Using Micro Focus COBOL

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

How do Users and Processes interact with the Operating System? Services for Processes. OS Structure with Services. Services for the OS Itself

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Introducción. Diseño de sistemas digitales.1

System Structures. Services Interface Structure

Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming

A Unified View of Virtual Machines

Operating System Overview. Otto J. Anshus

CPU Organization and Assembly Language

picojava TM : A Hardware Implementation of the Java Virtual Machine

Migrate AS 400 Applications to Windows, UNIX or Linux

Overview. CISC Developments. RISC Designs. CISC Designs. VAX: Addressing Modes. Digital VAX

Cloud Computing. Up until now

Operating System Structures

Chapter 3 Operating-System Structures

Computer Architecture Lecture 3: ISA Tradeoffs. Prof. Onur Mutlu Carnegie Mellon University Spring 2013, 1/18/2013

How To Write Portable Programs In C

Chapter 3: Operating-System Structures. Common System Components

Instruction Set Design

Migrate AS 400 Applications to Linux

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

Virtualization. Dr. Yingwu Zhu

Chapter 2 System Structures

The Java Virtual Machine and Mobile Devices. John Buford, Ph.D. Oct 2003 Presented to Gordon College CS 311

Software: Systems and Application Software

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Exam : IBM : Iseries Linux Soluton Sales v5r3

CPS221 Lecture: Operating System Structure; Virtual Machines

Virtualization. Jukka K. Nurminen

How to use PDFlib products with PHP

Example of Standard API

12. Introduction to Virtual Machines

Software: Systems and. Application Software. Software and Hardware. Types of Software. Software can represent 75% or more of the total cost of an IS.

Full and Para Virtualization

Jonathan Worthington Scarborough Linux User Group

Advantages of PML as an iseries Web Development Language

4.1 Introduction 4.2 Explain the purpose of an operating system Describe characteristics of modern operating systems Control Hardware Access

Virtualization and the U2 Databases

Data Sheet VISUAL COBOL WHAT S NEW? COBOL JVM. Java Application Servers. Web Tools Platform PERFORMANCE. Web Services and JSP Tutorials

OPERATING SYSTEM SERVICES

Computer Architectures

Processor Architectures

Kernel Types System Calls. Operating Systems. Autumn 2013 CS4023

LSN 2 Computer Processors

1. Overview of the Java Language

Java CPD (I) Frans Coenen Department of Computer Science

AS/400 System Overview

İSTANBUL AYDIN UNIVERSITY

Virtualization. Pradipta De

<Insert Picture Here> Oracle Database Support for Server Virtualization Updated December 7, 2009

Java on z/os. Agenda. Java runtime environments on z/os. Java SDK 5 and 6. Java System Resource Integration. Java Backend Integration

Introduction to MIPS Assembly Programming

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

Virtualization. Clothing the Wolf in Wool. Wednesday, April 17, 13

Virtualization for Cloud Computing

VMware Server 2.0 Essentials. Virtualization Deployment and Management

SAN Conceptual and Design Basics

CHAPTER 17: File Management

Virtual Machines. Adapted from J.S. Smith and R. Nair, VIRTUAL MACHINES, Morgan-Kaufmann Teodor Rus.

Lecture 1 Introduction to Android

Fall Lecture 1. Operating Systems: Configuration & Use CIS345. Introduction to Operating Systems. Mostafa Z. Ali. mzali@just.edu.

Chapter 2 Logic Gates and Introduction to Computer Architecture

IBM WebSphere Enterprise Service Bus, Version 6.0.1

find model parameters, to validate models, and to develop inputs for models. c 1994 Raj Jain 7.1

A REVIEW PAPER ON THE HADOOP DISTRIBUTED FILE SYSTEM

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-12: ARM

THREE YEAR DEGREE (HONS.) COURSE BACHELOR OF COMPUTER APPLICATION (BCA) First Year Paper I Computer Fundamentals

Intro to Embedded SQL Programming for ILE RPG Developers

Instruction Set Architecture (ISA) Design. Classification Categories

a storage location directly on the CPU, used for temporary storage of small amounts of data during processing.

PART IV Performance oriented design, Performance testing, Performance tuning & Performance solutions. Outline. Performance oriented design

Design Cycle for Microprocessors

Virtual Machines.

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Raima Database Manager Version 14.0 In-memory Database Engine

High performance ETL Benchmark

Virtual Machines and Their Architecture

An Easier Way for Cross-Platform Data Acquisition Application Development

Introduction to RISC Processor. ni logic Pvt. Ltd., Pune

Arwed Tschoeke, Systems Architect IBM Systems and Technology Group

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

Instruction Set Architecture. or How to talk to computers if you aren t in Star Trek

An Overview of Virtual Machine Architectures

Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C

#820 Computer Programming 1A

IBM Software Group. Lotus Domino 6.5 Server Enablement

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1

The C Programming Language course syllabus associate level

Chapter 1 Fundamentals of Java Programming

VLIW Processors. VLIW Processors

Transcription:

Module 2 Copyright IBM Corporation 2008 1 System i Architecture Part 1 Module 2

Module 2 Copyright IBM Corporation 2008 2 2.1 Impacts of Computer Design

Module 2 Copyright IBM Corporation 2008 3 If an instruction set architecture is to be successful, it must be designed to survive rapid changes in computer technology.* An architect must plan for technology changes that can increase the lifetime of a successful computer.* * Source: John Hennessy, David Patterson, Computer Architecture. A Quantitative Approach.

Hardware Dependencies High-level language Assembly language Binary machine language Compiler Assembler Hardware A + B add A, B 1000110010100000 What happens by changing technology? Recompile? Rewrite? Emulation? Program sources? Performance? Usage advantages of new technology? Costs? Module 2 Copyright IBM Corporation 2008 4

Module 2 Copyright IBM Corporation 2008 5 Application Programming Interfaces Program a set of definitions of the ways in which one piece of computer software communicates with another method of achieving abstraction - Reduce hardware dependence Add A,B - Negative performance impacts API add A,B Hardware

Module 2 Copyright IBM Corporation 2008 6 Hardware Abstraction Layer of OS Applications OS - lower-level details are hidden - offers simpler models to higher level Kernel Hardware Direct access to hardware means hardware dependence!

Module 2 Copyright IBM Corporation 2008 7 2.2 Goals of the System i Architecture

Different Workloads - Different Requirements Engineering/scientific Computing Commercial Applications Compute-intensive workload Floating point processing Using relatively small amounts of data Many tight loops I/O s more often sequential than random Many concurrent user Primary using integer arithmetic, string comparison updates and inserts Applications perform many calls to OS for services, such as I/O s Fewer loops and more non-loop branches Data often spread over a large amount of disk space Module 2 Copyright IBM Corporation 2008 8

Module 2 Copyright IBM Corporation 2008 9 i5 Forerunner Quelle: "AS/400 Blackbox geöffnet", Frank Soltis, Duke Press 1997

Module 2 Copyright IBM Corporation 2008 10 IBM Rochester (Minnesota)

Module 2 Copyright IBM Corporation 2008 11 The Secret of Success Scaleable High Compact Performance Computing Cardless Computing 1969 1975 1977 Advanced Architecture 1980 1982 1988 2000 2004 S/3 S/32 S/34 S/38 S/36 AS/400 iseries i5 96 Col Card Inexpensive Interactive Computing Server Consolidation New Workloads Virtualization Distributed Computing

Module 2 Copyright IBM Corporation 2008 12 The Secret of Success Scaleable High Compact Performance Computing Cardless Computing 1969 S/3 96 Col Card 1975 S/32 1977 S/34 Advanced Architecture Inexpensive Interactive Computing 1980 S/38 1982 S/36 1988 AS/400 2000 Note the secret to this success Gradual, not Radical Change iseries Server Consolidation New Workloads 2004 i5 Virtualization Distributed Computing

Module 2 Copyright IBM Corporation 2008 13 Design Requirements for System i Goal: Business Computer Ease-of-use user interfaces Ability to expand the system without an impact on business application software Optimized for running business applications IO intensive workload rather than computing intensive workload Optimized for multi-user applications High throughput (fast IO operations)

The Five Sacred Architecture Principles of System i Module 2 Copyright IBM Corporation 2008 14 Technology Independence Object-based Design Hardware Integration Software Integration Single-Level Store

Module 2 Copyright IBM Corporation 2008 15 2.3 Overview of the MI Architecture * called Machine Interface on i5 Systems

Module 2 Copyright IBM Corporation 2008 16 Programmer s View on System i Applications i5/os* Kernel SLIC Hardware Direct access to hardware is not allowed! Machine Interface (MI) - or Technology Independent Machine Interface (TIMI) - logical not physical interface System License Internal Code (SLIC) - insulate applications from underlying hardware - SLIC is hardware dependent! * Aka OS/400 on AS/400 and iseries

Module 2 Copyright IBM Corporation 2008 17 System i Hardware Interface Architecture Designed for Software Investment Protection Technology Independent Machine Interface Software remains the same while Processors change Buses change I/Os change Applications inherit advantages of new hardware enhancements Processor speed and price/performance Address space Bus and I/O technology

Module 2 Copyright IBM Corporation 2008 18 Conventional Machine Interface Instruction set (executable): OP Operands Operations Machine interface Microcode layer -------------------- Hardware - Computional - Branching - Data manipulation Operands - Memory/register - Immediate data Product-supported structures: Hardware dependent Adress Space I/O Space Register Space

Module 2 Copyright IBM Corporation 2008 19 Use of Objects Applications OS/400 Objects based on MI System Objects i5/os Kernel SLIC Hardware - Objects are used for complex data structures - Examples: Database file, User profile, Program,

Module 2 Copyright IBM Corporation 2008 20 Hiding the Internals: Encapsulation Programs no longer know about precise format of the data structure any changes of data structures have no effect on application or system programs Only instructions that treat the object as entity are allowed fields in the data structure can not manipulated with bit- or byte-level instructions

Module 2 Copyright IBM Corporation 2008 21 System i Machine Interface Instruction set (non-executable): OP Operands Operations Machine interface System Licensed Internal Code (SLIC) -------------------- Hardware Hardware dependent -Computional instructions on traditionel operands -Object-oriented instructions Operands - Immediate data - Objects Product-supported structures: Complex data structure Byte space Objects

Module 2 Copyright IBM Corporation 2008 22 Pro s and Con s of using OO Advantages: Technology Independance Hardware changes have no impact on applications Integrity Programs at the MI layer do the right things Security Virus resistent Disadvantage Performance OO technology reuses many small modules long instruction-path length kernel performance has impact to the overall performance Fine Tuning is important!

Module 2 Copyright IBM Corporation 2008 23 OS/400 SLIC Hardware Operating System Functional Split Machine Interface Security Database Device support Work management Control language File definition OS/400 Machine Member definition Open Data transfer Close Interface SLIC Hardware

Module 2 Copyright IBM Corporation 2008 24 Creating a System i Program Program Source Compiler Program Template Translator *PGM RPG Cobol C/C++ MI Instructions Machine Interface Binary

Module 2 Copyright IBM Corporation 2008 25 Inside a *PGM Object *PGM Header (Name, Owner,, Translator version) Debug Informations Program Template Observability Debug informations are not embedded in the code Template can be deleted Binary Instruction Stream

Module 2 Copyright IBM Corporation 2008 26 2.4 Examples Using advantages of MI

Module 2 Copyright IBM Corporation 2008 27 2.4.1 From CISC to RISC The way to a 64-bit Architecture

Instruction Set Classes Example: C = A + B Memory-memory Register-memory Register-register (load-store) Add C, A, B Load R1, A Load R1, A Add R3, R1, B Load R2, B Store R3, C Add R3, R1, R2 Store R3, C Data can be accessed directly clocks/instruction vary by operand location Source: John Hennessy, David Patterson, Computer Architecture. A Quantitative Approach. Module 2 Copyright IBM Corporation 2008 28

Module 2 Copyright IBM Corporation 2008 29 CISC, RISC Complex Instruction Set Computing Includes also complex instructions which were direct representations of high level functions General goal: orthogonality of instruction set Makes assembler programming easier Reduced Instruction Set Computing Philosophy behind: Do everything in registers! "Relegate Important Stuff to Compiler"

Module 2 Copyright IBM Corporation 2008 30 Exercise: CISC vs. RISC Assume that a certain task needs P CISC instructions and 2P RISC instructions, and that one CISC instruction takes 8T ns to complete, and one RISC instruction takes 2T ns. Under this assumption, which one has the better performance? * Source: John Hennessy, David Patterson, Computer Organization and Design, Ex.1.52

Module 2 Copyright IBM Corporation 2008 31 A simple Way to 64 bit Applications Save Restore Applications OS/400 V2R3 Machine Interface OS/400 V3R7 LIC SLIC 48-bit CISC 64-bit RISC

Module 2 Copyright IBM Corporation 2008 32 How it was done? Some customers called IBM and said: I just installed the new systems, and my applications run slower. What was wrong? *PGM Header Translator V3R2 Debug Informations Program Template Binary 48-bit CISC Instruction Stream 1. Compare translator versions with currently installed one 1. Retranslate object from template 1. From now on the new code is used *PGM Header Translator V3R7 Debug Informations Program Template Binary 64-bit RISC Instruction Stream

Module 2 Copyright IBM Corporation 2008 33 2.4.2 The Story of the Advanced S/36

Module 2 Copyright IBM Corporation 2008 34 IBM System/36 Was a simple and popular small business computer system, First shipped in 1983. The System/36 was flexible and powerful: It allowed 36 monitors and printers to be connected together. All users could access the system's hard drive or any printer. It provided very good password security and resource security, allowing control over who was allowed to access any program or file. Devices could be as far as a mile from the system unit. Users could dial into a System/36 from anywhere in the world and get a 9600 baud connection, which was very fast in the 1980s and very quick for connections which used only screen text and no graphics. It allowed the creation of databases of very large size. It supported up to about 8 million records, and the largest 5360 with four hard drives in its extended cabinet could hold 1.453 gigabytes. The S/36 was "bulletproof," able to run for six weeks or longer between restarts (IPLs).

Module 2 Copyright IBM Corporation 2008 35 Advanced S/36 IBM introduced the AS/400 Advanced/36 with PowerPC technology in 1994 OS/400 Applications S/36 Applications MI OS OS/400 Kernel SLIC Hardware SSP Virt.S/36 System Support Program (S/36 Operating system) - was available for all RISC Models with OS/400 V3R6 to V4R5 - not included in i5/os

Module 2 Copyright IBM Corporation 2008 36 2.4.3 Java Implementation

Module 2 Copyright IBM Corporation 2008 37 Java Implementation Typical iseries Java Applications JVM OS JVMI MI Java Applications OS/400 SLIC JVM Hardware iseries Introduced with OS/400 V4R2 New C++ implementation

Module 2 Copyright IBM Corporation 2008 38 2.4.4 AIX Runtime (without LPAR) Portable Application Solution Environment

Module 2 Copyright IBM Corporation 2008 39 An integrated i5/os 7 runtime for porting selected UNIX applications Supports AIX 5L 32/64-bit application model Exploits PowerPC's ability to switch runtime modes Applications Integrated with iseries file systems and work management Can call DB2/400 7, Java TM and ILE programs Exploit all aspects of iseries operations environment iseries Application Portable Application Solution Environment (PASE) i5/os i5/os Services Technology Independent Machine Interface i5/os SLIC Kernel PowerPC AS 64-bit System i PASE Application AIX Shared Libraries Syscall PowerPC 64/32-bit

Module 2 Copyright IBM Corporation 2008 40 2.5 MI Programming Example

Module 2 Copyright IBM Corporation 2008 41 Program Models Programs come in two flavors original program model (OPM) Integrated Language Environment (ILE) MI programs can be created only for the OPM environment! If you require ILE support use ILE C and its built-in MI support For OPM use Create Program QPRCRTPG API

Example: Return the larger of two packed arguments /* Program Name: MI01 */ Module 2 Copyright IBM Corporation 2008 42 ENTRY * (PARM_LIST) EXT; DCL SPCPTR ARG1@ PARM; DCL SPCPTR ARG2@ PARM; DCL SPCPTR RESULT@ PARM; DCL OL PARM_LIST (ARG1@, ARG2@, RESULT@) PARM EXT; DCL DD ARG1 PKD(15,5) BAS(ARG1@); DCL DD ARG2 PKD(15,5) BAS(ARG2@); DCL DD RESULT PKD(15,5) BAS(RESULT@); CMPNV(B) ARG1,ARG2 / LO(ITS2); CPYNV RESULT,ARG1; B RETURN; ITS2: CPYNV RESULT,ARG2; RETURN: RTX *; PEND;

Module 2 Copyright IBM Corporation 2008 43 Define an Entry Point /* Program Name: MI01 */ ENTRY * (PARM_LIST) EXT; DCL SPCPTR ARG1@ PARM; DCL SPCPTR ARG2@ PARM; DCL SPCPTR RESULT@ PARM; First the program needs an ENTRY directive statement to designate its external entry point. The following directive declares an unnamed (the *) external (the EXT) entry point, which is called with a parameter list corresponding to PARM_LIST (defined later in the source code). DCL OL PARM_LIST (ARG1@, ARG2@, RESULT@) PARM EXT; DCL DD ARG1 PKD(15,5) BAS(ARG1@); DCL DD ARG2 PKD(15,5) BAS(ARG2@); DCL DD RESULT PKD(15,5) BAS(RESULT@); CMPNV(B) ARG1,ARG2 / LO(ITS2); CPYNV RESULT,ARG1; B RETURN; ITS2: CPYNV RESULT,ARG2; RETURN: RTX *; PEND;

Module 2 Copyright IBM Corporation 2008 44 Entry Directive Statement

Module 2 Copyright IBM Corporation 2008 45 /* Program Name: MI01 */ ENTRY * (PARM_LIST) EXT; DCL SPCPTR ARG1@ PARM; DCL SPCPTR ARG2@ PARM; DCL SPCPTR RESULT@ PARM; Declare Arguments DCL OL PARM_LIST (ARG1@, ARG2@, RESULT@) PARM EXT; DCL DD ARG1 PKD(15,5) BAS(ARG1@); DCL DD ARG2 PKD(15,5) BAS(ARG2@); DCL DD RESULT PKD(15,5) BAS(RESULT@); CMPNV(B) ARG1,ARG2 / LO(ITS2); CPYNV RESULT,ARG1; B RETURN; ITS2: CPYNV RESULT,ARG2; RETURN: RTX *; PEND; OS/400 programs typically pass parameters by reference as part of the high-level language (HLL) calling convention. Because OS/400 programs pass by reference (that is, address and not value), the program also needs to define three space pointers (how storage is referenced) to represent the three parameters being passed. To associate these three space pointers with the parameters being passed to the program, the following operand list (OL) is declared

Module 2 Copyright IBM Corporation 2008 46 Declare Paramater Types /* Program Name: MI01 */ ENTRY * (PARM_LIST) EXT; DCL SPCPTR ARG1@ PARM; DCL SPCPTR ARG2@ PARM; DCL SPCPTR RESULT@ PARM; DCL OL PARM_LIST (ARG1@, ARG2@, RESULT@) PARM EXT; DCL DD ARG1 PKD(15,5) BAS(ARG1@); DCL DD ARG2 PKD(15,5) BAS(ARG2@); DCL DD RESULT PKD(15,5) BAS(RESULT@); CMPNV(B) ARG1,ARG2 / LO(ITS2); CPYNV RESULT,ARG1; B RETURN; ITS2: CPYNV RESULT,ARG2; RETURN: RTX *; PEND;

Module 2 Copyright IBM Corporation 2008 47 Instruction Stream /* Program Name: MI01 */ ENTRY * (PARM_LIST) EXT; DCL SPCPTR ARG1@ PARM; DCL SPCPTR ARG2@ PARM; DCL SPCPTR RESULT@ PARM; DCL OL PARM_LIST (ARG1@, ARG2@, RESULT@) PARM EXT; DCL DD ARG1 PKD(15,5) BAS(ARG1@); DCL DD ARG2 PKD(15,5) BAS(ARG2@); DCL DD RESULT PKD(15,5) BAS(RESULT@); CMPNV(B) ARG1,ARG2 / LO(ITS2); CPYNV RESULT,ARG1; B RETURN; ITS2: CPYNV RESULT,ARG2; RETURN: RTX *; PEND; The program then branches (the (B) extender to CMPNV) to label ITS2 if ARG1 is less than ARG2 (the /LO branch target). Other target keywords could be LO, HI, EQ, If ARG2 was greater than ARG1, the CPYNV instruction at label ITS2 is run, setting RESULT to the value of ARG2.

Module 2 Copyright IBM Corporation 2008 48 Program End /* Program Name: MI01 */ ENTRY * (PARM_LIST) EXT; DCL SPCPTR ARG1@ PARM; DCL SPCPTR ARG2@ PARM; DCL SPCPTR RESULT@ PARM; DCL OL PARM_LIST (ARG1@, ARG2@, RESULT@) PARM EXT; DCL DD ARG1 PKD(15,5) BAS(ARG1@); DCL DD ARG2 PKD(15,5) BAS(ARG2@); DCL DD RESULT PKD(15,5) BAS(RESULT@); CMPNV(B) ARG1,ARG2 / LO(ITS2); CPYNV RESULT,ARG1; B RETURN; ITS2: CPYNV RESULT,ARG2; RETURN: RTX *; PEND; The program has now finished processing and ends. The previous return external (RTX) instruction is not needed because it is implied by the PEND directive. The RTX instruction is included to add clarity to the program flow.

Module 2 Copyright IBM Corporation 2008 49 Lx86

Module 2 Copyright IBM Corporation 2008 50 PowerVM Lx86 for x86 Linux applications Transforming x86 Linux applications without porting Helps enable x86 Linux apps to just run on servers with Linux OS Supports installation and running of most existing 32-bit x86 Linux applications 1 Creates an x86 Linux application environment running on Linux for System p Extends values of IBM Power Systems platforms to x86 Linux applications Dynamic binary translation x86 Linux Applications Linux for POWER Operating system call mapping (1) System p Application Virtual Environment ("System p AVE") runs most x86 Linux applications, but System p AVE cannot run applications that: Directly access hardware (for example, 3D graphics adapters); Require nonstandard kernel module access or use kernel modules not provided by the Linux for POWER operating system distribution; Do not use only the Intel IA-32 instruction set architecture as defined by the 1997 Intel Architecture Software Developer's Manual consisting of Basic Architecture (Order Number 243190), Instruction Set Reference Manual (Order Number 243191) and the System Programming Guide (Order Number 243192) ll dated 1997; Are Linux/x86 specific system administration or configuration tools; Require x86 real-mode. Visit ibm.com/systems/p/linux/qual.html for detailed qualifications.

Module 2 Copyright IBM Corporation 2008 51 What does PowerVM Lx86 do? Native Linux for POWER Binary x86 Linux Applications ISV Binaries PowerVM Lx86 Front End Optimizer Back End POWER Processor platform User Binaries Linux OS (Red Hat or Novell SUSE) Dynamically translates and maps x86 Linux instructions to POWER Translation process Translates blocks of code into intermediate representation Performs optimizations Stores optimized, frequently used blocks of code in cache Handles Linux OS call mapping Encodes binary for target POWER processor platform Best for certain applications and usage scenarios Power architecture can provide many advantages But these make our architecture very different from x86 architecture Translation can be resource intensive