Skip to main content

Posts

Showing posts from April, 2018

Operating System: Threads and Concurrency

Threads Definition: A Thread also called lightweight process, is basic CPU utilization; it compromises a thread ID, a program counter, a register set, and a stack. A thread is an entity within a process that can be scheduled for execution. If we want a process to be able to execute on multiple CPUs at a time, to take advantage of the multi-core systems, the process must have several execution-context called threads. A thread is an active entity which executes a part of a process. Multiple threads execute simultaneously with each other which results in the execution of a single whole process. As several threads of a process execute at the same time they are required to maintain coordination with each other. Coordination between the threads is required in order to share system resources like I/O devices, memory, and of course CPU. The threads of a process are the part of the same virtual address space (i.e. they share all virtual to physical mapping), they share all the data, cod...