-
Book Overview & Buying
-
Table Of Contents
Modern Computer Architecture and Organization - Third Edition
By :
Many, but not all, operating systems support multithreaded execution. A thread is a sequence of program instructions that executes independently of other threads. An operating system running on a single-core processor creates the illusion of multiple simultaneously running threads by performing time slicing.
A time-slicing scheduler allocates intervals of time sequentially to each ready-to-run thread for execution. As a thread's execution interval ends, the scheduler interrupts the running thread and continues executing the next thread in its queue. The scheduler stores the state of each interrupted thread so that when it next runs, it resumes execution at the exact point where it left off. In this manner, the scheduler allocates a small amount of time to each thread, then returns to the beginning of its list of threads and repeats the sequence.
In operating systems that support multiple runnable programs simultaneously, a process is a running instance of a...