Principles of computer operating system
(1) Introduction
Operating System Definition
Operating system is a set of control and management of computer hardware and software resources, reasonable scheduling of all kinds of jobs, as well as convenient user use of the program collection.
Objectives of the operating system
-
convenience
-
effectiveness
- Resources are busy and used efficiently.
- Order data to save storage space.
- Organize computer workflows properly.
-
scalability
- To meet the requirements of hardware and network development, the hierarchical structure should be adopted.
-
open
- Complies with the OSI international standard for open Systems interconnection. Is the core problem of computer technology in the 1990s.
The role of operating system
-
Interface between user and hardware system
Software interface, three ways to provide users
:- Command mode
- System call mode
- Graphics, window mode
Bare computer: a computer system that does not load any software.
Extension machine: A machine that covers software is also called a virtual machine.
-
The manager of four kinds of computer resources
- Processor (CPU) management
- Memory management
- Equipment management
- File management
-
Used as an expansion machine
The evolution of the operating system
- A computer system without an operating system
- Single-channel batch system (1950s)
- Process: a batch of operations to
Offline mode
Input to tape, inmonitor
Continuous processing under control. - Features:
- Automaticity: no manual intervention.
- Sequential: The execution is performed in the order in which the memory is entered.
- Single line: Only one job is held in memory.
- Process: a batch of operations to
- Multichannel batch system (1960s)
- Multi-channel: Concurrently stored in the memory
Multiple independent
The program. - Multichannel technology is
Shared
The technology. - Features:
- Multichannel: There are multiple programs in memory that can be executed concurrently
- Disorder: The completion time is independent of the order of entry into memory
- Schedulability: A job is scheduled twice from submission to completion. 1. Job scheduling external memory -> Memory (select multiple) 2. Process scheduling allocation processor (select one)
- The advantages and disadvantages:
- High resource utilization
- Large system throughput
- Throughput: The total amount of work done per unit of time
- Cause: 1. The resource is busy. 2
- Average turnaround time is long
- Job turnaround time: The time it takes for a job to complete and exit the system from the time it enters the system, usually hours or even days.
- It is extremely inconvenient to modify and debug without interactive ability.
- Multi-channel: Concurrently stored in the memory
- Time-sharing systems (1960s)
- Definition: A host is connected to multiple terminals, allowing multiple users to interactively use the computer through their terminals and share resources on the host.
- To generate power:
- 1. Human-machine interaction. (Debug while running)
- 2. Share the host. (Expensive equipment)
- 3. Easy to use for computer. (Input and control on the terminal)
- Characteristics of the
- Multi – way: namely simultaneity, macroscopic and microscopic at the same time turn.
- Independence: per user
feeling
Exclusive host. - Timeliness: short response time (2-3 seconds)
- interactive
- Real-time Systems (1960s)
- Real-time: Responds to external event requests in a timely manner
- Application requirements:
- 1. Real-time control: automatic piloting of industrial and weapons controlled aircraft
- 2. Real-time information processing: booking system
Basic features of the OPERATING system
- Concurrency (most important)
- Parallelism: Multiple events occurring at the same time. Concurrency: Multiple events occurring at the same time interval. (Multiple events have started and no one has finished)
- Single processor system: macro concurrent micro serial.
- Multiprocessor systems: parallelism may occur.
- There are two resource sharing modes:
- 1. Mutually exclusive sharing mode: access to critical resources
- Critical resources: hardware such as printer, stack, variable, table and other software.
- 2. Simultaneous access mode: Resources accessed by multiple processes at the same time, such as disks and files written by reentrant codes.
- 1. Mutually exclusive sharing mode: access to critical resources
- participatory
- Virtuality: The transformation of a physical entity into logical counterparts by some technique. For example: virtual processor, virtual memory, etc.
- Asynchrony: Processes move forward at unpredictable speeds.
** The two most basic characteristics of an operating system are concurrency and sharing
The five functions of an operating system
-
Resource management
- 1. Processor management (hardware)
- 2. Memory Management (hardware)
- 3. Device Management (hardware)
- 4. File management (hardware)
-
5. User interface
- The command interface
- Online user interface: Connected to a computer host.
- Suitable for: almost any computer operating system.
- Composition:
Command + terminal handler + command interpreter
.- Examples of online commands:
- UNIX:login; logout;
- DOS: copy; format;
- Command interpreter: The highest level of the operating system
- MS-DOS:COMMAND.COM
- UNIX: Shell
- Examples of online commands:
- Process:
- 1. The user enters information on the keyboard
The command
. - 2.
Terminal handler
Accept the command and display it on the screen. - 3.
Command interpreter
Interpret the binary and execute itThe command
.
- 1. The user enters information on the keyboard
- Offline user interface: Disconnected from the mainframe computer
- Application: Batch system. Also known as batch user interface
- Composition:
JCL+ job instructions + command interpreter
- JCL: Job control language
- Process: The user uses the control of the job
JCL
Written in the bookOperating instruction
On,Command interpreters follow instructions
Explain and execute.
- Online user interface: Connected to a computer host.
- Program interface
- Purpose: Set for user programs to access system resources
- Composition: A set of system calls
- System call: A system call is a subroutine that performs a specific function
- Graphical interface
- The command interface
System call procedure
Operating system structure design
Operating system development stage
- Generation 1: Structless OS (traditional OS architecture)
- Second generation: Modular OS architecture (traditional OS architecture)
- Generation 1: Layered OS architecture (traditional OS architecture)
- Generation 1: Microkernel OS architecture (1990s)