"2017 first half of self-examination Summary"--book to see three times "Introduction to the operating system"

Source: Internet
Author: User
Tags mutex
Preface

This self-examination, small series of "operating system introduction" and "operational research." This self-examination to the small part of the feeling is to study must go heart, must read three times, must pay attention to methods.


Introduction to Computer systems

Before learning the operating system, you must first understand the hierarchy of the computer system. The most inner layer of computer system is hardware, and the outermost person manages and uses computer hardware resources through computer software. What we want to learn is how the operating system and operating system that manages hardware resources manage the hardware resources.

As shown in figure:


.


the development of the operating system

Before beginning to learn operation, it is certain to understand the development history of the operating system, otherwise it is somewhat ambiguous, or even a lot of things do not know why. In the 1950s, the General Motors Laboratory implemented the first operating system-pipettes batch processing system, the 60 's multi-channel batch processing system design. Time-sharing operating systems and RTOs were also designed in the 60 's. In the 70 's, the microcomputer operation system was designed on the basis of batch processing system, and the network operating system was designed on the basis of time-sharing operating system. By the 80 's, the distributed operating system was still designed according to the time-sharing operating system, and the embedded operating system was designed according to the RTOs in the same age. The Windows, UNIX, and Linux operating systems that are popular today are designed on the basis of network operating systems and distributed operating systems.





Processor Management

The previous small series has mentioned that the operating system is the management of computer hardware resources, is generally processor management, storage management, file management, equipment management. Thus, it plays a role in managing computer resources, implementing control procedures, improving human-machine interface and supporting the application software.


In the computer hardware resources, the central processing unit (CPU) is in the core role, it controls the memory, files and equipment. It is divided into the system workspace and the user program workspace, this time it will be based on two kinds of instructions: privileged and non-privileged instructions. When controlling the invocation of these resources, it has its own working state: Tubular and visual. Only non-privileged instructions are allowed under the configuration, and all instructions, including privileged commands, can be executed in a tubular state.


In order to improve the use efficiency of computer resources, explain the execution state of the program, this time need to introduce the concept of process. There are two levels of scheduling in the CPU, job scheduling: The main memory is transferred into the backup operation of the input well. Process scheduling: Calls the process to CPU execution in primary storage. These two jobs require resources that have not yet been allocated to meet job execution requirements to enter the primary storage and CPU.


In the process of CPU processing, due to some hardware, external, input and output and the interruption of the incoming pipe interrupt event, this time also by the CPU to interrupt processing.


In order to improve the efficiency of processor and peripheral equipment, multi-channel programming is designed, which leads to multi-channel program parallel execution and multi-channel process executing concurrently. Mutex and synchronization issues occur during concurrent execution of a process. PV operations, communication, and resolution of deadlocks can resolve synchronization and mutex issues.



Storage Management

The storage management here refers to the management of the primary storage, not the disk storage. One of the most important concepts in storage management is relocation. In the process of running the job, it is the process of converting the logical address to the absolute address, and this process is also called relocation, from the user-compiled program and the data information dispatch main memory, and the address of the user program is the logical address, and the address in the main memory is the absolute address. Relocation is divided into static relocation and dynamic relocation. Static relocation means that when the job is loaded, the logical address of the job is converted to an absolute address at a time and is not converted again when the job executes. Static relocation does not require the use of hardware to convert, the software can be done independently. Dynamic relocation is the first load of the job, and then the hardware base register to achieve the logical address and absolute address conversion.


Storage Management has single-user continuous storage management, fixed partition storage management, variable partition storage management, and page virtual storage management. Single-user continuous storage management and fixed partition storage management uses static relocation to implement address conversions. Save the cost of hardware, but make the system resource utilization is not high. Dynamic relocation is used for variable partitioning and page-type virtual storage management. Variable partitioning uses mobile technology to achieve centralized and decentralized idle areas and to facilitate the dynamic expansion of main memory for the job. However, the movement is conditional and increases the overhead of the system. Virtual page storage Management uses virtual storage technology to run larger jobs in smaller main memory space. In page-based storage management, in order to avoid bumps, the FIFO scheduling algorithm, the most recent unused scheduling algorithm (LRU), and the most recent least frequently used algorithm (LFU) are used.





File Management

For information management, the operating system designed the file management (file system). The function of file system is to transform from logical file to physical file, allocate storage space effectively, set up file directory, provide appropriate access way to adapt to different application, ensure file security, and provide a set of file operation.



Device Management

When a file system converts a logical file into a physical file, the operating system starts and controls the peripheral devices. Peripherals are divided into exclusive devices and shareable devices, and when the process calls these devices, device management requires the allocation and recycling of peripherals, the start of peripherals, the implementation of disk scheduling, and the interruption of processing of peripheral devices through channels. Because the CPU processing speed faster than the peripheral devices, resulting in the processor in the peripheral equipment work speed mismatch, this time will use the buffer technology to solve this contradiction. Buffer technology is: Single buffer technology, double buffering technology and buffer pool technology. The use of exclusive equipment is not conducive to improving the utilization of equipment, in order to solve this problem, the need to implement virtual equipment through the sprint technology.



Summary

Through this self-examination, the operating system has a further understanding, can design the operating system is really very powerful, the operating system is so humanized design, not only to think about the problem comprehensively, but also comprehensively solve the problem. So study hard.

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.