A Multiprocess Operating System for 16 Bit Microcomputers Or

A Multiprocess Operating System for 16 Bit Microcomputers Or

A Multiprocess Operating System for 16 Bit Microcomputers or Porting UNIX1 to a NS32016 with Enhancements Lucy Chubb 1987 Submitted in partial fulfilment for the requirements of the degree of Master of Science, School of Electrical Engineering and Computer Science, University of New South Wales. 1Unix is a trademark of AT&T Bell Laboratories CERTIFICATE OF ORIGINALITY I hereby declare that this submission is my own work and that, to the best of my knowledge and belief, it contains no material previously published or written by another person nor material which to a substantial extent has been accepted for the award of any other degree or diploma of a university or other institute of higher learning, except where due acknowledgement is made in the text. Signed . Date ..... I would like to extend my sincere thanks to my supervisors Dr. David Mee and Dr. David Clements for their assistance during my thesis and their valuable comments on the style and contents of my thesis. I would also like to thank my husband Peter for patiently listening to repeated explanations of my project and for reading and commenting on my thesis. - 1 - ABSTRACT This thesis describes how the Unix operating system version 7 was ported to a microcomputer based on the NS32016 CPU and associated slave processors. The port had several aims: to get a working kernel running on the NS32016, to implement paged virtual memory, to change the representation of processes so that the address space of each running process corresponds to a file in a directory created for that purpose, and investigate any further developments which such changes might make possible. Preparation for the port required making sure that the appropriate hardware and software tools were available and familiarization with the source code of Unix. After deciding what modifications were required the port proceeded by designing, coding and testing the changes. The kernel is now essentially complete. Finally, a number of extensions to the operating system based on the changes made to the representation of processes and the implementation of paged virtual memory are proposed and discussed. These extensions allow a simpler implementation of text sharing and the ability for processes to map files into their virtual space. -2- CONTENTS 1. Introduction .. .. ..... .... .. .. ....... .. .. ... .... .. .. .. ... ... .. ..... .. .. ......... ...... .. ..... .... .. .. ... .. .... .. ..... .. .. .... ... 5 1.1 Project Goals .. .. ... ...... .. .. ... ...... .. ... .... .. .. ..... .. .. ....... .. ...... .. ..... .. .... ..... .. .... .. ..... .. .. .. ... ..... 5 1.2 Porting an Operating System .. .. ... .. .. .. ....... .. .. ....... ...... .. ..... .. ...... ... .... .. .. ..... .. .... .. ........ 6 1.2.1 What is Portability? . ... .... .. .. ..... .. .. ....... .. ...... ....... .. ......... .. .. .. ... .... .. ....... ...... .. .... 6 1.2.2 Features Contributing to Portability................................................................ 6 1.2.3 Unix as a Candidate for Porting...................................................................... 7 1.2.4 Preparation for Porting.................................................................................... 7 1.2.5 The Process of Porting.................................................................................... 9 1.2.6 Designing Changes......................................................................................... 10 1.3 A Brief look at Unix................................................................................................. 11 1.4 Ways and Means....................................................................................................... 16 1.5 What Comes Next..................................................................................................... 17 2. Software and Hardware Tools.......................................................................................... 18 2.1 Software.................................................................................................................... 18 2.1.1 ACK -The Amsterdam Compiler Kit............................................................. 18 2.1.2 NLD - The L Fonnat Downloader .................................................................. 19 2.1.3 ARCH - the archive and library maintainer.................................................... 19 2.1.4 The DB16000 monitor.................................................................................... 20 2.1.5 Make............................................................................................................... 20 2.1.6 Cxref - the C crossreference generator............................................................ 21 2.2 Hardware Used......................................................................................................... 21 2.2.1 The DB16000 Development Board................................................................. 21 2.2.2 The NS32016 Central Processing Unit........................................................... 22 2.2.3 The NS16202 Interrupt Control Unit.............................................................. 26 2.2.4 The NS16082 Memory Management Unit...................................................... 27 2.2.5 Address Translation........................................................................................ 28 2.2.6 The WD1002 Winchester/Floppy Controller.................................................. 29 2.2.7 The Disk Drives.............................................................................................. 31 2.2.8 The Source Machine - VAXl l/780 ................................................................ 32 3. A Unix Port..................................................................................................................... 34 3.1 Traps and Interrupts.................................................................................................. 35 3.2 The Unix Input/Output System................................................................................. 42 - 3 - 3.2.1 Writing a New Device Driver......................................................................... 42 3.2.2 Block Input and Output .................................................................................. 43 3.2.3 Character Input and Output............................................................................. 49 3.2.4 The Console Device Driver............................................................................. 55 3.3 Scheduling, Synchronization and Timing................................................................. 57 3.4 The UNIX File System............................................................................................. 61 3.4.1 The Initial File System.................................................................................... 62 3.5 Memory management............................................................................................... 65 3.5.1 Virtual Memory.............................................................................................. 65 3.5.2 Swapping Under Unix .................................................................................... 66 3.5.3 Demand Paging............................................................................................... 67 3.5.4 An Implementation of Virtual Memory with Demand Paging........................ 68 3.5.5 Transferring Data Between Virtual Spaces..................................................... 83 3.5.6 Management of Real Memory........................................................................ 85 3.6 Process Management................................................................................................ 89 3.6.1 Processes under Unix Version 8 .. ................................................................... 90 3.6.2 The Representation of Processes..................................................................... 90 3.6.3 Process Duplication........................................................................................ 92 3.6.4 Process Execution........................................................................................... 96 3.6.5 Process Termination ....................................................................................... 98 3.6.6 Creating a Core Image.................................................................................... 99 3.6. 7 Process Switching........................................................................................... 100 3.7 System Calls............................................................................................................. 104 3.7.1 System Calls Deserving Special Mention....................................................... 105 3.8 System Initialization................................................................................................. 107 4. Proposed Extensions........................................................................................................ 114 4.1 Representation of Virtual Space ............................................................................... 114 4.2 Shared Text............................................................................................................... 116 4.3 Setting Up Segments................................................................................................ 118 4.4 Extending Segments................................................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    145 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us