cool hit counter Soft exam on the way] - Operating Systems_Intefrankly

Soft exam on the way] - Operating Systems


Copyright: This is an original post by the blogger and may not be reproduced without the blogger's permission. https://blog.csdn.net/huyuyang6688/article/details/45151767

Computer system consists of two parts, hardware and software, one is indispensable, only hardware, no software computer (bare metal) is like a soulless, thoughtless plant, simply can not run; and hardware is the carrier of software, to put it bluntly, the Software is the state of the hardware, the software is represented by the two states (high and low) of the hardware, so without the hardware, the software would not exist.

It just so happens that the self-test and the soft-test ran into each other, so we can summarize our knowledge of operating systems together. Having drawn a chart full of them, it's better to look at them macro and then micro.

Overall the knowledge covered by the operating system is divided into four parts: processors, storage, files and peripherals.

processors

The processor is the heart of the entire operating system.

A process is a dynamic execution of a program, and to further improve resource utilization, a process can again be evolved into multiple threads.

In order to reduce the average turnaround time of jobs, or to allocate processors according to practical situations (e.g., processes are divided into high and low priority levels, etc.), two levels of scheduling of processors can be used - job scheduling (loading jobs into the job well into memory according to an appropriate algorithm) and process scheduling (sending processes corresponding to jobs in memory to the processor for execution according to an appropriate algorithm); processors also need to handle a wide variety of interrupts that occur throughout the operation of the computer - interrupt response → interrupt processing.

Processes have multiple states such as waiting, ready, and executing, and the processor's process scheduling switches between process states, reflecting the concurrency of processes. Because the same program can be executed for different users, multiple processes are created, and the same or the same resources may be used among multiple processes, and then the PV operation is used to reasonably allocate the resource allocation of concurrent processes in the relevant critical areas.

storage

Memory can be divided into three levels: registers (usually in the CPU), main memory and cache memory, and secondary memory (hard disk, CD-ROM, USB stick, etc.), with access speeds getting slower and cheaper in that order. We all know that memory space usually has a system area and a user area, and only the management of the user area is covered here.

There are several ways of how jobs requesting primary storage space are allocated for them.

Single-user contiguous storage management - all space (user area) except for the operating system is allocated to one job (feels so wasteful there).

Fixed partition storage management - dividing the main memory user area into a number of areas (of equal or unequal size) in advance, and then allocating an unoccupied area to each job as soon as it is requested.

Variable partitioned storage management - no prior partitioning of areas, space is allocated to jobs "on a case-by-case basis" when they request space, and because of the complexity of the "case" here, algorithms such as first-adapted, best-adapted and worst-adapted allocations are available to serve it.

paginated storage management—— hold on to storage The ware is divided into many equal-sized pieces, The logical address of the assignment is divided into pages, Equal page and block size, When allocating space in main memory, Create a page table for each assignment, The logical page number of the job corresponds to the block number of the main memory assigned to it, It is not necessary to assign consecutive addresses to each job, Made the most of the loose space。

documents

documents This piece is relatively simple, It's mostly about what we have in our heads about documents awareness( logical structure) harmony documents (located) at storage in the medium storage Correspondence of modalities。

For those of you comrades who want to dig deeper, I share with you an article on structureless documents( flowing type documents) and structured documents( recorded documents)

installations

Devices can be divided into exclusive devices and shareable devices, exclusive devices are occupied by a job until the end of the job, and do not allow other jobs to occupy it, such as printers, even if more than one job is assigned to print, it is finished typing a dish will start the next job printing; shareable devices can be used by multiple jobs at the same time (but not in the actual sense of pain a device is processing multiple things at the same time, I understand it is similar to the processor can handle multiple "alternate" processes at the same time).

Disk scheduling can also largely affect computer performance, as follows.

Seek (lookup) time is the time it takes for the head to move from one column face to another, and algorithms such as first-come, first-served, shortest seek time, and elevator scheduling can be used to reduce the head movement time; delay (wait) time is the time it takes for the sector to turn to the head's specified location; and transfer (transmission) time is the time it takes for the head to read information from the track to memory or to write information from memory to the track.

Buffering techniques are mainly used to alleviate the conflict between the CPU and external devices working at mismatched speeds.

About the channel, as on the mind map, a diagram is used to represent that it is mainly used to assist the CPU to manage the input and output devices. When input and output are needed, the CPU starts the channel and communicates the input and output commands to the channel, and the rest is controlled by the channel itself. When the operation of input and output is completed, the execution is reported to the CPU, and the CPU executes the next operation according to the result. It is as if everything was originally done by the boss (CPU) alone, and then the boss hired an employee (channel) to do something for him so that the boss could go and do something else, but of course if the employee had an unexpected situation that could not be handled in the course of the work, the current operation would have to be stopped (interrupted) and the boss would handle it.


Recommended>>
1、An article that teaches you to predict the future of app realizations
2、Detailed principles of each component of HadooponYarn
3、Driverless cars first fatal case on public roads as safety questions resurface
4、Tencent buys wxgzhcom a 5sound domain name for WeChats public website
5、Swordpoint offer prints out the binary tree from top to bottom

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号