Today soft test conducted study, focusing on learning this part of the process of knowledge management, consists of two parts in process management, namely deadlock and PV operations .
Deadlock, the following questions:
These kinds of questions is a practice routine ,
The first step: clear how M is how to allocate resources to the n process?
Remember this principle, and that is the rain! dew! All! James! Each is assigned a first, and then assign each one until there are no resources can be allocated.
Step two: check whether the process can be released?
w is the greatest demand, meaning that each process when w = the resources available, the process will be released
The third step: the release process can be recycled
Recycling Please release process can be achieved reassigned to other resources are not being met
If each process can be released, will not produce a deadlock, the problem is solved!
The second operation type questions PV
First to introduce PV operation.
PV through mutual exclusion operation is an effective method to achieve synchronization, correlation processing operation PV semaphore, which is represented by P, V represents a release
Under mutual exclusion case, the initial value of the semaphore is usually 1, the process requires the use of shared resources, but the resources can only meet once a process, has led to