Basic knowledge of operating system (1)

Resource management perspective: resource sharing, resource allocation; exclusive, concurrent; static allocation, dynamic allocation, resource preemption.

Multi-program: In order to match the speed of CPU and I/O, only multi-programs enter the memory to compete for CPU, so that the CPU and peripheral devices are fully parallel, and the use efficiency of the computer system is improved.

 

The CPU is closely linked with peripheral devices, and the program that enters the memory for execution establishes a management entity: process

 

How to use resources: call the service process provided by the system

How to Multiplex CPUs: The Scheduler

How to Fully Parallelize CPUs and I/O Devices: Device Controllers and Channels

How to make a running program yield the CPU: interrupts

 

Operation control mode: offline, online.

Function-level interface, offline control: provide job description language. Write job descriptions and determine job processing steps. Online job control: provide terminal, log in to the system, provide commands, input commands online, and time-sharing work system.

 

The OS starts the command interpreter, outputs the command prompt, waits for keyboard interruption, mouse click, multi-channel recognition, when the user inputs a command to apply for interruption, after the CPU responds, it transfers control to the command interpreter, and then reads the content of the command buffer , parses the command, accepts parameters, and executes the processing code.

 

System call, interrupt, exception handler; queue management module, process control module, process scheduling, process communication, terminal login, job control, performance monitoring.

 

Process creation: Add one item to the process table, apply for PCB and initialize, generate logo, create image, allocate resources, just like the ready queue.

Process cancellation: remove from queue, return resource, revoke flag, release PCB, remove process entry.

Process blocking: save on-site information, modify the PCB, and schedule other processes to execute like a waiting queue.

Process wakeup: wait for the queue to be removed, modify the PCB, and move to the ready queue.

Process Suspended: Modify the state and enter and exit the relevant queue, and recover the memory resources to the exchange area.

Process activation: allocate memory, modify state and enter and exit related queues.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325587867&siteId=291194637