Basic Cognition of Operating System

Source: Internet
Author: User

Basic Cognition of Operating System

The school opened a computer operating system, and more than half a semester has passed. At the end of the semester, I feel that I have not learned much. But I still need to know most of the knowledge in the book. Write it down in idle time for your reference. Occasionally, you can also review the accumulated knowledge of internships in a few months.

Composition of computer systems

Computers are what we need in our daily lives. They make up the keyboard, screen, and so on that we can touch. Of course, there are also internal cpu and memory. Our computer-mounted systems, such as win7 and win8, are called operating systems. If the computer seller we just bought has not installed the system for us, it is called "bare metal ". That is, nothing can be used. We often use it to download qq nlp tools, League of legends and other software. In other words, we use computer systems. It consists of two parts:

Hardware System (bare metal)

Components: cpu, memory (primary and secondary storage), I/O, and I/O control systems.

Software System

Components: system software (managing operations on the computer itself. Such as operating systems, compilation), and application software (provided to users for solving problems. Such as scientific computing and thing management)

Operating system definition

Operating System (OS) is a collection of program modules that control and manage computer hardware and software resources.

How can this problem be solved? For example, we often run a lot of programs on the computer. Here we talk about QQ, and thunder is still being downloaded. We chat to accept a lot of images, download a lot of movies, all need to be stored in the storage, all need the cpu for the corresponding calculation. And how to calculate and manage storage? It is what the cpu and storage devices do. Sometimes we switch to QQ chat, sometimes we open a browser, maybe we only need to click the corresponding shortcut icon to start, and for the computer, we need to control the execution of the corresponding software and so on. At the user level, we use software features. On the hardware layer, the computer uses hardware features and functions. In the middle, how to combine software and hardware is what the operating system does. It cannot be said that when you click the QQ icon, there will be no chat window on the terminal. The main function of the operating system is to organize and control hardware and software resources, organize computer workflows, control program execution, and provide various service functions to users, so that the computer system can run efficiently.

The difference between the concurrency of basic features: parallelism refers to the occurrence of two or more events at the same time.
Concurrency refers to the occurrence of two or more events at the same time interval. (Similar to concurrency, but more than hardware support)
Shared operating systems use resources in computer systems together with programs of multiple users. Resource Sharing means that the hardware and software resources in the system are not exclusive to a program, but are used by multiple users. Concurrency and sharing are the two most basic features of the operating system, and the two are mutually existent. Resource Sharing is conditional on program concurrency. if the system does not allow concurrent execution of programs, there is no resource sharing problem. If the system cannot effectively manage resource sharing, it will also affect the concurrent execution of the program, or even cannot execute the program concurrently. Virtualization

The so-called virtual means to change a physical entity into several logical counterparts. Physical entities (the former) are real, while the latter is virtual. Correspondingly, virtual technologies are used to implement virtual technologies. Multiple virtual technologies are used in the OS to Implement Virtual processors, virtual memory, virtual external devices, and virtual channels.

Asynchronism allows concurrent execution of multiple processes in a multi-program environment. However, due to resource competition and other constraints, the execution of processes is not "in one breath, instead, it runs in the form of "Stop and stop. In multi-program environments, program execution is performed asynchronously. When is each Program executed, the execution sequence between multiple programs and the time required to complete each program are both uncertain and unpredictable. The process advances at an unpredictable speed, that is, the Asynchronization of the process.

Five function processor management

The main task is to effectively manage the distribution and operation of processors. Management of processing machines can be attributed to management of processes.
Process control: when a user job is running, one or more processes should be created for it, and all resources except the processor should be allocated to it, and put it into the process ready queue. When the process is completed, immediately withdraw the process to release its resources in a timely manner. The basic function of process control is to create and undo processes and to control the state conversion of processes.
Process Synchronization: Process Synchronization means that the system coordinates the processes that are concurrently executed. The most basic method of Process Synchronization is to allow processes to access critical resources in a mutually exclusive manner. In addition, the system should coordinate the processes that cooperate with each other to complete common tasks.
Process Communication: for processes that cooperate with each other, certain information is often exchanged between them during their operation. The information exchange between these processes is called Process Communication.
Process Scheduling: When a running process has been completed or cannot be executed due to an event, the system should schedule the process and re-allocate the processor. Process Scheduling is based on a certain algorithm, such as the highest priority algorithm, which selects a process from the process readiness queue, assigns the processor to it, sets the running site for the process, and puts it into operation.

