Summary of operating system principle learning

Source: Internet
Author: User

1. The operating system essentially belongs to the category of software , is a special, system-level application software, so we can use the general principles of application development to understand the operating system. Operating system from the character interface to the graphical interface of the evolution and development process, is to constantly meet the user needs of the process, software engineering to pay attention to user needs, the performance is more prominent here, although the character interface is more flexible and powerful, but its operation is more complex, and the graphical interface for ordinary people is easy to operate, do not need training, Meet the needs of the public, but also more humane. That's why Windows is more popular. Of course, the nature of the graphical interface is the character interface, Professional or character interface.

2. A process refers to the execution of a program, including executable programs, data required by the program, and related state information. A process is the smallest entity that owns a resource. (Smallest unit of resource requisition) The thread is also the execution of the program, but the thread is the smallest unit of system scheduling.

3. Process composition (process image): program, data set, Process Control block PCB

PCB is the only sign that the process exists . The PCB is created when the process is created, and when the process is finished, the system reverses its PCB

4.


5.


6. Comparison of pagination and segmentation techniques

(1) The page is the physical unit of information, fixed in size. Segment is the logical unit of information and the length of each segment is not fixed. Each paragraph has a certain logical meaning.

(2) The paging address space is one-dimensional, the division of logical address by the machine hardware implementation, transparent to the user. The address space for a segment is two-dimensional or multidimensional, and the programmer knows the segment name and the offset within the segment.

(3) Paging activity originates from the need of the system to manage the physical memory, which is carried out within the system and implemented by the system, which is invisible to the user. The segmented activity originates from the user's need of modularization programming, which is carried out outside the system and implemented by the user, which the user knows.

7. Section-Page Storage Management

Basic idea: using segmented method to organize user program, using paging method to allocate and manage memory.

That is, the user program can be designed with modular ideas, a user sequence composed of several paragraphs. The system divides the memory into a fixed-size page box and splits each segment of the program into several pages after it is loaded into memory execution.

8.



9. The advantages of segmentation and paging technology are combined to effectively utilize storage space and user-friendly programming.

However, the implementation of the Segment-page storage Management system requires additional hardware costs, and the complexity and management overhead of the system are greatly increased.

Therefore, the Segment-page storage management technology is suitable for large and medium-sized computer systems, and is not suitable for small and microcomputer system.

10. Logical devices and physical devices

-A logical device is a device that is referenced by the application to implement I/O operations.

-Physical device refers to the physically installed device in the physical I/O system.

From the perspective of application software, a logical device is an abstraction of a class of physical devices . From the point of view of an operating system Device Manager, a physical device is an instance of a logical device .

11. Device-driven, also known as device processing, refers to the control of physical devices to achieve true I/O operations.

The main task of the device driver is to receive the abstract service request from the upper software, such as the read/ write command, and then convert it to the specific request, through a series of I/O instructions, control the device to complete the request operation, and the device driver will also send the signal from the device to the upper layer software, For example, if the device is damaged or not. The operating system requires only the interface of the device.

12. The channel is equivalent to a simple processor, designed to handle I/O operations. The channel has its own operation control parts and instruction system, but does not have the special memory , but uses the "cycle stealing" way to share the memory with the host.

The channel completes the I/O operation by executing the channel program.

-The channel program is an ordered sequence of channel instructions, which is determined by the input/output process in the system according to the I/O requirements of the user process, which can be programmed in advance or generated dynamically. The channel program and the data that needs to be exchanged with the device are placed in memory.

A channel instruction can transmit a set of data, and a channel program can transmit multiple sets of data. Once the multiple sets of data have been completely transmitted (that is, one channel program is completed), the processor is given an interrupt.

The channel can not only transmit data, but more importantly, it also completes the control of the device. With the aid of the channel, the host simply sends out a boot channel and executes the instruction of the Channel program. The host only communicates directly with the channel , without considering the specific control of the device and how to complete the data transmission, which greatly reduces the burden on the host.

Equivalent to a co-processor

13. Implementation of virtual device technology

Virtual device technology is similar to buffer technology , can be considered as a device to provide a number of larger, even in real-world work is an infinite length of the buffer , and further improve system efficiency. (typically a disk)

The realization of virtual device technology: To add a shared device between the exclusive device and the process as a transition,




14. Spooling System

"Spool Operation" (consumes a small amount of CPU time)

The spooling system is the most typical representative of a virtual device , including two parts of the spool input and output system.

Core idea: establish an I/O buffer in a fast secondary storage device that caches data that flows into memory from a slow input device or caches data flowing from memory to a slow output device.





The sector is the basic unit of disk I/O transfer and the basic unit of disk space allocation.

The basic storage unit (sector) of a disk is addressed in three-dimensional addresses: cylinder number, plate number, and sector code .

To facilitate the management and shielding of physical details of the storage device, the operating system provides a unified interface to the upper software, often using a one-dimensional address , which is the logical disk block number (logical sector code), numbering all sectors in the disk group starting with 0.

Obviously, there is a problem of conversion between one-dimensional address and three-dimensional address.

In order to improve the efficiency, for the mobile head type disk drive, the head arm of the mechanical movement ( seek) speed is the slowest, followed by the disc rotation speed, therefore, the layout of the logical block number, the first change in the fan area code, followed by the disk face number, and finally the cylinder number.


Copyright NOTICE: This article is "lend you a second" original article, reproduced please indicate the source.

Summary of operating system principle learning

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.