LSO
LSO
LSO
INTRODUCTION Categories Of Computers Microcomputers Minicomputers and Workstations Mainframes Supercomputers Microcomputers Originated in late 70s Single-user-oriented Multi-user super micros PC, Apple Mac Minicomputers and Workstations Smaller versions of mainframe Usually run on either the highly portable Unix OS or close OS such as VAX (DEC), Nighthawk, IBM AS/400, IBM RS/6000
Mainframes
Oldest form of computer Expensive and powerful Small, Medium, and Large-Program handling Uniprocessor; high-speed storage Can be shared by a wide variety of users System/360, 370, 390 from IBM
Supercomputers
Advanced technology Designed for advanced scientific calculations Most powerful and most expensive Equivalent to 50,000 PCs Cray 1, Cray 2, Cray X-MP, ETA-10.
System/370
System/390
System/390; introduced in 1994 (latest version) CMOS technology MIPS Dual processing; fastest G4 model OS/390 truly an enterprise server Incorporates MVS V5R2. Unix functions added. C and C++ compilers Java and Java Development kit GUI offered via Visual AGE Objects System can be easily moved
WHY MAINFRAMES?
Can handle large volumes of data Have high processing power Provide centralized administration and storage Offer superior data management capabilities Can handle different types of workload Have high data bandwidth Monitor data integrity and security
OS/390: Prior to OS/390, the System/390 world consisted of tons of different products that had to be ordered, installed and maintained separately. The products were updated in different release cycles.
OS/390 An Integrated Solution The OS/390 system builds on the strengths of MVS/ESA and provides a complete network-ready server environment.
SOFTWARE
Operating system (like MVS/ESA) System applications Job entry subsystem Communication software Batch applications DB/DC Applications Storage management subsystem
Categories of Programming
Batch programming Interactive programming
Batch Programming
Accepts data for processing in groups called batches and produces o/p grouped into sets. Do not communicate with any user as they execute Once started, supervised by the computers OS
Interactive programming Designed to communicate with users as they run Issues messages and prompts Allow the end user to communicate new info or change existing info Adapted with CICS
Uniprocessor Dual processor Dyadic processor Triadic processor Tightly coupled Loosely coupled
9221 9121 9021 (fastest) - One CPU - Two CPUs - Two CPUs - Three CPUs - One copy of the operating system - Two independent systems connected together
System Controller
Monitors communication among central processor, other processors, storage and channel subsystem Central Storage Main memory, also known as RAM Loaded with system programs, user programs, and data Expanded Storage Optional high-speed memory Slower than main memory Less expensive Used mainly as an I/O device (for paging)
Input/Output subsystem
Channel subsystem I/O processor A set of RISC based processor from I/O handling
Control Unit Controls I/O devices Device diagnostics Selects device Addressing Modes (AMODE) IBM supports two types of Addressing Modes: 24 bit addresses prior to XA Address space size 16 MB 31 bit addresses XA and after Address space size 2 GB Logical Partitioning (LPAR) With PR/SM (processor Resource/ System Manager), a single system can be made to support many operating systems. The logical Portioning offers multiple environments. A single systems resources are portioned. Different OSs can run in these partitions.
Communications subsystem Communications controller Provides networking Remote device connectivity Controls network communication devices
Multiple devices management Network interfaces management Prioritizes work Job processing and management Evolutionary Grow able Reliability/Availability/Serviceability Security Re-configurable Measurable/Tunable
MVS Evolution
1961 OS 360 PCP 1966 OS/MFT
OS/MVT
1972 OS/VS1, OS/VS2 R1 (SVS) 1974 OS/VS2 R2 (MVS) 1983 MVS/XA 1988 MVS/ESA 1995 MVS/ESA 5.2.2 1996 OS/390 1.1 1998 OS/390 2.6
System Management
Starts and shut down the system Manages network interfaces Prioritizes the work in TSO mode Job processing Security management Resources Management Decides which devices to be accessed by the CPU Prioritizes the work for the devices Manages the CPU for the optimum usage Establishes the connectivity Loads compilers, applications Manages the library routines
Function of OS(Contd.)
Memory management Allocation of memory De allocation of memory Fragmentation and garbage collection Paging and segmentation. File Management CREATE DELETE COPY MERGE VIEW ADD EDIT PRINT OPEN CLOSE
Characteristic of an OS
Evolutionary Re-configurability Reliability Availability Serviceability Security Measurability
Virtual Storage
The processors main storage is among the most valuable of the system resources. Modern mainframe computer operating systems provided sophisticated services to make the best use of the available main storage Most important of these services is virtual storage Virtual storage is a technique that lets a processor simulate an amount of main storage that is larger than the actual amount of real storage. To do this, the computer uses disk storage as an extension of real storage. In virtual storage, at any given moment, only the current program instruction and the data it access need o be real storage. Virtual storage is largely transparent from the users point of view. Virtual storage appears to be real storage to the user.
Multiprogramming
Multiprogramming simply means more than one program executing at the same time. Actually that is misleading. At any given moment, Only one program can have control of the CPU. A multiprogramming system appears to execute more than one program can have control of the CPU. A multiprogramming system appears to execute more than one program at the same time. EXAMPLE Reading data from an input device takes more than any other Operation. As a result most programs have to wait for a large portion of time for the I/O Operations to complete.
If programs were run one at a time on a mainframe, the CPU would spend most of its time waiting.
Multi Programming like virtual storage is mostly transparent to the user.
Spooling
A significant problem that must be overcome by multiprogramming systems is sharing access to input and output devices for the programs that execute together. For Example spooling is used to provide shared access to printer devices. Benefit of spooling is used to provide shared access to printer devices. The expensive processor has to wait for I/O The speed mismatch is of the order of 1:1000. To reduce the delay a low cost I/O processor is used to prepare input data and print results, thereby main computer dose not wait for want of I/O.
Results
I/O Processor
Printer
Printed output
Spooling (Contd.)
The reason for using an I/O processor was to keep programs and data ready for main processor to process. The programs are transferred in batches to high-speed tape. Each program will have begin and end card. The method of putting inputs into a batch and placing them in a magnetic medium and queuing the output is called spooling.
Advantages The computers could be so scheduled that while present batch is processed the previous batch results could be printed out and data for next batch could be prepared. Useful in engineering/scientific computations where processing time is large while I/O is not that large. Time wasted between manuals loading of successive jobs is reduced. The I/O processor and main processor work independently & simultaneously, thereby increasing the total number of jobs to be processed. The main computer I/O is via magnetic tape or disk, which is faster than keyboard or line printer. Thus, memory and processor do not waste time for I/O.
MVS/ESA supports
Multiprogramming Time sharing Multitasking Multiprocessing TCMP Tightly Coupled Multiprocessing LCMP Loosely Coupled Multiprocessing
Virtual Storage
The basic approach is to divide total programs into small sequences of instructions called either pages or segments. Then only those program pages or segments that are actually required at a particular moment in the processing need be in real storage from where they can be rapidly retrieved as needed. The OS handles the swapping. Thus, form the applications point of view; the effective (or virtual) size of the available primary storage may appear to be unlimited.
Throughput The total amount of useful work done by the system. Response time Time taken to receive response for a command. Turnaround time Time taken to get the output after submitting on job.
Paging
Pages in virtual storages are mapped onto frames in real storage or slots of the auxiliary storage (DASD) or both. Pages are brought to central storage when they are required, which is called page in. Inactive pages from central storage are removed to auxiliary storage which is called page out.
Data in memory
Accessing data from a dataset in auxiliary storage requires I/O operations and will take time. Bringing data into memory, namely virtual storage and accessing the data from there will minimize I/O and the elapsed time for an application. MVS/ESA provides data spaces, which are also virtual storage objects where large volumes of data can be stored and retrieved faster.
Batch Processing
A batch file contains a series of commands that are processed together as a batch. While using batch processing, work is processed in units called Jobs. A job may cause one or more programs to execute in sequence. Jobs are submitted in batches such that they are processed one at a time. Many users compete to use the systems resources. To manage this, the job entry subsystem, or JES processes each users job in an orderly fashion.
Job Classes An installation can define job classes of its own based on different criteria like time, resources required for the jobs. Jobs can be submitted in any of these defined classes. When JES starts, it defines automatically a number of batch or initiator address spaces. Initiators can be associated with certain classes of jobs. For ex. Initiator 1 with class A, Initiator 2 with class B, and Initiator 3 with class X. The users submit batch jobs and they are run in batch address spaces or initiator address spaces. Job can be submitted from a local terminal, remote terminal or from a different system. These are called lje, rje, and nje respectively.
Types Of Programs
I/O Bound Programs In programs when large quantity of data is required to be read, or printed, the CPU has to wait for large portion of time waiting for I/O. Such programs are called I/O bound programs.
VSE stands for virtual storage extended, which refers o, the particular way it handles virtual storage.
Although DOS/VSE has evolved into a respectable operating system, it is still appropriate for smaller systems that do not have extensive processing requirements. For larger configurations, the OS family of operating systems is more appropriate.
The VM Operating System A third IBM operating system is called virtual machine (VM), which has different approach to computer system management than DOS OS. VM, which stands for virtual machine, uses a variety of techniques including virtual storage and multi-programming to simulate more than one computer system (called a virtual machine) on a single real computer system. The operating system supports running other operating systems as its guests. The host VM handles resource allocation to the various guests, which are running in different regions or partitions. VM thus provides many different virtual machines with a single system. VM provides a special operating system, called CMS for conversational monitor system, that lets a single terminal user use a virtual machine interactively.
Multiple Virtual Storage The complete range of address is called the address space. The number of digits used to represent addresses limits the maximum size of an address space. Real computers use binary numbers rather than decimal numbers to represent addresses. MVS uses multiple address space capability to Implement multiprogramming. Each batch job running under MVS executes in its own address space.
E.G. One wants to process a job that executes two programs: the first sorts a customer file into customer name sequence, and second prints a report that lists customers by name. This is a two-step job, because it requires two programs. No matter how many job steps your job steps your job contains, when you submit it to be processed by MVS, MVS treats it as a whole. In other words, every job begins with the execution of the first program and continues until the last program finishes executing unless an error occurs.
Within a job, the job control language, or JCL provides the specifications necessary for MVS to process the job. Although you do not have to know JCL to use TSO, you wont last long in an MVS without JCL.
IBM integrated the functions performed by these other programs into operating system by providing the job entry subsystem. There are two versions of JES, called JES2 and JES3.
JES2 is designed for single processor systems that do not have serious job scheduling problems. In contrast, JES3 is designed for large, multi-processor systems, where job scheduling is highly complicated. Each MVS system uses either JES2 or JES3; the two job entry subsystems cannot be used together on the same system. When you submit a job for processing under JES2 or JES3, the jobs JCL statements and other inputs are held in a job queue until JES2/JES3 determines that the job is ready to be executed. Then JES2/JES3 presents the job to MVS for execution. As the job executes, its printed output is collected in the spooled output on an appropriate printer. With either JES2 or JES3, you can assign each job class and a priority to prioritize the jobs in the job queue. Then, JES2/JES3 executes jobs with higher class and priority assignments, even if jobs with lower class and priority were waiting in the queue longer. JES3 provides additional job scheduling functions that are not available under JES2.
JES functions
JES receives the job, checks for correctness of the JCL statement, translates JCL into internal form and places the job in a proper processing category. After the job is processed, JES arranges the job output to be routed to the destinations and finally removes the job related information from its spool space. JES stages Input Conversion Allocation Execution Output Hardcopy Purge
Job is read by JES into the spool JES is converted into internal form The requested resources are allocated to the job The program is executed The programs outputs are classified The outputs are printed out All the items related to the job are deleted from spool
Sequential Dataset
This is nothing but the sequential file we are familiar with. Records are added only at the end of the dataset Records cannot be deleted Records can be inserted at the end. Supports fixed length or variable length records. Used for sequential processing.
Indexed Dataset
Used or direct or random processing of data. Application typically wants to access a particular record randomly. A field in the generated and maintained, which is used to access the record using the key.
Direct Dataset
Used for direct or random processing of data. Key field is used to access data. Key value is converted to the record address by some hashing algorithm.
Partitioned Dataset
A collection of sequential dataset called members. Has a directory to keep track of members and their locations. Used for realizing a library structure. Can maintain libraries of source program, load modules.
VSAM Advantages:
High Performances indexed and direct datasets Alternate Index support Similar block management for all file types. MVS uses VSAM intensively Example Catalogs are VSAM dataset Path and upgrade service support for alternate index
Access Methods acts as interface between application programs and the operating system or the channel subsystem. The application programs raise I/O requests. They are handled by the channel subsystem independently, using the channel programs generated by the access methods.
DASD Datasets
Every DASD volumes have a VTOC.(Volume Table of content) VTOC has entries for all the datasets residing in that volume. VTOC entries typically contain names of the datasets, their attributes and their locations (addresses) in their volume. VTOC also has information about free space in the volume.
Catalogs
Catalog is a dataset itself, which has entries to other datasets containing information as to which unit and which volume contains the dataset.
Catalog is used by the MVS to locate a dataset without the user having to give the location information. All datasets should be catalogued, so that he user need not remember where his datasets are located.
OS Catalogs
This was the first type of catalog introduced by IBM, which contained dataset names and their exact locations.
VSAM Catalogs
VSAM catalogs to store a lot more information about VSAM dataset.
One Per volume One Per volume Any number of catalogs in the system.
Master Catalog contains entries for user datasets. Important system datasets Other user catalogs Alias for user catalogs
User Catalogs contain entries for user datasets. The User dataset is cataloged automatically in any particular user catalog depending on the user ID, which is always the first part of any dataset name.
EXEC Statement
Specifies what is to be done or which program to run provides dispatching priority Information.
DD Statements
Allocates/ catalogs files Links programs and datasets. Concatenates data sets. Controls output destination.
Procedure
JCL statements can be combined and stored as procedures.
Job Classes
An installation can define job classes of its own based on different criteria like time, resource required for the jobs, jobs can be submitted in any of these defined classes. When JES starts, it defines automatically a number of batch or initiator address spaces. Initiators can be associated with certain classes of jobs. For ex, Initiator 1 with class A, Initiator 2 with class B, initiator 3 with class X. JES maintains the job queue for different classes of jobs and selects the job from a class according to its selection priority or scheduling priority.
Temporary Datasets
Sometimes, an application requires to create temporary data sets and after use , these temporary work files can be deleted. They need not kept permanently nor they need to be catalogued. For Example, a sort program requires lot of work area for temporary storage, which can be deleted after the sort job is over.
In JCL, one can create a temporary data set in one step, use it in another step, but at the end of its use, system will automatically delete it, because it is a temporary data set.
Dummy Datasets
In certain situations, while testing the logic of a program, one may create a dummy file. This is called a dummy data set. A dummy data set is never created really. When one allocates a dummy dataset, and the program tries to read it, an EOF condition is encountered. When a program writes into it, nothing is written.
Dataset concatenation
Sometimes, the program wants to process a number of files one after the other, for the program, logically, it is a single file, but it may be consisting of physically different data sets. In this situation, one can concatenate the different data sets by DD statements as if it is a single file.
Transaction Processing
One address space per user User access to all (authorized) resources. File/data base sharing User responsible for back out/recovery/restart
Transaction Processing
High performance-fast response Multiple users per address space Limited user access to resources Shared file/data base access Back out/recovery/restart provided
TSO
Part of MVS/ESA Command Language Line Editor Interactive Compile, Link, Debug Batch job submission, retrieval
ISPF/PDF
Full screen editing Split screen editing Dialog development and testing Library, file, dataset utilities Language processing, dubugging Online tutorial Context sensitive help.
CICS/ESA
DB/DC system Transaction manager Terminal/ Transaction oriented system Multi-tasking Single Address space architecture Multiple Programme environments Controlled user access
CICS programming was done initially using macro level coding. High-level CICS programming uses CICS commands embedded in programs is called command level coding, COBOL, C, RPG, PL1, Assembler languages can be used to write CICS programs.
One region for production and one region for testing One region for one application and other for a different application One region doing database/ file access and another for terminal control One CICS address space talking to another CICS address space in the same system is called MRO.
Chapter 7 Database
Large Volumes of data, which is independent or interrelated, have to be handled by the enterprise. Different users may view the same data differently and many applications of different type like batch and interactive applications should have access to the data. Database is organized collection of Independent data. Interrelated data. Minimal/controlled redundancy Used by one/multiple application Shared by many user/applications
Models of Database
Hierarchical Network Relational IMS IDMS DB2
Advantages:
Hierarchial Advantages
Good when resource consumption is more important than flexibility Some real life data has natural hierarchy. Good Performance for large stable database
Relational Advantages
Concepts easier to understand. Simpler program/Tabular design. Simplified database/Program maintenance
DB2 Database
Relational data model Tables
SQL DDL DML Structured Query Language Data Definition Language Data Manipulation Language
Views
View is made up from one or more tables. Views do not physically exist in the database, except as a definition. Views are logical table made up in memory when required. Views are useful for security also
DB2 Database Processing SQL statements Different ways to access DB2 using SQL:
Embedded SQL in an application program SPUFI QMF
System Overview
CPU
ES/9000 9121-411
256 MB
3174
Tape Drive
Printer
COMM. CONTR
Software Div.
Remote
3174
Terminal Contr.
Modem 3745
Modem
Modem
Mode
TC
3490
3490 9343
3270 3390
Sys Appl.
JES
Comm. S/w.
Batch App.
TSO App.
DB/DC App.
MVS
Central Processor System Contrllers Vector Facility
Channel Subsystem
Control Unit
Communication Controller
Local IO Devices
Remote IO Devices
Edit
Store Compile Execute
M/C Language
Logout
H/W
Login
Multiprogramming
CARD Reader Output G Pgm H Pgm B DATA C Output D Pgm E DATA A Printer Monitor Scheduler I/O Pgms Pgm A Pgm B Pgm C Pgm D
DATA B
Pgm E