Operating system development history translated from an operating systems vade MECU
Translated by Raphael A. Finkel Liu Jianwen (http://blog.csdn.net/keminlau
)
Key: Operating System Development History
3.1 open shop
Early computers were bulky, expensive, and difficult to use. Computer users must be professional and both programmers and operators. Before using computer users, you must make an appointment for a period of time (Kemin: it means you have to make an appointment again when the time is reached ). The session situation is as follows:
Let's take a look at the use of a computer IBM 1964 session in 1620. This computer requires multi-step compilation to execute the program:
First, the user loads the Fortran compiler in the first round, including:
- Use the console command button to clear the primary storage;
- Put the compiler (saved with a punch card) into the card reader;
- Place the source program to be compiled (punch card) behind the compiler and read it with the compiler;
- Press the "LOAD" button of the card reader;
The card for the first round of computing output is called "intermediate output )". If any compilation error occurs, the lights on the console will flash and the error message will be displayed on the typewriter on the console ).
Assuming everything is complete, load the compiler and "intermediate output" in the second round, and output the second group of cards, called "executable deck", if successful ". Step 3: the user will adjust the "executable deck" order and load it into the computer together with the sub-Library (another ten-inch card) to observe the computer operation carefully.
The calculation result is output to the card or print paper. The calculation result is often incorrect. To call an error, you can directly view the primary storage content or modify the program through the console switch (console switches. If the time is not enough, the frustrated user will print the primary storage content (the so-called dumping dump of store) and analyze it in his spare time. If you have completed the computing task before the applied time period expires, the computer will remain idle until the next scheduled time period.
Kemin: In the early days, a single program, a single user's computer, had no need to operate the operating system, because the user exclusive all the resources and did not need to "manage". The user operation primitive is very primitive, and almost operates on bare metal, there is no virtual machine concept.
3.2 operator-driven shop
According to the usage of the previous pre-defined single-channel single-user computer, the computer's resource utilization rate is very low. Some computer resources are idle in different operation stages. For example, the CPU is idle when cards are manually loaded, and the printer is idle during card loading/unloading and calculation. Commercial computers cannot tolerate such waste. To improve resource utilization, a method of manual speed-up is proposed, specifically employing an operator to manage computer operations, including loading jobs) enable the computer and collect computing output. The session is as follows:
Full-time operators are faster than new and old computing users in complex operations (such as loading/unloading cards or tapes), reducing the time needed to switch jobs or steps. If a program error occurs, the operator dumps the content of the primary storage. You cannot directly monitor the primary storage and patch the program. However, because the job is accelerated, you can submit the modified program and run it quickly. In this way, each user only needs to spend the time required to run the job, without having to set a fixed time in advance, resulting in a waste.
The operator is an individual, of course, more or more intelligence than the subsequent resource manager-the operating system. For example, the operator can reduce the processing time by batch processing similar jobs. For example, a batch of similar jobs only need to load the compiler in two rounds without one job in two rounds; the operator can also sort jobs according to their priority or duration. For example, long jobs can be scheduled to run at night.
Kemin: At this stage, the software and hardware functions have not been improved.
Kemin: the essence of resource management is the introduction of multi-program and multi-channel concurrency competition for resources. The hired operator is the ancestor of the operating system because it is responsible for part of the operating system. But the operator is not a program.
Kemin: from another perspective, is the operating system essentially a multi-channel program? Is there a need for an operating system in a computing environment without multiple channels, and direct resource control is not acceptable? Is a Virtual Machine (such as a sub-Library) also called an operating system?
Kemin: At this stage, if the operator is counted as an operating system, the operating system is also single-channel (the current CPU job cannot be interrupted ), it only narrow the space that may increase the speed of each step or between jobs in the job.
3.3 offline transput
Most of the operator's work is mechanized, so the next step is to automate these work steps, for example. First, the input of the job is collected offline, and a machine called a satellite is used to dump the card data to the tape (TAPE ). When the tape is full, the operator mounts it to the master computer. Reading a job from a tape is much faster than reading a card, which saves a lot of transmission resources. The computing output is also output to the tape and then output to the satellite machine offline.
As you can see, there is still an operator between the computer and the user. What is the difference between the operator and the former operator? What is the computing process of a computer before attaching a tape to the Main Computing System and removing the output tape for offline output?
To achieve automatic job execution, a small monitoring program will reside in the primary storage and be responsible for coordinating job operations, such as resetting the primary storage or loading another job after a job is executed. To separate different jobs on tape and meet different job needs, a Monitoring Program's control conventions (conventions) must be established. These conventions are the prototype of the command language (rudiments ). For example, it is agreed that the control card is marked with an asterisk in the first column of the card to distinguish it from the data card. Refer to the following figure taken from modern operating system:
The monitoring program has the following responsibilities or functions:
- Explain Command Language
- Record Diary
- Provides independent input and output functions (using cards instead of tapes for input)
The program itself can directly process the input and output, but for convenience, the input and output functions are transferred to the monitor program, which is also the ancestor of the device driver.
Kemin: In the offline batch processing stage, the monitoring program is the beginning of a well-known operating system. But it is not a modern operating system. Because the computer's main memory is still a single program, the monitoring program only takes over most of the work managed by the operator, and compresses the Time of the single step to the limit (depending on the hardware speed at that time ).
Kemin: At this stage, the software introduced a monitoring program to speed up the process of a single process. The hardware introduced a tape drive to speed up data input.
3.4 spooling Systems
Spooling systems, a new online system in the next phase, provides improved functions, including the introduction of interruptions, and the input and output units are designed to run at the same time as computers. The input/output unit sends an interrupt signal to the host after completing the read/write operation. After receiving the signal, the host saves some important information (such as the program counter of the current job ), and jump to the specified location-the device service program to handle the interruption. A device service program is a device driver that is integrated into a monitoring program to process interrupt requests.
In this phase, disks are used as auxiliary storage media for computers. At this time, the computer can calculate a job while reading the second job into the disk, and print the computing results of the third job stored on the disk at the same time. Unlike tapes, disks are randomly accessed, and job data can be stored in any location on the disk. Therefore, the computer does not need to execute tasks in the order in which jobs are loaded. The monitoring program at this stage also integrates a sched program with very primitive functions. The scheduling is based on the job priority and execution time. Both parameters are specified by the control card.
Operators at this stage also need to participate in some management work:
- Mount the tape and load the job data;
- Determines the priority of jobs and other policies;
- When the monitoring program unexpectedly crashes, restart the machine.
This running mode is called the "spooling system", and its monitoring program is the beginning of a modern operating system.
Spooling systems is a shared-type computer that does not provide users with the opportunity to debug programs separately. This is also the demand for further development.
Kemin: spooling systems introduces the concept of interruption, implements a certain number of concurrent functions, and improves resource usage. However, spooling systems is still single-channel, with only one primary job exclusive. Although the monitoring program of spooling systems is the beginning of a modern operating system, it is more like a finite automatic machine. There was a major change in the architecture-introducing the interrupt mechanism to Implement Asynchronous computer operations, and the invention of Random Access disks to enhance computer functions. I personally think that spooling systems is more of a change in the number of features, not much qualitative changes.
Kemin: Software improvements at this stage ......
3.5 batch multiprogramming
Spooling systems does not maximize the efficiency of all computer resources. Not all single jobs need to occupy all primary storage. When a job is input/output, the CPU is still idle. Multi-channel technology is the next natural development. For example, a circle indicates a job ). When a job is waiting for input and output, another job can be computed. Due to the different nature of jobs, there are still some problems that need to be addressed by multiple technologies. For example, jobs in a computing set may occupy the CPU all the time, forcing jobs in a data processing set to wait for a long time without moving forward. Competition for and allocation of time resources is the main content of the Process Management chapter.
Multiple technologies will also lead to Space Resource Competition. The number of job programs that a computer can run at a time depends on the primary storage capacity and the ability to divide the hardware space. In addition, some protection mechanisms must be introduced to prevent the interaction between job programs. In Chapter 3 memory management, we will discuss space allocation policies and security mechanisms.
Each program in the primary storage is basically independent of each other. The monitoring program can distinguish them and apply policies (such as scheduling policies) to them independently ). Each program has its own time, space, and data transmission needs. The concept of process is introduced to replace the concept of a single step of a job. The operating system (instead of the Monitoring Program) is responsible for tracking and controlling process activities. In the operating system structure of this phase, the process cannot directly control the input and output devices. The process must send service requests to the operating system kernel, and the input and output are also competing resources.
Allocating resources to processes is not a simple task. This is unpredictable because the process will apply for various resources at different stages of the running process. If the resource is unavailable, the process will be blocked. What should I do later? This is the content of chapter 4.
With the development of multiple technologies, the operating system develops the idea of kernel structure. The operating system kernel is composed of a group of Management subroutines responsible for managing computer time, space, and information transfer resources. One kind of management is to respond to various resource requests of processes. For example, a process from the upper layer processes service requests and device interruptions at the lower layer.
Different kernel activities share some data, which cannot be modified and must be consistent. The concurrency control mechanism is added to the operating system to prevent mutual interference between these activities. Chapter 8 introduces mutex lock and synchronization. (Kemin: Is concurrency control only for Kernel activity ?)
3.6 interactive multiprogramming
The next stage of operating system development is interactive multiprogramming ). For example. User-oriented transmission devices use interactive terminals instead of cards or tape drives. Now users can directly interact with the program and input the data required by any program. Unlike in the past, they can only package all the data before running the program.
Interactive computing is often added to an existing multi-channel batch processing environment. For example, TSO (timesharing option) is an extension module of the OS/360 operating system. On the other hand, batch processing is added to the existing interactive environment. For example, the UNIX operating system provides the batch processing service.
Interactive computing (also known as time-based computing) revolutionizes the use of computers. The computer has evolved from a digital shredder to a real information processor. Users can compile data files online using interactive text editing software. These files can be programs, documents, or pure data. The concept of a job or job step is gone. Instead, it is a session, which refers to the process from login (linking to the host through the terminal) to logout (disconnecting the host).
You generally need to provide the user name and password when logging on. The data is converted into a user ID, which is used to associate processes and files created by all users on the host. User identity is also used in the operating system kernel to implement some control functions, such as determining whether the file has the right to be modified.
During the session, although many users may have logged on at the same time, the user can assume that the terminal excludes the entire computer. After a user logs in, a process is created to provide services for the user. It is the command line interpreter (command interpreter ). The command line interpreter and some other interaction tools will be discussed in chapter 7, where there will also be a general discussion of the user interface.