Professional Documents
Culture Documents
(OPERATING SYSTEMS)
Friday, November 3,
1
2017
CONTENT
Thread
Multithreading
Process vs. Thread
Advantages of multithreading
Disadvantages
Friday, November 3,
2
2017
THREAD
Friday, November 3,
3
2017
Friday, November 3,
4
2017
Multi-threading
Friday, November 3,
5
2017
Why Multithreading?
Friday, November 3,
6
2017
A thread shares some things ( Code section, Data section, operating
system resources with its peers.
Friday, November 3,
7
2017
PROCESS vs THREAD
Friday, November 3,
8
2017
ADVANTAGES OF MULTI THREADING
Responsiveness: If the process is divided into multiple
threads, if one thread completed its execution, then its
output can be immediately responded while other thread is
busy in lengthy calculations. For example a browser allows
a user to interact with it while a file is being downloaded.
Resource sharing: Resources like memory, code, data and
file can be shared among all threads within a process.
stack and registers cant be shared among the threads. Each thread
have its own stack and registers.
Friday, November 3,
10
2017
DISADVANTAGES
Blocking:
The major disadvantage if that if the kernel is single threaded,
a system call of one thread will block the whole process and CPU
may be idle during the blocking period.
Security:
Since there is, an extensive sharing among threads there is a
potential problem of security.
Friday, November 3,
11
2017
ADDITIONAL INFORMATION
Friday, November 3,
12
2017