Operating system to learn the next day

Operating System features:

Concurrent: The system simultaneously run multiple programs

Share: Process system memory resources for concurrent execution of multiple use (mutual exclusion, while sharing)

Virtual: space division multiplexing (real memory run << memory), time division multiplexing (memory execute multiple programs at the same time, the processor in a small period of time alternately for individual processes and services)

Asynchronous: multi-channel program that allows concurrent execution is stop and go, in order to move forward at an unpredictable rate.

OS operating mechanism: both instructions (privileged instructions, non-privileged) state of a processor (core 1, 0 users, the program status register flag), a program (kernel, application)

OS kernel: clock management, interrupt handling, primitives (special program closest to the hardware part, atomicity), system resource management (process management, memory management, device management)

OS architecture: large microkernel

CPU instruction is able to identify, in the most basic command

Process makes a system call (internal interrupt signal), CPU and switch to the mentality of interrupt handling.

OS interrupt means to intervene, to carry out management.

process:

Process is a process program having individual functions running on a data set, is an independent unit of resource allocation and scheduling

composition:

PCB: (PID, UID), (current status, priority) (block, data segment pointers) (information processor)

Block

Data segment

Process characteristics:

Dynamic, concurrency, independence, asynchronous, structural

Primitives: switch interrupt instruction

Process Control:

Update PCB content (the process status flag, run the state should retain the operating environment, running into the environment must reply)

The PCB enqueue

Allocation of recovered resources

Create a primitive :( application blank PCB, allocate resources, initialization PCB, inserted into the ready queue)

Revocation of primitives: find PCB, deprivation CPU, terminate the child process and return resources, remove PCB

Wake-up blocking primitives

Switching primitive (Run -> blocking / Ready Ready -> Run): PCB hosted environment, queue, choose another process execution, restoring the operating environment

Interprocess communication:

Shared memory: data structures, storage area

Messaging: direct, indirect

Pipe communication

 

Guess you like

Origin www.cnblogs.com/waifanneiyuan/p/11563392.html