Introduction-Operating System overview

Source: Internet
Author: User

Computer

Computer is the great creation of mankind in the the 1940s, it has great effect on the progress and development of human society. Widely used in scientific computing, Process control, information transmission and data processing, has penetrated into the office, education, family and other fields.

The computer system consists of two parts: hardware and computer software.

    • Computer hardware : The most internal layer of a computer system is hardware. Mainly by the central processing unit (CPU), memory, input and output control system and input composition.
    1. CPU : Is the part that tells the operation and processing of the information.
    2. memory : Divided into main memory (memory) and auxiliary memory (disk, tape, CD, etc.), for storing various programs and data. The main memory can be accessed directly by the CPU.
    3. input : such as keyboard, mouse, monitor, printer, etc., is the communication between computer and user interface parts, input and output control system management Peripheral equipment (auxiliary memory and input) and main memory.
    • computer software : the outermost layer of a computer system is the person who uses it, and the interface between man and computer hardware is computer software. Generally, computer software can be divided into three categories: System software, supporting software and application software.
    1. system software : Computer system is closest to the hardware level of software, computer systems are indispensable software. such as operating systems, compiling programs, and so on.
    2. support software : software that supports the development and maintenance of other software. such as various interface software, software development tools and environment.
    3. application software : Software specific to the application domain. such as census software, aircraft booking software.

Operating system

The operating system (Operating system,os) is a system software that manages computer system resources, control program execution, improves human-machine interface, and provides support for application software.

The role of the operating system:

    1. Manages the resources of a computer system, including hardware resources (central processing unit, main memory, various peripherals), and software resources (Programs, data).
    2. To provide users with a convenient interface.
    3. Features that extend the hardware.

From the point of view of resource management, the functions of the operating system can be divided into:

    1. Processor management (processor allocation and scheduling, especially in the case of multi-channel programs or multiple users)
    2. Storage Management (management of primary storage)
    3. File management (to access, retrieve, and resolve file sharing, protection, and confidentiality to the user by name)
    4. Device Management (management of various peripherals, including allocation, start-up and fault handling)

The formation and basic types of operating systems

With the development of computer hardware and software technology, three basic types of operating systems have been formed: batch processing operating system, time-sharing operating system, real operating system.

    • Batch processing operating system

The first operating system appeared in the 1950s, and it was a " single-channel batch processing system ". If you think of a computational problem as a job , the system allows only one job to execute at a time. When a batch of jobs and initial data is handed over to the system, the system sequentially controls the execution of the job, which is done one after the other.

The 1960s " multi-Channel batch processing system ", which allows multiple jobs to be loaded into the main storage, so that a central processing rotation of each job, each job can simultaneously use the required peripheral equipment, improve the efficiency of computer system resource use.

    • Time-sharing operating system

The the 1960s also designed a "time- sharing operating system " that allows multiple users to use a computer system through a terminal connected to the machine, which quickly responds to user requests, making each user feel as if they have a separate computer that supports their own request service.

    • Real-time Operating system

The 1960s also appeared " real-time operating system " for control of production lines, control experiments and so on. Real-time operating system under the control of the computer system received external signals in a timely manner, and in a strict time limit to deal with the received events. For example, there is a reactor that provides parameters for a period of T, the computer system receives parameters, is determined, the calculation is completed, the command to control the valve takes time to T, then the T <= T should be guaranteed. To design the real-time operating system, we must first consider the real-time and reliability of the system, then consider the system efficiency.

The development of the operating system
    • Microcomputer operating System

In the the 1970s, the development of micro-processing technology contributed to the development of microcomputer. The simplest microcomputer consists of a central processing unit, a main memory, and a terminal (display, keyboard, mouse), usually adding a disk and a printer. At the time, microcomputers were mostly personal computers, and the main function of the control system was to implement file management, input/output controls, and command interpretation. An operating system running on an earlier microcomputer allows only one user to use a computer, known as a " single-user microcomputer operating system ", such as MS-DOS.

    • Network operating system

Several geographically dispersed and autonomous computer systems are connected by communication lines to form a computer network, while the operating system configured for the computer network is called " network operating system ". The main function is to realize the communication between each computer system and the sharing of various resources in the network.

    • Distributed operating system

The 1980s is the era of parallel computing. Because the price of micro-processing has been declining year after day, the function is expanding and the application is becoming more and more widespread . the distributed computer system is a special computer network composed of several computers, there are 3 kinds of structure (ring structure, star structure, tree structure), and the operating system configured for distributed computer system is called " distributed Operating system ".

The distributed operating system enables several computers in the system to work together to accomplish a common task (splitting tasks, executing in parallel, and finally merging the results).

