Operating System notes five (process definition, process state, process management)

Definitions 7.1 processes
a program that has some independent functions of a dynamic execution on a data collection process
(process stressed that the implementation process)
make up 7.2 processes
all status information process contains a running program of
such process code, program the current value of the data processing, the program counter value, a common set of counters, the system resources,

Relations programs and processes of
each run the program constitutes a different process
process is reflected in the program functions
by executing multiple times, multiple processes corresponding to a program, by calling the relationship, a process consists of several programs

7.3 Characteristics of the process
dynamics, concurrency (not parallel), independence, Restricted (due to inter-access shared data or resources to generate synchronization process constraints)
program algorithm + Data Structures =
data structure description of the process: the process control block (PCB ) (operating system for each process maintains a PCB)

7.4 Process control structures
PCB: set information An operating system manages control processes run with, PCB is the only flag existing process
information PCB included: a process identifier information, processor status information storage area, the process control information is
organized PCB: General we use the case of a linked list, in order to dynamically inserted and deleted dynamically in the process, but you can also use other forms of
the most common form of organization is a list PCB

Status of the process

2.1 life cycle management process of
creation - running - wait - wake up - the end of the
process creates: three conditions system initialization user requirements process is created a new process running the implementation of the process of creating the system calls
the process run: Choose a can perform the process, that process is ready, ready to become an execution state from running
process waits (blocking): As data services are not in place or can not be completed immediately, then wait
(waiting for this event process is initiated by the process itself)
process wake: the process can only be other process or OS to wake
end of the process: normal exit (voluntary) error exit (voluntary) fatal error (mandatory) killed by another process (mandatory)

2.2 process model change of state
to run state
ready only missing processors, what resources are good
wait state waiting for a resource
2.3 process hangs suspended in the external memory words are waiting
to hang refers to a memory space that is not occupied he said that on the disk, which is certainly reasonable to make full use of system resources
divided into two
blocked pending state: process in external memory and wait for an event appears
ready to hang status: external memory in the process, but just go to memory, you can run
the after hang activated (solution linked) satisfied when the memory

The state of the queue: OS maintains a set of queues, used to represent the current state of the system in all the processes of
different states represented by a different queue (ready queue, all kinds of blocking queue)
process status changes once he went from a PCB queue to join another queue

发布了44 篇原创文章 · 获赞 9 · 访问量 3393

Guess you like

Origin blog.csdn.net/puying1/article/details/96638286