We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
Limitations.
A thread is a single sequential( separate ) flow of control within program. Sometimes, it is called
an execution context or light weight process.4.1 MULTITHREADING AND MULTI-TASKING
Tn programming, there are two main ways to improve the throughput of a program:
i) by using multi-threading
ii), by using multitasking
Both these methods take advantage of parallelism to efficiently utilize the power of CPU
and improve the throughput of program. e‘Multitasking ¥
Multitasking is when a single CPU performs several tasks (program, process, task,
threads) at the same time. To perform multitasking, the CPU switches among these tasks
very frequently 49 thi user can interact with each program simultancously.
In a multitasking operating system, several usérs cant share the system simultaneously.
‘CPU rapidly switches among the tasks, so litle time js needed to switch from one user to the
next user. This puts an impression on a user that entire computer system is dedicated to him,
Figure: Muitashing
When several users are sharing a multitasking operating system, CPU scheduling and
tiprogramming
multi ing makes it possible for cach user to have at least a small portion of
‘Multitasking OS and let each user have at least one program in the memory for execution.Multi threading
Multithreading is different from multitasking in a sense that multitasking allows mul-
tiple tasks at the same time, whereas, the Multithreading allows multiple threads of a single
task (program, process) to be processed by CPU at the same time.
AA thread is a basic execution unit which has its own program counter, sct of the register
and stack. But it shares the code, data, and file of the process to which it belongs. A process.
can have multiple threads simultaneously, and the CPU switches among these threads so fre=
quently making an impression on the user that all threads are running simultaneously.
Process