documentos

Download DocumentOS

If you can't read please download the document

Upload: rahi

Post on 27-Jan-2016

212 views

Category:

Documents


0 download

DESCRIPTION

Text pumputer

TRANSCRIPT

Information associated with each processProcess stateProgram counterCPU registersCPU scheduling informationMemory-management informationAccounting informationI/O status informationProducer Consumer example -> printer program produces characters that are consumed by printer driversFor any fork(), 2^n - 1 children will be createdThread-> Unit for CPU utilization , A thread is the entity within a process that can be scheduled for execution.it has : thread ID , Program Counters, register Set and stacksA threads belongs to a process and it shares with other threads code and dat section and other OS resources like files** Threads can directly communicate with other threads of its process; processes must use interprocess communication to communicate with sibling processes.Preemptive scheduling: The preemptive scheduling is prioritized. The highest priority process should always be the process that is currently utilized.Non-Preemptive scheduling: When a process enters the state of running, the state of that process is not deleted from the scheduler until it finishes its service time.Shortest job first uses Next CPU burst, it is optimal giving min. waiting timeFirst, the kernel can simultaneouslyschedule multiple threads from the same process on multiple processors. Second,if one thread in a process is blocked, the kernel can schedule another thread ofthe same process. Another advantage of the KLT approach is that kernel routinesthemselves can be multithreaded.The principal disadvantage of the KLT approach compared to the ULTapproach is that the transfer of control from one thread to another within the sameprocess requires a mode switch to the kernel.