The Helios Operating System
Total Page:16
File Type:pdf, Size:1020Kb
The Helios Operating System PERIHELION SOFTWARE LTD May 1991 COPYRIGHT This document Copyright c 1991, Perihelion Software Limited. All rights reserved. This document may not, in whole or in part be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine readable form without prior consent in writing from Perihelion Software Limited, The Maltings, Charlton Road, Shepton Mallet, Somerset BA4 5QE. UK. Printed in the UK. Acknowledgements The Helios Parallel Operating System was written by members of the He- lios group at Perihelion Software Limited (Paul Beskeen, Nick Clifton, Alan Cosslett, Craig Faasen, Nick Garnett, Tim King, Jon Powell, Alex Schuilen- burg, Martyn Tovey and Bart Veer), and was edited by Ian Davies. The Unix compatibility library described in chapter 5, Compatibility,im- plements functions which are largely compatible with the Posix standard in- terfaces. The library does not include the entire range of functions provided by the Posix standard, because some standard functions require memory man- agement or, for various reasons, cannot be implemented on a multi-processor system. The reader is therefore referred to IEEE Std 1003.1-1988, IEEE Stan- dard Portable Operating System Interface for Computer Environments, which is available from the IEEE Service Center, 445 Hoes Lane, P.O. Box 1331, Pis- cataway, NJ 08855-1331, USA. It can also be obtained by telephoning USA (201) 9811393. The Helios software is available for multi-processor systems hosted by a wide range of computer types. Information on how to obtain copies of the Helios software is available from Distributed Software Limited, The Maltings, Charlton Road, Shepton Mallet, Somerset BA4 5QE, UK (Telephone: 0749 344345). Contents 1 Introduction 1 1.1 Hardware limitations .......................... 1 1.2 Actual requirements ........................... 3 1.3 Architectural improvements ...................... 4 1.4 Parallelism ............................... 6 1.5 The Transputer . ........................... 7 1.6 Helios . ................................. 8 1.7 Target hardware . ........................... 9 1.8 About this book . ........................... 11 2 Networks 13 2.1 Introduction ............................... 13 2.2 The components of Helios . ...................... 14 2.2.1 A simple network . ...................... 14 2.2.2 The Helios naming scheme . ................ 15 2.2.3 The I/O server . ...................... 17 2.2.4 The Nucleus .......................... 18 2.2.5 The Init program . ...................... 20 2.2.6 The network server . ...................... 21 2.2.7 The Session Manager ...................... 24 2.2.8 The Task Force Manager .................... 25 2.2.9 Summary of the bootstrap process ............... 26 2.3 Some example networks . ...................... 27 2.3.1 Single-processor embedded systems . ........... 27 2.3.2 Single-processor workstation . ................ 28 2.3.3 Workstation with I/O processor ................ 29 2.3.4 Workstation for developing parallel software ......... 29 2.3.5 A small network . ...................... 30 2.3.6 A fairly small single-user network ............... 30 2.3.7 A network with configuration hardware . ........... 31 2.3.8 A single-user supercomputer . ................ 32 2.3.9 Several single-user systems . ................ 32 2.3.10 A single-user process control system . ........... 33 2.3.11 A small multi-user network . ................ 34 2.3.12 Two connected single-user networks . ........... 35 2.3.13 A large multi-user network . ................ 36 i ii CONTENTS 2.3.14 A mainframe computer ..................... 37 2.3.15 Networked mainframe computers ............... 37 2.4 The real world . ........................... 38 2.4.1 Different hardware . ...................... 38 2.4.2 Inmos . ........................... 38 2.4.3 Parsytec . ........................... 40 2.4.4 Telmat . ........................... 42 2.4.5 Meiko . ........................... 44 2.4.6 Handling different hardware . ................ 45 2.4.7 Mapping task forces onto a network . ........... 46 2.4.8 Possible topologies . ...................... 48 2.4.9 Task force connectivity ..................... 49 2.4.10 Other considerations ...................... 50 2.4.11 Summary . ........................... 50 2.5 Network commands ........................... 50 2.6 Configuration files ........................... 52 2.6.1 host.con ............................ 52 2.6.2 initrc .............................. 54 2.6.3 .login, .cshrc, and .logout ................... 57 2.6.4 nsrc ............................... 58 2.6.5 Network resource maps ..................... 60 2.7 Configuring networks .......................... 72 2.7.1 Single-processor workstation . ................ 72 2.7.2 Workstation with I/O processor ................ 75 2.7.3 Workstation for developing parallel software ......... 77 2.7.4 A small network . ...................... 78 2.7.5 A fairly small single-user network ............... 80 2.7.6 A network with configuration hardware . ........... 82 2.7.7 A single-user supercomputer . ................ 83 2.7.8 Several single-user systems . ................ 84 2.7.9 A process control system .................... 85 2.7.10 A small multi-user network . ................ 87 2.7.11 Two connected single-user networks . ........... 89 2.7.12 A large multi-user network . ................ 90 2.7.13 A mainframe computer ..................... 94 2.7.14 Networked mainframe computers ............... 95 3 Programming under Helios 97 3.1 Simple programming .......................... 97 3.1.1 A simple program . ...................... 98 3.1.2 Driver options . ...................... 98 3.1.3 Multiple modules . ...................... 100 3.1.4 Make .............................. 101 3.1.5 Common suffixes . ...................... 110 3.2 More advanced programming ...................... 111 3.2.1 Libraries . ........................... 112 3.2.2 Other tools ........................... 118 CONTENTS iii 3.2.3 Manual compilation ...................... 122 3.3 Servers ................................. 128 3.3.1 Posix facilities . ...................... 128 3.3.2 System library facilities .................... 131 3.3.3 File systems ........................... 134 3.3.4 The /window server ...................... 135 3.3.5 The /rs232 server . ...................... 143 3.3.6 The centronics server ...................... 149 3.3.7 Mouse and keyboard servers . ................ 150 3.3.8 Networking servers . ...................... 152 3.3.9 /tasks and /loader ....................... 153 3.3.10 The null server . ...................... 154 3.3.11 The error logger . ...................... 154 3.3.12 Real-time clock . ...................... 155 3.3.13 The lock server . ...................... 156 3.3.14 Raw disc servers . ...................... 157 3.3.15 The X window system ..................... 157 3.3.16 Pipe and socket I/O . ...................... 157 3.4 Protection: a tutorial .......................... 159 4 CDL 167 4.1 The CSP model for parallel programming ............... 167 4.2 The CDL language ........................... 169 4.2.1 How to execute task forces................... 169 4.2.2 The task force definition .................... 171 4.2.3 Allocation of streams ...................... 174 4.2.4 Component declarations .................... 177 4.2.5 Replicators ........................... 179 4.2.6 Replicated component declarations . ........... 182 4.2.7 The environment . ...................... 184 4.2.8 Arguments and replicators . ................ 186 4.2.9 Signals and termination .................... 187 4.3 An example as easy as PI . ...................... 187 4.3.1 A simple problem . ...................... 187 4.3.2 How to parallelise the problem . ................ 188 4.3.3 The ring . ........................... 188 4.3.4 A farm topology . ...................... 193 4.3.5 Different levels of communication ............... 197 4.3.6 More about pipe I/O ...................... 199 4.3.7 Running the task force ..................... 199 4.3.8 FORTRAN task forces ..................... 201 4.3.9 Pascal task forces . ...................... 203 4.4 CDL farms and load balancing ..................... 205 4.4.1 A simple farm . ...................... 205 4.4.2 A simple load balancer ..................... 212 4.4.3 More about packets . ...................... 216 4.4.4 Advanced farms . ...................... 216 iv CONTENTS 4.5 Odds and ends . ........................... 218 4.5.1 Communication versus computation . ........... 219 4.5.2 Problems with worker components ............... 221 4.5.3 Parallel servers . ...................... 222 5 Compatibility 225 5.1 Introduction ............................... 225 5.2 Unix compatibility ........................... 225 5.3 File handle sharing ........................... 226 5.4 fork() .................................. 226 5.5 Signals . ................................. 228 5.6 Process identifiers . ........................... 230 5.7 User and group identifiers . ...................... 230 5.8 BSD compatibility ........................... 231 5.9 Porting techniques ........................... 233 5.10 Multi-threaded library access ...................... 234 6 Communication and performance 237 6.1 Communication . ........................... 237 6.1.1 Helios overview . ...................... 238 6.1.2 Pipes . ........................... 239 6.1.3 Sockets . ........................... 242 6.1.4 Message passing . ...................... 247 6.2 Performance ..............................