Sie sind auf Seite 1von 4

Contents I. The scheduling algorithm used. 1 I. The operating system kernel threading policy and structure. 1 III.

Deadlock handling procedure (if any). 2 IV. Different levels of processes priorities and how they are managed and assigned. 3

Name: Amr Ehab Id: 16-1327 I. The scheduling algorithm used.


Solaris is a Unix operating system developed by Sun Microsystems. Solaris has many scheduling classes. Every scheduling class has its own scheduling algorithm defined to it. In solaris v. 10, There was a wide variety of scheduling classes. From these scheduling classes: SYS (System Class),TS (Time Sharing), SDC (System Duty-Cycle Class),FX (Fixed Priority), FSS (Fair Share Scheduler), and IA (Interactive). And as mentioned before, each scheduler class has its scheduling algorithm. But the scheduling algorithm is also dependent on the current relase. For example: The time sharing and interactive classes uses Multilevel feedback scheduling algorithm. Red Hat linux was a popular Linux based operating system until 2004. Red Hat company stopped releasing new versions of Red Hat in 2004 in favor of Red Hat Enterprise Linux and Fedeoro. In this section I will talk about Red Hat Enterprise Linux (RHEL). However, most of whats going to be discussed will be mainly related to the linux kernel and not the distrubution. As the kernelrelated jobs will function the same on all linux distrubtions that are using the same kernel version. Red Hat enterprise edition 6 uses linux kernel 2.6.32. This kernel uses Completely Fair Scheduler (CFS) that implements the fair queuing scheduling

algorithm.

I. The operating system kernel threading policy and structure.


The Solaris 10 kernel threads model consists of: Kernel threads that referes to what is scheduled/exectued on a processor, user threads: The user-level thread state within process, Process: The object that tracks the execution environment of a program, and light weight process: Execution context for a user thread. In Red Hat, Linux implements threads as a process that shares resources among themselves. Linux does not have a separate data structure to represent a thread. Unlike Sun Solaris, processes in Linux are the containers and the schedulable entities; they can share the same address space and system resources. Also Most services are implemented in the kernel, except many networking functions. Linux does not recognize a distinction between threads and processes. It uses a mechanism thats similar to the lightweight processes of OpenSolaris, userlevel threads are mapped into kernel-level processes. Multiple user-level threads that constitute a single user-level process are mapped into Linux kernel-level processes that share the same group ID. This enable the processes to share file between them and avoid context switching when scheduler switch among processes in the same group.

III. Deadlock handling procedure (if any).


Solaris kernel is designed to prevent deadlocks caused by interrupt threads.

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.

Das könnte Ihnen auch gefallen