Beruflich Dokumente
Kultur Dokumente
Deadlock handling procedure (if any). 2 IV. Different levels of processes priorities and how they are managed and assigned. 3
algorithm.
This is achieved by locking the interupt thread until the critical region is clear. Solaris uses data-based locking as its kernel locking strategy. Solaris also usies mutual exclusion locks (mutexes) to prevent more than one thread from proceeding when a lock is encountered. And this also prevents two processes from entering the critical region (race condition). If a mutex cannot be locked because somone is already in the critical region, the default action is to wait until no one is in that critical region and enter it afterwards. Also Solaris detects deadlocks caused by hierarchy violations at runtime by the priority inheritance mechanism used. But its not capable of detecting all deadlocks since this mechaism doesnt keep a complete list of all thread that holds a read lock. Linux doesn;t handle deadlocks prevention because they rarely happen and their detection and recovery algorithms are so expensive to implement so that the cost of manging them by recovering or detection far exceeds the benfit. So they ignore them.
IV. Different levels of processes priorities and how they are managed and assigned.
.
Solaris has 170 different priorities (0-169). Every scheduler class has a range of priorities assigned to it. The time share class is the default class for processes. The interactive class is most likely the same as the time sharing but its referes to the in-focus windows in the gui. FSS are scheduled based on their associated shares and the processor's utilization. The prirorities of the Fixed priority calss do not vary dynamically over the lifetime of the thread. Priorities is the same in the TS, IS, FSS, and FP and ranges from 0 to 59. The System class is used to schedule kernel threads and has priorites ranges from 60 to 99. Finally, threads in Real time classes are fixed-priority and have a fixed time quantum. Their priorities range 100-159. Linux has 140 different priority level; The lower the lever the higher the priority. Real-time are assigned from level 1 100 with maximum priority level equal to 100. User tasks priorites are assgined from 101 140 with maximum priority level equal to 140. Running two processes having the same priority
level will run in round-robin fashion. To change the priority of a process after assigning its priority level you can use the renice command.