Processes and threads
Many, but not all, operating systems support the concept of multithreaded execution. A thread is a sequence of program instructions that logically executes in isolation from other threads. An operating system running on a single-core processor creates the illusion of multiple simultaneously running threads by performing time-slicing.
In time-slicing, an operating system scheduler grants each ready-to-run thread a period of time in which to execute. As a thread’s execution interval ends, the scheduler interrupts the running thread and continues executing the next thread in its queue. In this manner, the scheduler gives each thread a bit of time to run before going back to the beginning of the list and starting over again.
In operating systems capable of supporting multiple runnable programs simultaneously, the term process refers to a running instance of a computer program. The system allocates resources, such as memory and membership in the scheduler...