CMS Application Multitasking
Total Page:16
File Type:pdf, Size:1020Kb
z/VM Version 7 Release 1 CMS Application Multitasking IBM SC24-6258-00 Note: Before you use this information and the product it supports, read the information in “Notices” on page 337. This edition applies to version 7, release 1, modification 0 of IBM® z/VM® (product number 5741-A09) and to all subsequent releases and modifications until otherwise indicated in new editions. Last updated: 2018-09-12 © Copyright International Business Machines Corporation 1992, 2018. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents List of Figures....................................................................................................... ix List of Tables........................................................................................................ xi About This Document..........................................................................................xiii Intended Audience.................................................................................................................................... xiii Where to Find More Information...............................................................................................................xiii Links to Other Documents and Websites............................................................................................ xiii How to Send Your Comments to IBM.....................................................................xv Summary of Changes for z/VM CMS Application Multitasking............................... xvi SC24-6258-00, z/VM Version 7 Release 1............................................................................................... xvi SC24-6164-01, z/VM Version 6 Release 4............................................................................................... xvi Chapter 1. Basic Multitasking Concepts..................................................................1 Multitasking Process Model.........................................................................................................................1 Basic Constructs.....................................................................................................................................2 Interactions of Threads, Processes, and Sessions................................................................................2 Multitasking Functions.................................................................................................................................4 CMS Process Model Compared with OS/2............................................................................................. 8 Chapter 2. Process Management.......................................................................... 11 Creating Threads........................................................................................................................................11 Thread Priority........................................................................................................................................... 11 Dispatching Classes...................................................................................................................................11 Implicit Process Creation.......................................................................................................................... 12 Process Termination.................................................................................................................................. 12 Process Management Examples............................................................................................................... 13 Chapter 3. Event Management............................................................................. 17 Event Definition..........................................................................................................................................17 Event Signaling...........................................................................................................................................18 Event Monitors........................................................................................................................................... 19 Event Monitor Processing.......................................................................................................................... 19 Event Signal Processing.............................................................................................................................20 Overview of Event Management Functions...............................................................................................20 Event Management Examples................................................................................................................... 22 Chapter 4. Interprocess Communication.............................................................. 27 Queue Definition........................................................................................................................................ 27 Operation..............................................................................................................................................27 Properties............................................................................................................................................. 28 Queue Names....................................................................................................................................... 28 Queue Name Scopes............................................................................................................................ 28 Export Level Search Order................................................................................................................... 29 Primary Queue......................................................................................................................................29 Keys...................................................................................................................................................... 29 Network-Level Queues.........................................................................................................................31 Authorization........................................................................................................................................ 35 Replies.................................................................................................................................................. 36 Service Queues.....................................................................................................................................37 iii Timeouts...............................................................................................................................................37 Interactions with Process Management..............................................................................................38 Interactions with Event Services......................................................................................................... 38 General Queue API Notes.................................................................................................................... 38 Interprocess Communication Examples...................................................................................................39 Setting Up Network-Level Queues.......................................................................................................44 Chapter 5. Synchronization..................................................................................47 Synchronization Examples........................................................................................................................ 48 Accessing a Critical Section Protected by a Mutex..............................................................................49 Chapter 6. Multiprocessor Configuration Control...................................................57 Guidelines for Defining Virtual CPUs......................................................................................................... 57 Chapter 7. Timer Services.................................................................................... 59 Timer Services Examples.......................................................................................................................... 59 DateTimeSubtract Examples................................................................................................................60 Chapter 8. Accounting Services............................................................................65 Accounting Services Examples..................................................................................................................66 Chapter 9. Abend Services................................................................................... 67 Monitoring Error Events............................................................................................................................. 68 Error Recovery...................................................................................................................................... 68 Retry Routines...................................................................................................................................... 69 Recovery in the High-Level Language Environment............................................................................69