Memory Management

Main Tasks: provide a good environment for concurrent operation of multi-program, facilitate the use of memory, improve the memory utilization, and provide sufficient storage space for as many users as possible.

Memory Allocation: the primary condition for concurrent execution of multiple programs is that each program has its own memory space. Therefore, allocating memory for each program is the most basic function of memory management.
Memory protection: to ensure that each program can run in its own memory space without interfering with each other, each program is required to check whether all access to the memory is valid at any time during execution. It is necessary to prevent other programs from being disrupted due to a program error, especially to prevent user programs from infringing the memory zone of the operating system.
Address ing: In a multi-Program System, the operating system must provide the function of converting the logical address in the program address space to the physical address corresponding to the memory space. The address ing function allows users to easily program physical storage spaces without having to worry about the details of physical storage space allocation.
Memory expansion: because the physical memory size may limit the concurrent execution of large jobs or multiple jobs, the memory must be expanded to meet user requirements and improve system performance. However, we don't have to really increase the memory space. Instead, we only need to use the virtual storage technology to achieve this effect, so that the system can run jobs with much larger memory requirements than the physical memory, or let more jobs run concurrently.

Main tasks of device management: allocating I/O devices to user programs, completing I/O operations requested by user programs, improving utilization of CPU and I/O devices, and improving man-machine interfaces.
Buffer Management: almost all peripheral devices must use the buffer when the processor exchanges information to ease the conflict between speed mismatch between CPU and I/O devices, and improve the parallel operation between CPU and device, device and device to improve the utilization of CPU and I/O devices.
Device allocation: The system allocates devices based on the device type requested by the user and the allocation algorithm used, and puts processes that do not obtain the required devices into the waiting queue of the corresponding device.
Device processing: starts a specified I/O device, completes User-Defined I/O operations, responds to interrupt requests sent from the device in a timely manner, and processes the requests according to the interrupt type.
Virtual Device function: Generally, a device that allows only one process at a time is called an exclusive device. The system can use a certain technology to make the device shared by multiple users, so as to improve the device utilization and the execution process of the Acceleration Program. Each user can feel that they are exclusive to the device.
Main tasks of file management: file storage space management, directory management, File Read and Write management, file protection and interface provision to users.
Job Management Tasks: organize, schedule, and control job operations based on system conditions and user needs.
Job Scheduling: Job Scheduling refers to selecting a batch of jobs from the backup Job Queue according to the system capability and the running status of the current job according to a certain policy, allocate the necessary I/O devices and storage space for them, transfer them to the memory, and establish a corresponding process for them to become a candidate process qualified for processing.
Job control: Job control refers to the process in which a job starts from the system to the completion of the operation. You can issue various commands to the system in some form, to control and manage your jobs.



General knowledge

Single-channel Batch Processing System: only one job is in the memory.

Multi-knife Batch Processing System: A Job occupies the CPU. If the CPU is not used for some reason, the system occupies the CPU for the second job.

Time-sharing system: multiple users share the same computer. Multiple programs share hardware and software resources. A time-sharing operating system is used to connect multiple terminals with monitors and keyboards on a single host, and allows multiple users to use computers interactively and share resources in the host through the Host terminal. The time-sharing operating system is a multi-user interactive operating system.

Real-Time Systems: when external events or data are generated, they can be accepted and processed at a sufficient speed, the processing result can control the production process or quickly respond to the processing system within the specified time, and control the operating system for coordinated and consistent operation of all real-time tasks.

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.