CONTENTS Title Page Copyright Page Preface Part I The VAXELN Toolkit 1 VAXELN - Solving Problems in Real Time 1.1 The Challenge of Dedicated, Realtime Applications 1.2 Meeting the Challenge with VAXELN 1.3 Tools for Realtime Problem Solving 1.4 VAXELN Applications: Powerful, Dedicated Solutions 1.5 Learning More About VAXELN 2 Development Software 2.1 The VAXELN Pascal Compiler 2.2 The VAXELN Libraries 2.3 The VAXELN System Builder 2.4 The VAXELN Debugger 3 Runtime Software 3.1 The VAXELN Kernel 3.2 Runtime Support Software 3.3 The System Image 4 Creating a VAXELN Application 4.1 Check Your System Resources 4.2 Editing System Builder Menus 4.3 Create the Sample Application Part II Programming with VAXELN 5 Concurrent Jobs and Processes 5.1 Jobs and Processes 5.2 Process States 5.3 Priorities and Scheduling 6 Synchronizing Processes 6.1 Synchronization: Waiting at the Intersection 6.2 Synchronizing by Waiting for a Specified Time 6.3 Synchronizing by Waiting for Other Processes 6.4 Synchronizing by Waiting for Semaphores 6.5 Synchronizing by Waiting for Events 7 Communication 7.1 Communication Between Processes 7.1.1 Data Sharing 7.1.2 Queues 7.2 Communication Between Jobs 7.2.1 Message Passing 7.2.2 Areas 8 Responding to Realtime Events 8.1 Responding to Exceptions 8.2 Responding to Device Interrupts Part III Creating a VAXELN Application 9 Designing an Application 9.1 The Requirements for a Sample Application: A Scenario 9.2 Creating the General Design 9.3 Creating the Detailed Design 9.3.1 Design Issue: Interjob Communication and Synchronization 9.3.2 Design Issue: Interprocess Communication 9.3.3 Design Issue: Interprocess Synchronization 9.3.4 Design Issue: General Purpose Routines 9.3.5 Writing the Specification 10 Implementing an Application 10.1 Selecting a Development Environment 10.2 Selecting a Programming Language 10.3 Coding the Application 10.3.1 Coding the Number-Generating Job in C 10.3.2 Coding the Number-Receiving Job in VAXELN Pascal 11 Building an Application 11.1 Creating a System Image for Debugging 11.2 Creating a System Image to Run Directly on a Target Processor 12 Debugging an Application 12.1 Using the Debugger 12.2 Debugging the Application 13 Running an Application 13.1 Downline Loading an Application with the Debugger 13.2 Downline Loading an Application with the Network Control Program 13.3 Advancing with VAXELN A Sample VAXELN Application A.1 SAMPLE_SENDER.C A.2 SAMPLE_GLOBALS.PAS A.3 SAMPLE_RECEIVER.PAS A.4 SAMPLE_UTILITIES.PAS B Pascal and FORTRAN Number Generators B.1 Pascal Number Generator B.1.1 Compiling and Linking SAMPLE_SENDER.PAS B.1.2 SAMPLE_SENDER.PAS B.2 FORTRAN Number Generator B.2.1 Compiling and Linking SAMPLE_SENDER.FOR and SAMPLE_CCTIME.C B.2.2 SAMPLE_SENDER.FOR B.2.3 SAMPLE_CCTIME.C EXAMPLES 3-1 Creating a Process in VAXELN Pascal 3-2 Creating a Process in C 6-1 Synchronizing by Waiting for an Object 6-2 Waiting for an Interval and Absolute Time 6-3 Waiting for a Process 6-4 Synchronizing Processes with Semaphores and Mutexes 6-5 Synchronizing Processes with Events 7-1 Using Queues for Interprocess Communication 7-2 Using Messages for Interjob Communication and Synchronization 7-3 Sharing Data Between Jobs by Using Areas 8-1 Responding to Runtime Exceptions 8-2 A Simple Device Driver 9-1 Pseudo Code for the Number-Generating Job 9-2 Pseudo Code for the Number-Receiving Job 10-1 Code for the Number-Generating Job: Master Process 10-2 Code for the Number-Generating Job: Sender Process 10-3 Code for the Number-Receiving Job: Master Process 10-4 Code for the Number-Receiving Job: Receiving Process 10-5 Code for the Number-Receiving Job: Tester Process 13-1 A Sample Scanning Session from the Console FIGURES 1-1 A VAXELN Application Controls a Space Vehicle 1-2 Host and Runtime System Software 2-1 System Builder Main Menu 2-2 Building a VAXELN System 2-3 A Remote Debugging Configuration 2-4 A Local Debugging Configuration 2-5 The Debugger Screen 3-1 A VAXELN System Image 4-1 System Builder Main Menu 4-2 Program Description Menu 4-3 Edit System Characteristics Menu 4-4 Select Target Processor Menu 4-5 Initial Debugger Screen - Pascal Example 4-6 Initial Debugger Screen - C Example 4-7 Final Debugger Screen 5-1 Creating Jobs and Processes in Virtual Memory 5-2 Jobs: Families of Processes 5-3 Process State Transitions 5-4 Scheduling Queues Within a System 7-1 A VAXELN Queue 7-2 Processes Exchanging Data Through Queues 7-3 Communicating Using a Datagram 7-4 Communicating over a Circuit 9-1 The First Level of Task Analysis 9-2 The Second Level of Task Analysis: Number-Receiving Task 9-3 The Second Level of Task Analysis: Sending Task 9-4 The Application Task Assigned to Jobs and Processes 9-5 Representing Multiple Processes Executing the Same Code 9-6 The Lottery-Number Scanner in Detail TABLES 2-1 VAXELN Runtime Libraries 2-2 Selected Debugger Commands 3-1 VAXELN Kernel Objects 3-2 VAXELN Kernel Routines 4-1 Menu Commands 5-1 Process States 6-1 WAIT Objects 6-2 Absolute Time Specifications 6-3 Interval Time Specifications 8-1 The Device Description for the UNICRN11 9-1 Execution of the Lottery Number Scanner 11-1 System Builder Settings for Debugging the System Image 11-2 System Builder Settings for the Production System Image