Linux Application Development-Process Control theory
one process
A process is a run-time activity of a program with a certain independent function.
Two process features and status
Dynamic
Concurrency
Independence
Async
Status Ready execution blocking
Three scheduling algorithm
Process scheduling: A certain algorithm, from a set of processes to run to select one to occupy the CPU run.
First come first service
Short process priority scheduling
High priority priority scheduling
Time slice rotation
Four scheduling mode
After having the process and scheduling algorithms waiting to run, the next question to discuss is: When will it be dispatched?
Schedule can be divided into:
Preemptive scheduling
non-preemptive scheduling
Five deadlock
Multiple processes seize the same resource and form an impasse, Causes these processes to continue executing
Six process ID
process Id:pid
Parent process id:ppid
Start process user Id:uid
Eight critical resources
Concept-critical resource
The operating system will allow only one
process access to a resource at the same time as a critical resource. The program code for accessing critical resources in the
Nine critical section
process is called the
critical section. To achieve mutually exclusive access to critical resources,
should ensure that the processes are mutually exclusive to their critical sections.
10 Process Synchronization
a process in which a set of processes are executed in a certain order is called synchronization between processes
. This set of processes with a synchronization relationship is called a
process, most notably producer and consumer processes.
Linux application Development-Process Control theory