Basic Concepts 1.1 operating system

Topic Source: Wang 2020 computer operating system Source: Wang 2020 computer operating system

Typical operating system point of view:

1, the operating system is the interface between the user and the computer

2, the operating system is a resource manager

3, the operating system is a virtual machine

 

Operating system software is a collection of many, not the typical operating system point of view, (only on instructions from the amount, did not say the true role of the operating system)

Multi-channel programming technique is more than one job in the main memory, and at the same time is running, these jobs shared processor, peripherals, and other resources

Concurrency: two or more events occur at the same time interval

Parallel: two or more events occur at the same time

Single-core CPU: the same time can only execute a program, multiple programs can only be performed concurrently

Multicore CPU: a plurality of programs can be executed one time, a plurality of programs can be executed in parallel

 

1.1.2 operating system features
basic features of the operating system include concurrent, shared, virtual and asynchronous.
1) Concurrent
Concurrent refers to two or more events occur at the same time. Concurrency operating system refers to a computer system running a plurality of programs simultaneously, and so it has the ability to handle multiple programs concurrently executing scheduler. In the operating system, the purpose of the introduction process is to make the program can be executed concurrently. Operating system concurrency is through sharing can be realized.
Note that, parallel to which a system having arithmetic or characteristics may be operated simultaneously, two or more complete work or at the same time. Of parallelism related hardware support, multi-line or multi-processor hardware mechanism.
2) shared
resource sharing that is shared, refers to the system resources available memory process multiple concurrent execution of common use. It can be divided into the following two shared resource sharing:
(1) mutually exclusive sharing
certain system resources, such as printers, tape drives, although they can be provided to more than one process, but to make printed or recorded results not to cause confusion, should provide only allows a process to access the resource over a period of time.
For this reason, when the process A to access a resource, you must first request, if the resource is free at this time, the system can be assigned to use the A, after which time when there are other processes that have access to the resource (not as long as A complete) must wait. A visit only after the process and release the resource before allowing another process to access the resource. We call this resource sharing resource sharing formula known as mutually exclusive, and the period of time only allows a process known as critical resources or access to exclusive resources. Most physical devices in a computer system, as well as some of the software used in the stack, variables and tables are all critical resources, they are required to share each other mutually exclusive.
(2) simultaneous access method
There is also another type of system resources, allowing "while" they are accessed by more than one process at a time. Here the so-called "simultaneous" is often the macro, and on the micro level, these processes may be alternately access the resource that is "time-sharing." Typical for multiple processes "simultaneously" is the disk resource access equipment, with a number of re-entrant code written documents can also be "simultaneous" shared that several users simultaneously access the file.
Exclusive share, because of a resource over a period of time can only satisfy a request, otherwise there will be serious problems. While shared access, usually required, a time slot in several intervals effect complete request, the same effect continuous complete.
Concurrency and I share two fundamental characteristics of the operating system, both of which have something of the presence of each other: the sharing of resources is conditional on the concurrent processes, if the system does not allow concurrent execution of the program, the sharing of natural resources, not problems; If the system can not be implemented effectively manage the sharing of resources, it will also affect the concurrent execution of the program, or simply can not be executed concurrently.
3) Virtual
Virtual refers to a physical entity on the counterpart becomes several logical. In the operating system using a plurality of virtual technology, it is used to implement virtual processors, virtual memory, and virtual external equipment.
In the virtual processor technology, through multi-channel programming technology, multi-channel program allows concurrent execution method, to use a time-sharing processor. Using a multi-channel programming techniques, the physical CPU on a virtual machine for the multiple logical CPU, called a virtual processor.
By virtual storage technology, physical memory becomes a virtual memory machine, in order to expand the memory capacity up from the logic.
Can also virtual device technology, a physical I / O device to the virtual I / O device on multiple logical, and allows each user occupied by I / O devices on a single logic.
Operating system virtualization technologies can be summarized as: time division multiplexing techniques, such as time-sharing the processor; space division multiplexing, such as virtual machine memory.
4) asynchronous
In the multi-channel programming environment that allows concurrent execution of multiple programs, but due to limited resources, the implementation process is not one in the end, but stop and go, in order to move forward at an unpredictable rate, which is the asynchronous nature.