The distributed operating system uses the client/server model. Typically, a server is committed to a certain class of tasks (such as print services, file services, database access services, drawing services, mail services, and so on).

For users, the distributed operating system has 2 main features:

    1. Unity . Users use a distributed operating system as if they were using a "single computer system", completely feeling that the system was composed of multiple computers.
    2. transparency . Users do not know the location of the system resources, they do not know which computer is in service, and do not know whether there are other users in the system competing with their resources.
    • Embedded operating system

With the infiltration of computer technology into various fields, the hardware of computers is no longer in the form of physically separate devices, but most or all of them are hidden and embedded in various application systems, such systems are called " Embedded (computer) systems ". Embedded (computer) system needs the support of embedded software, in which the " Embedded operating system" refers to the system software which can coordinate, process and control the various components and devices in the embedded (computer) system.

The main features of the embedded operating system are 2:

    1. miniaturization . Because of the small hardware configuration of the embedded (computer) system, the embedded operating system adopts the micro and low power structure under the premise of guaranteeing the application function.
    2. real-time sex . Embedded system is widely used in process control, data acquisition, transmission communication and other occasions, the response time is strict, and therefore, it should be a real-time operating system.

UNIX Operating System

UNIX is a universal interactive time-sharing operating system with the following key features:

    • Dapper . The structure of the core and the shell two layers, the core program carefully designed, simple algorithm. The shell provides a complete programming environment for the user. The combination of the core and the enclosure makes for a small, flexible and powerful system.
    • has a multi-level file system that can be loaded and unloaded . UNIX file system to form a multi-level tree, easy to quickly find files, facilitate file sharing, ensure file security, and the peripheral devices also as files to see, users do not have to distinguish between files and equipment, easy to use.
    • portability is good . UNIX is written in C and facilitates porting to different hardware environments.
    • Strong network communication capabilities . UNIX provides a range of network communication tools and protocols that are widely used.

UNIX is currently the only operating system that can be installed and run on microcomputers, workstations, mainframes, jumbo machines.

Linux Operating System

Linux is the network era of products, because of open source, so people can freely download, and its transformation, expansion and improvement, to help its rapid growth. It inherits the advantages of UNIX and makes a lot of improvements.

It is a multi-tasking and multi-user universal operating system with many features:

    • Support TCP/IP network protocol, and can integrate with other network, make the heterogeneous function convenient to network
    • Supports parallel processing and real-time processing to give full play to hardware performance
    • Supports multiple file systems

Working status of the processor

Any program needs to occupy the processor before execution, and a computer system often has both system programs, and user programs, they have to occupy the processor to complete their respective tasks. Since the resources in the computer system are managed uniformly by the operating system, no one user program can change the usage of the resource without authorization, so the processor should have different state to distinguish whether the instruction currently executing is the operating system or the user program.

    • Privileged Commands & non-privileged directives

To ensure the correct and reliable operation of the computer system, the instructions of the CPU are often divided into two categories: privileged instruction and non-privileged instruction. The instructions that are not allowed to be used directly in the user program are called " privileged Directives " and the rest are " non-privileged Directives ". For example, commands such as I/O directives, setting clocks, setting control registers, and so on are privileged directives that allow only the operating system to use and not allow user programs. If the user program directly uses these instructions, it may cause conflicts or cause errors due to some surprises.

    • Tubular and visual configuration

The central processing Unit has two working states: the head and the pipe state. The control can execute all instructions, and the configuration does not allow the execution of privileged instructions. Therefore, the operating system to occupy the central processing unit, the CPU should be operating under the control, when the user program to occupy the central processing unit, should let the central processing unit in the configuration of the work.

    • Program Status Word

How does the CPU determine whether the command is to be executed in the current state or in the control? And how to ensure that the alternate service for each program is not wrong?

program Status word word,pswis used to control the order of instruction execution and to retain and indicate the system state associated with the program.

The program status word contains 3 parts:

    1. Basic State of the program (A. instruction Address -Indicates the storage address of the next instruction; b. Conditional Code -Indicates the characteristics of the command execution result; State /Tube -Indicates whether the privileged command can be executed; d. wait/Calculate -wait for the status processor to not execute any instructions, the compute state processor executes the instruction in address order)
    2. Interrupt Code (the current interrupt event that occurs when the program is executed)
    3. Interrupt Screen bit (indicates if interrupt event occurs in program execution, do not respond to interrupt event)

Each program needs to have a program status word to describe the execution status of this program. Obviously, the operating system of the PSW in the configuration/pipe state should be set to the Tube state, and the user program in the PSW in the configuration/pipe configuration should be set to the configuration.

