System Design for a Multi-·User Microprocessor
Total Page:16
File Type:pdf, Size:1020Kb
SYSTEM DESIGN FOR A MULTI-·USER MICROPROCESSOR- iASED APPLICATION By NEENENDRA R. PANDYA .Bacfuelor of Engineering Bangalore University Bangalore, India 1979 Submitted to the/ Faculty of the Graduate College of the O~lahoma State University in partial ftilfillment of the requirements for the Degree of MASTER OF SCIENCE December, 1981 SYSTEM DESIGN FOR A MULTI-USER MICROPROCESSOR- BASED APPLICATION Report Approved: ~- z: . #..L-:~ ()~ll~ Dean of the Graduate College ii ACKNOWLEDGMENTS I am grateful to my principal, adviser, Dr. John R. Phillips, for his constant guidance and willing help throughout the course of my study. I would also like to thank my committee members, Dr. G. E, Hedrick and Dr. M. Fol~ for their encouragement and assistance. I would like to express my gratitude to Dr. D. D. Fisher, head of the department, for his advice and guidance. I thank Mrs. Grayce Wynd for her excellent typing of the report. I also wish to express my since,re appreciation to Dr. Meg Kletke for being very helpful and considerate during my position as a Graduate Research Assistant in the Department of Agricultural Economics. I am deeply indebted to my parents, brothers and sister for their constant inspiration, encouragement and guidance; they have made all of my achievements possible. iii TABLE OF CONTENTS Chapter Page I. -INTRODUCTION 1 Objective ..... 1 Project Overview 1 Approach to System Design. 2 II. THE HARDWARE SYSTEM 7 Selection and Classification of Essential Hardware Functions .. , ..... 7 Description of Specific Jiardware Components . 10 Polling •.... , ... 12 Interrupt I/0 ... 14 Direct Memory Access (DMA) . 18 III. THE SOFTWARE SYSTEM 21 General Considerations in Operating System Selection ...... 21 Object-oriented Operating Systems 22 Types of Operating Systems .. 25 An Operating System's Resource Management 26 Processor-time Management 26 Multi-user Capability ...... 28 Synchronization Between Interacting Processes .... e •••••• 28 Mailbox Communication ..... 30 Deadlocks and Their Resolution 31 Prevention ..... 31 Automatic Detection 32 Operator Detection 32 Memory Management 32 Peripheral Management 34 File Management 39 Selecting a Specific Operating System 43 Reentrant Program Considerations 47 IV. APPLICATIONS OF SYSTEM DESIGN so A Real-Time Alarm System .. 50 A Reentrant Text Editor .. 62 iv Chapter Page V. SUMMARY, CONCLUSIONS, AND FUTURE WORK 69 LIST OF REFERENCES .••.••.•••.•• 71 V TABLE Table Page I. Programmable Interrupt Modes Operation 14 vi LIST OF FIGURES Figure Page 1. A Critical Path Chart 4 2. System Architecture of the iSBC 86/12A Single-Board Computer • . • . • • • 11 3. Three Methods of I/0 Control. 13 4. Handling More Than Eight External Devices . 16 5. iSBC 534 Four Channel Communications Expansion Board Block Design. • . •.••••• 17 6. iSBC 206 Disk Controller Block Design . 19 7. Hierarchy in a Computer System •.••• . 23 8. A State Diagram of a Process • . 24 9. Resources to be Managed by an Operating System. 27 io. A Process Control Block . .. 29 11. Interprocess Communication Using P and V Operators. 31 12. Single Contiguous Allocation. 33 13. Interrupt Handling •.• , . 36 14. Single Buffering (a:), Double Buffering Strategy (b) , .. 38 15. An Operating System's File Management System. 40 16. Logical File Organization - Sequential (a), Random (b), and Indexed Sequential (c) • . • • . 42 17. Stack Area Setup During a PL/ M Procedure Call . 49 18. Connections to the System's Programmable Interrupt Controller . , . • • • . • . • . • . 52 19. Connections to Ports A and B of the 8255A Programmable Peripheral Interface •.• , ••.••.•.•• , 53 vii Figure Page 20. User-System Interface Process 'EXEC' 55 21. Read/Set Alarm Process 'RDALARM' 57 22. Alarm Process 'ALARM(N)' ..•.• 58 23. Monitor for Alarm Message 'AMSG' . 60 24. ·Routine 'PMSG' to Print Message on CRT. 61 25. User Command Process . 65 26. Editor Flowchart .• 67 viii LIST OF ACRONYMS CRT - Cathode-ray tube DMAC - Direct memory access controller I/0 - Input/output iSBC - Intel single board computer MULTIBUS - Intel single board computers' system interface bus OS - Operating system PIC - Programmable interrupt controller PIT - Programmable interval timer PPI - Programmable peripheral interface RAM - Random access memory ROM - Read-only memory UART - Universal asynchronous receiver-transmitter USART - Universal synchronous and asynchronous receiver-transmitter µC - Microcomputer µP - Microprocessor ix LIST OF DEFINITIONS Allocation technique - The method of providng a process with access to a shared resource. Communcation expansion board - A board containing hardware to provide expansion of systems communications capability. Direct memory access controller - A specialized processor designed to perform high speed data transfers between memory and the device. DISKIO - The disk input/output module of the RMX/80 operating system. Disk sector - Fixed length sections that a track is divided into on a disk. Dynamic load - Refers to an electrical circuit where events occur that vary in amplitude and duration with time. Expansion boards - Boards that provide system expansion and support through CPU, memory, and I/0 boards. Extent - A collection of several contiguous disk sectors. IBM 5440-type disk drive - Top-load~ cartridge-type disk drive with a controller drive interface, mechanically sectioned for 12 sectors. Interrupt level - A unique level at which the occurrence of an interrupt can be identified. Logic state analyzer - Used in debugging software and complex software hardware faults. Presents the flow of the system's program by monitor . ing all important circuit points. Master-slave programmable interrupt controller (PIC) configuration - A configuration used to handle more than eight external devices. One PIC is at a higher level than the others; it is called the master, and the others are called slaves. Memory protection - A method of ensuring that the contents of main memory within certain variable limits are not altered or inadvertently destroyed. Networking - Sharing and accessing of information between computer systems. Non-contiguous allocation - An allocation method that assigns physically nonadjacent sectors to a file. X Object-oriented architecture - Makes an operating system easier to under stand. It uses objects (data structures) as building blocks that the operators (system calls) manipulate. Primitive - Operation provided by an operating system nucleus for use in synchronization. Programmable interrupt controller (PIC) - A programmable device that handles interrupt requests from more than one external device. Resource - Any device or item used by a computer, including special areas of memory such as buffers. RMX/80 disk file system - A module of the RMX/80 operating system that provides for the filing and retrieving of data using disks. RS232C - An Electronics Industry Association (EIA) standard that covers the electrical specifications for bit-serial transmission, as well as the physical specifications. Serial input/output - Required for certain devices such as teletype, tape and disk communication. Each time a bit is passed on a single line according to a serial standard. Time-slicing - A technique that shares processor time among several processes. The quantum of time allocated to a process is termed a time slice. Universal asynchronous receiver-transmitter (UART) - A serial-to-parallel and parallel-to-serial converter. Universal flexible diskette controller - A diskette controller capable of supporting virtually any software - sectored, single density diskette drive. xi CHAPTER I INTRODUCTION Objective This report develops a paper system design for a multi-user micro processor based application. It gives the novice designer a feel for· approaching and tackling the task of microcomputer system design. A few detailed applications illustrate the design process. None of the examples presented is intended to be a complete or specific design. A result of this report is guidelines for the systematic approach to the design process. Such an approach greatly simplifies,the process of sys tem design. Although terms are explained at a general level, this report deals with specifics quite often to elucidate certain design criteria. Project Overview When a designer embarks on a microcomputer system design project, he should take a systematic approach to the design process. In the section on "Approach to System Design," hints about hardware and soft ware design are presented. Examples using the INTEL 8086 CPU with PL/M-86 as the application language are used throughout the design process. Use of diagnostic routines and discipline in software are also explained. Finally, the importance of economics, testing, and system integration in design are given. The chapter on the hardware system first distinguishes essential 1 2 hardware functions needed in the design. Specific boards to implement these functions are then selected along with the justification of their selection. The advantages of the processor and language selected are also given. In the software systems chapter, first basic terminology used in operating systems is explained and the keypoints in selecting an oper ating system are given. The keypoints indicate the usefulness and power of an operating system. This section gives the designer a handle on selecting the operating system he needs. In the next section, a specific operating system is selected based on the points in the pre vious section. The selected operating system is shown to be very suit able to our design requirements.