1.1.3 operating system functions and objectives
in order to provide a good environment for multi-channel program, the operating system should have the following aspects of the work can be: processor management, memory management, device management and document management. To facilitate the use of the operating system, it must also provide an interface to the user. At the same time the operating system can be used to expand the machine, in order to provide more convenient service and higher resource utilization.
1) operating system for the computer system resource manager
(1) management processor
in a multi-channel programming environment, processor allocation and to run all processes (or threads) as the basic unit, and thus the management of the processor can be attributed to management of the process. When run multiple processes simultaneously within the computer, so the process when to create and when to withdraw, how to manage, how to avoid conflict and reasonable sharing is the most important task of process management. The main function of the management process are: process control, process synchronization, interprocess communication, Deadlock, processor scheduling.
(2) Memory management
The memory management in order to run the multi-channel programs provide a good environment, user-friendly and improve memory utilization, including memory allocation, address mapping, and shared memory protection and memory expansion function.
(3) file management
information in the computer are in the form of a file, the operating system is responsible for part of the file system is referred to as the file management, file management, including the management file storage space, directory management and file management and read and write protection, .
(4) Device Management
main task is to complete the device management user I / O request, using a variety of user equipment, and improve the utilization of equipment, including buffer management, device allocation, and device processing equipment virtual functions.
2) operating system as an interface between the user and the computer system hardware
for the user using the computer, the operating system provides a user interface. Interface to the operating system divided into two categories: one is the command interface, the user using the operation command to control the organization and execution of the job; the other is an interface program, the programmer can use to request operating system services.
(1) The command interface
main command interface mode using the job control, there are two, i.e., on-line control and off-line control. Different job control mode, the command interface can be divided into command interface online and offline command interface.
Online interactive command interface, also known as command interface for real-time or time-sharing system interface. It consists of a set of keyboard commands. Operation command input by a user console or terminal, proposed various services to the system requirements. End users each enter a command, control is transferred to the operating system command interpreter, and then interpreted by the command of the program interprets and executes commands entered, complete the assigned functions. Thereafter, the control console or terminal and turn back, but this time the user can input the next command.
Offline command interface, also called batch command interface that is suitable for batch processing system, which is controlled by a set of job commands (also known as job control statements) components. The user can not directly intervene run offline job, in advance with the respective job control commands written in a job operating instructions, together with the job submitted to the system. When the system is scheduled to the job, the interpreter system commands or command job control statements on the job description interpreted by one, thereby indirectly control the operation of the job.
(2) Program Interface
program interface call by a set of command system (system call, also called the generalized commands) composition. Users through the use of these systems in the program call command to request the operating system to provide services. Users can directly use this set of system calls requesting various services, such as using a variety of external devices, perform operations related to disk files, application distribution and recovery of memory and various other control requirements to the system in the program.
3) operating system for the expansion of the machine
computer without any software support called bare metal, it only constitutes the material basis of the computer system, but the actual presented to the user's computer system is a computer software through several layers of transformation. Bare the innermost layer, which is outside of the operating system, provided by the operating system resource management functions and user-friendly features various services, successful transformation can be bare metal stronger, more convenient to use the machine, usually covering software machine called expansion machine, also known as a virtual machine.

 

 

General Software is a software application

If "software and hardware" The same can not be selected, the computer file does not belong to software

Application A, B, C are provided for the users

 

There are four basic features: concurrent, shared, virtual, asynchronous

 

 

Command Interface: allows users to directly use

API: Allows the user indirectly by a program consisting of a set of system calls (= API system call)

Ordinary applications can use the library functions, programming language provides library functions up

Published 313 original articles · won praise 64 · views 90000 +

Guess you like

Origin blog.csdn.net/PriestessofBirth/article/details/104796384