Systems Software Development
Total Page:16
File Type:pdf, Size:1020Kb
526 IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. SE-4, NO. 6, NOVEMBER 1978 ASSIST-V: An Environment Simulator for IBM 360 Systems Software Development CHARLES E. HUGHES, MEMBER, IEEE, AND CHARLES P. PFLEEGER Abstract-This paper describes ASSIST-V, a software tool designed their own operating systems without significantly degrading for use in the teaching of operating systems, fie management, and ma- performance for other users ofthe machine. However, VM/370 chine architecture courses. ASSIST-V is a program that provides an en- and are not student oriented. Although this situation vironment for the implementation, testing, and evaluation of systems CP/67 software for the IBM 360 series machines. This capability is achieved is "real-life," we feel it is too harsh for the beginning student by simulating all relevant aspects of the machine's architecture. In of operating systems. particular, ASSIST-V simulates interrupts, I/O channels, and I/O devices, A number of software aids have been developed to provide as well as all IBM 360 machine instructions. In addition, ASSIST-V students the opportunity to write and test operating system provides extensive debugging and statistics-gathering aids. modules. These simulators may be divided into three groups. Index Terms-Educational software, IBM 360/370, interrupt handling, Programs in the first group, exemplified by Donovan [21 I/O channel programming, operating systems, simulation, systems and Hughes and Walker [7] simulate the environment for software. some one or more operating system modules. A user writes the appropriate modules, links these with the simulator, and 1. 0 BJECTIVES executes the resultant program. For example, an environment A LTHOUGH much can be learned through the reading of might be provided for a main memory allocation routine. In appropriate textbooks, programming experience is still this case, the user's routine would be given commands to necessary to complete the education of a systems programmer. allocate and to deallocate varying amounts of memory. Experi- For example, it is common practice to include the program- ments might then be formulated to compare first-fit to best-fit ming of several of the components of a compiler in a course on allocation using two separate user modules. Systems in this compiler construction. Unfortunately, a similar experience is class have the advantages of being easy to learn and of allowing rarely afforded in operating systems courses. the use of a high-level language, usually PL/I or Fortran. Their Clearly, students should have the opportunity to write a main shortcoming is that they shield the user from the problems small operating system. It is therefore important to develop resulting from the occurrence of asynchronous events. In student-oriented packages on which operating systems can be addition, users of these systems are not provided the opportu- written. To be useful, any such package must present the stu- nity to program I/O channels, nor to control the allocation of dent with an environment that includes all the relevant aspects space on direct-access devices. of a computer's architecture. The characteristics ofthe machine The second group of systems is exemplified by Czarnick etal. and its I/O devices should closely resemble, or be the same as [1] . Here a parallel processing language is used to simulate a those of some widely available computer system. I/O devices hypothetical computer system. Hardware components of the that must be controlled by the student's system should include computer, e.g., the program counter and main memory, are direct access as well as unit-record equipment. The package represented by variables and arrays. Students are given the must be easy to use. It should provide debugging and perfor- assignment of writing operating system modules that administer mance evaluation aids. Finally, and of primary importance, it the allocation of these mock hardware resources. The student should be economical to use. modules are written in the parallel processing language and, therefore, may be executed simultaneously. For this reason, II. RELATED WORK the variables and arrays representing hardware must be treated IBM's VM/370 and CP/67 operating systems (see Goldberg as critical resources. Thus the potential for synchronization [3]) provide each user of a S/370 and S/360-67, respectively, problems arises in the use of systems in this second group. with an environment that gives the appearance of a dedicated However, there are still two drawbacks to the use of such machine (with the exception of imprecise values in the interval systems. First, the use of a hypothetical computer gives many timer). In an installation where VM/370 or CP/67 is the chosen students the feeling that the work being carried out is not operating system, it is possible for students to write and test applicable to real machines. Second, and more important, the isolation of operating systems modules from user modules Manuscript received October 3, 1977; revised April 10, 1978. This obviates the need of the operating system to protect itself work was supported by the National Science Foundation under Grant from users. This omits an important consideration in the design SER 76-14494. The authors are with the Department of Computer Science, University of operating systems. of Tennessee, Knoxville, TN 37916. The third group of student-oriented systems includes one 0098-5589/78/1 100-0526$00.75 X 1978 IEEE HUGHES AND PFLEEGER: ENVIRONMENT SIMULATOR 527 that was written at M.I T. (McCray [12] ,Madnick and Donovan III. IMPLEMENTATION ENVIRONMENT [81, [91, and Donovan [21), another developed at The Uni- The ASSIST-V simulator was written as a major extension versity of Tennessee (Stiles [14]), and ASSIST-V (Hughes and to an existing program called ASSIST. ASSIST is a student- Pfleeger [4] -[6]), the simulator being described here. Each of oriented assembler/interpreter for IBM 360-370 machines. It these simulates the IBM 360 machine instructions, interrupt was designed and implemented by Dr. J. R. Mashey, Dr. G. M. structure, and, in all but the Stiles system, a set of I/O channels Campbell, and Dr. C. P. Forney, all of The Pennsylvania State and devices. University (Mashey et al. [101, Mashey [11], and Overbeek The M.I.T. simulator is written in PL/I and requires input of and Singletary [13]). The present version, maintained by the a single-object module. The use of PL/I as the simulator's im- authors and distributed by The Pennsylvania State Uniyersity,1 plementation language makes the code easy to read and main- is in use at over 200 universities in the United States and tain, but results in slow execution times and a large memory abroad. requirement (about 170K bytes plus user area). The input ASSIST is small (full-option version is about 68K bytes plus object module must be produced by some standard language user area), and fast (300-statements/s assembly, 7300/state- processor (usually Waterloo's Assembler G). Assembly or ments/s execution on an IBM 360 model 65). It assembles all compilation times for these standard (nonstudent-oriented) IBM 360 instructions and interprets the execution of all non- processors are often substantially greater than the times for privileged instructions. It allows both user-written and system student-oriented ones. Moreover, the error messages pro- macros, as well as conditional assembly statements in the open duced by standard processors are signiflcantly inferior to code. It includes a number of student-oriented features, such those generated by student systems. Since cost effectiveness as pseudooperations to read a card, print a line, and display and ease of use are among our primary objectives, we view the the contents of registers or storage; monitoring oftime and out- two features just mentioned as drawbacks. In addition, the put; an extensive dump at program termination; techniques M.I.T. system has two deficiencies that we wished to overcome for conserving paper; and a selective, user-controlled cross- in our project. These are the fact that it does not interpret all reference listing. IBM 360 commands (omitted instructions include ED, EDMK, ASSIST-V is an extension to ASSIST. The assembler was TRT, and the decimal and floating-point commands) and the preserved virtually intact, and extensive additions were made fact that it does not simulate direct-access devices. to the interpreter. Since the assembler was unchanged, no The Stiles simulator is written in S/360 assembler language change to assembly speed has occurred; execution speed is and requires input of a load module. As with the M.I.T. sys- approximately 4300 instructions/s on an IBM 360 model 65. tem, the student's operating system must be assembled (com- A typical version of ASSIST-V (one card reader, one line piled) by some standard language processor. Use of a load printer, one disk, one drum) requires 74K bytes of storage module, instead of an object module, provides for additional plus user area. flexibility since students can write parts of their systems in one language and other parts in another language. Thus, for IV. IBM 360 ARCHITECTURE OVERVIEW example, the kernel of a system might be written in assembler An operating system for the IBM 360 series machines language, and all other parts in Pascal or PL/I. The primary establishes a nucleus of information in certain fixed storage shortcomings of the Stiles simulator are the fact that it does locations. These locations are accessed by both hardware and not interpret all IBM 360 commands (omitted are the translate software in order to handle exceptional conditions. and edit commands) and, more importantly, it does not An interuption is generated by hardware to note the oc- simulate I/O channels nor I/O devices.