Friday, January 22, 2010
F. (Ms. Fina's). E. O :)
Functions of OS-Scheduling
Describe the objectives of OS-Scheduling (4) Convenience. The computer should be user-friendly and therefore easy to use by the general users.
Efficiency. The computer should be able to use the resources efficiently.
Ability to evolve. The operating System should be constructed in a way to permit effective development, testing, and introduction of new functions without interfering with service.
Fairness and equality. This is so that the operating system gives fair share to each of the processes, and no process suffer from indefinite postponement, depending on their priority of course. This is also known as “time-sharing”.
State and describe three methods of scheduling (6)- Round Robin Scheduling. This method ensures every task in each priority gets an equal amount of time.The scheduler runs through all tasks in the highest priority. The task which has not yet run, but is able to, gets the turn. If no task is able to run, a lower priority is examened. If no task can be started, the idle task is started. The idle task does not consume resources.
- OS interruptible Scheduling. This method allows large part of the OS interruptible (interrupted by signal). Interrupts can never occur in routines where the stack is changed, the context save/restore for example, and in the event handlers. Apart from this, the OS and kernel calls can be made interruptible if needed. However, it is also possible to work in a OS protected mode. Thus, depending on your needs the system can be quite responsive. Note that nested interrupts are not allowed per default. Kernel calls are not preemptable. For calls that are handled in OS space, this makes no real sense, and calls that are handles in OS space are usually very short.
- Register compression. This method saves only the register that are used on the stack at taskswitch.Registers which are not used in a specific tasks, or registers only used in area's where no context switch is possible do not need to be saved. Especially in the AVR architecture which has 32 registers, this can save a lot of stack space. Often it is enough to save only 12 registers or even less. This also makes the context switch quicker.
Resources:
http://en.wikipedia.org/wiki/Scheduling_(computing)
http://www.personal.kent.edu/~rmuhamma/OpSystems/Myos/cpuScheduling.htm
http://www.femtoos.org/features.html
Labels: School Life
I LOVE YOU 5:33 PM