Professional Documents
Culture Documents
Chapter 2 Processes - 230210 - 084007
Chapter 2 Processes - 230210 - 084007
CHAPTER 2
Processes
(a) Three processes each with one thread. (b) One process with three threads.
Thread Advantages
Responsiveness:
If the process is divided into multiple threads, one
thread can complete its execution and its output can be
immediately returned.
Communication:
Communication between multiple threads is easier, as the
threads shares common address space. While in process we
have to follow some specific communication technique for
communication between two process.
In the first two cases, the process eventually switches from the waiting state to the ready state,
and is then put back in the ready queue. A process continues this cycle until it terminates, at
which time it is removed from all queues and has its PCB and resources deallocated.
Types of Schedulers
A long-term scheduler is typical of a batch system or a very heavily
loaded system. It runs infrequently, (such as when one process
ends selecting one more to be loaded in from disk in its place), and
can afford to take the time to implement intelligent and advanced
scheduling algorithms.