In a single-processor computer system, the entire system sets up a register of the PSW that is currently running the program, which is called the " program status Word register ". The processor always runs the program by the instruction address and other state settings in the application status Word register. Therefore, when the operating system is scheduled to run a program, the program's PSW must be fed into the program state Word register, the processor will control the execution of the program. Similarly, when a program temporarily gives up the processor, it must save its PSW, once it can continue to execute, but also the PSW can be fed into the program state Word register again.

Interface between the operating system and the user

To make it easy for users to use a computer system, the operating system provides 2 types of interface: programmer Interface (programmer interface refers to a set of system function calls) & operator Interface (operator interface refers to a set of operation control commands).

    • System call (Programmer interface)

The operating system has developed many different functions of subroutines (for example, read files, write files, allocate main memory, start I/O, etc.) for the user program execution call, these are provided by the operating system subroutine called the system function call program , referred to as system call .

System call is a kind of support that the operating system guarantees the programming language to work properly, at the source program level, the User programming language describes the logic requirements of the computation task, such as reading files, writing files, requesting main memory resources, etc., the implementation of these requirements can only be done through the system call of the operating system, Some of these requirements must also execute the hardware's privileged directives (such as I/O) to achieve the purpose.

Modern operating systems have an " inbound command ", an instruction that executes under an entry state. When the compiler translates the source program into a target program, it converts the logic requirement in the source program to call the system function into an inbound command and sets some parameters. When the processor executes a visit tube instruction, it generates an interrupt event to convert the user program to the system Invoker. The system Invoker implements the specified function according to the prescribed parameters, and then returns to the user program once the system call is finished.

    • Operation control command (operator interface)

The operating system provides the means by which an online user (the operator level) represents a job execution step is called an operation control command .

    1. Single by one: Each command is entered by the user, the operating system according to the command requirements of the control program execution, after the end of a command, notify the user to enter the next command, until the end of the job execution.
    2. Job Control Language: In batch processing system, the user is allowed to use the job control language to prepare a "job control manual" that represents the whole job execution step, and the system will automatically execute, the user does not have to wait in the side, both user-friendly, and facilitate the system to batch processing of jobs.

Test

1. What are the two major components of a computer system?

A: The computer system consists of two major parts, the hardware and the computer software.

2. What is the computer's operating system?

A: The operating system of a computer is a system software that manages computer system resources, control program execution, improves human-machine interface, and provides support for application software.

3. What resources does the operating system manage?

Answer: The operating system manages the hardware and software resources of the computer system. Hardware resources include the central processing unit, main memory, various peripherals and so on. Software resources include a variety of programs, data, documents.

4. Why is the "I/O directive" defined as a privileged command?

A: commands such as I/O directives, setting clocks, setting control registers are privileged directives that allow only the operating system to be used and not allowed in the user program. If the user program directly uses these instructions, it may cause conflicts or cause errors due to some surprises.

5. How do I restrict the use of privileged commands in a user program?

A: The computer system sets a set of privileged instructions that only allow the operating system to be used in a pipe state. The user program is set to execute under the configuration, so the privileged command cannot be used directly. Each program has a program status word (PSW), which is used to characterize the execution state of the program.

6. Why does the operating system provide "system calls"?

A: System call is a kind of support that the operating system guarantees the programming language to work properly, at the source program level, the User programming language describes the logic requirements of the computation task, such as reading files, writing files, requesting main memory resources, etc., the implementation of these requirements can only be done through the system call of the operating system, Some of these requirements must also execute the hardware's privileged directives (such as I/O) to achieve the purpose.

7. What are the characteristics of batch processing operating system, real-time operating system and timeshare operating system?

For:

1. Batch processing operating system is also divided into "single-channel batch processing system" and "multi-channel batch processing system". After handing over a batch of jobs and data to the operating system, the operating system will execute the job or execute the work in parallel, which improves the efficiency of the resource utilization of the computer system, but the user cannot directly interfere with the execution of the job when the job executes, and if there is an error, the operating system notifies the user to modify and reload.

2. The real-time operating system after receiving external signals, the need for timely processing, and in a strict time limit to deal with the received events. To control an experimental reactor as an example (T <= T, ...), the design of real-time operating system must first consider the real-time and reliability of the system, and then consider the efficiency of the system.

3. The time-sharing operating system allows multiple users to use the computer system through a terminal connected to the machine, to quickly respond to a user's request, so that each user feels as if they have a separate computer that supports their own request service.

8. What are the basic functions of the operating system from a resource management standpoint?

A: In order to improve the resource utilization of computer system, to ensure the safety and reliability of computer system work, operating systems unified management of all kinds of resources. From the point of view of resource management, the basic functions of the operating system can be divided into: Central processor management, storage management, file management and device management.

Introduction-Operating System overview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.