SlideShare a Scribd company logo
4
Most read
5
Most read
12
Most read
Threads
(Operating System)
Noman Zahid (02-134171-135)
BS(CS)-6A
What is Thread ?
A thread is a flow of execution through the
process code, with its own program counter,
system registers and stack. A thread is also
called a light weight process. Threads provide a
way to improve application performance
through parallelism.
Each thread belongs to exactly one process
and no thread can exist outside a process.
Single threaded Process and Multi-
threaded Process
Difference between Process and Threads
Advantages of Threads :
• Thread minimizes context switching time.
• Use of threads provides concurrency within a process.
• Efficient communication.
• Economy- It is more economical to create and context switch
threads.
• Utilization of multiprocessor architectures to a greater scale and
efficiency.
Disadvantages of Threads :
•Blocking of parent threads will stop all child
thread.
•Security.
Types of Threads :
Threads are implemented in following two
ways :
• User Level Threads (ULT)
• Kernel Level Threads (KLT)
User Level Threads (ULT) :
User level thread implement in user level
libraries, so thread switching does not need
to call operating system and to cause
interrupt to the kernel.
In fact, the kernel knows nothing about
user level threads and manages them as if
they were single-threaded process.
Advantages of ULT :
User level threads does not require modification to operating
system.
• Easy to represent and manage.
• User level thread can run on any operating system.
• User level threads are fast and efficient.
Disadvantages of ULT :
• There is a lack of coordination between threads and
operating
• system kernel.
• ULT require non-blocking system call (i.e. Multithreaded
kernel)
Kernel Level Threads (KLT) :
In this method, the kernel knows about
and manages the threads. No runtime
system is needed in this case. Operating
system kernel provides system call to
create and manage threads.
Advantages of KLT :
Kernel can simultaneously schedule multiple threads from the
same process on multiple processes.
• If one thread in a process is blocked the kernel can schedule
another thread of the same process.
• Kernel routines themselves can multithreaded.
Disadvantages of KLT :
Kernel thread are generally slower to create and manage than the
user threads.
• Kernel requires Thread Control Block (TCB) for each thread in
the
pool, hence complexity increases.
Difference between ULT and KLT :
Multi-Threading Models :
Some operating system provides a combined user
level thread and kernel level thread facility. Solaris
is a good example of this combined approach.
Multi-Threading models are three types.
• Many-to-One Model
• One-to-One Model
• Many-to-Many Model
Many-to-One Model /One-to-One Model
/Many-to-Many Model
THANK YOU !

More Related Content

PPTX
MULTI THREADING IN JAVA
PDF
input/ output in java
PPTX
8 queens problem using back tracking
PPTX
Inner classes in java
PPTX
Threads .ppt
PPTX
Basic Concepts of OOPs (Object Oriented Programming in Java)
PDF
Deadlock Avoidance - OS
PPTX
Memory management ppt
MULTI THREADING IN JAVA
input/ output in java
8 queens problem using back tracking
Inner classes in java
Threads .ppt
Basic Concepts of OOPs (Object Oriented Programming in Java)
Deadlock Avoidance - OS
Memory management ppt

What's hot (20)

PPT
9. Input Output in java
PPTX
Graph coloring using backtracking
PDF
Operating systems system structures
PPTX
Abstract Class Presentation
PPT
Mutual exclusion and sync
PPTX
ODP
Multithreading In Java
PPT
Os Threads
PPTX
Classes, objects in JAVA
PPTX
Threads
PPT
Thread model in java
PPTX
Multi-threaded Programming in JAVA
PPTX
DeadLock in Operating-Systems
PPT
Java: GUI
PPTX
Threads (operating System)
PPTX
This keyword in java
PDF
Java threading
PPTX
Operating System Operations ppt.pptx
PPTX
Deadlock ppt
PPTX
Access specifiers(modifiers) in java
9. Input Output in java
Graph coloring using backtracking
Operating systems system structures
Abstract Class Presentation
Mutual exclusion and sync
Multithreading In Java
Os Threads
Classes, objects in JAVA
Threads
Thread model in java
Multi-threaded Programming in JAVA
DeadLock in Operating-Systems
Java: GUI
Threads (operating System)
This keyword in java
Java threading
Operating System Operations ppt.pptx
Deadlock ppt
Access specifiers(modifiers) in java
Ad

Similar to THREADS of Operating System by Noman Zahid (20)

PPTX
thread os.pptx
PPTX
threads-ppfldkgsh;reghuiregiuhrughet.pptx
PPTX
Threads ppt
PDF
PPTX
Thread (Operating System)
PPTX
Lecture 3 threads
PPTX
THREADS IN OPERATING SYSTEM BIKASH.pptx
PPT
Lecutur24 25
PPTX
PPTX
Operating System-Thread concept in Operating System
PPTX
THREADS IN OPERATING SYSTEM & multitasking
PPTX
Thread
PPT
Threads.ppt
PPTX
Operating System Thread | OS Thread | PPT | CSE | Presentation
PPTX
Multi threaded programming
PPT
PPTX
dos slide share.pptx
PPTX
Threads
PDF
Ch4_OS_Lecture.pdf
PPTX
process and thread.pptx
thread os.pptx
threads-ppfldkgsh;reghuiregiuhrughet.pptx
Threads ppt
Thread (Operating System)
Lecture 3 threads
THREADS IN OPERATING SYSTEM BIKASH.pptx
Lecutur24 25
Operating System-Thread concept in Operating System
THREADS IN OPERATING SYSTEM & multitasking
Thread
Threads.ppt
Operating System Thread | OS Thread | PPT | CSE | Presentation
Multi threaded programming
dos slide share.pptx
Threads
Ch4_OS_Lecture.pdf
process and thread.pptx
Ad

Recently uploaded (20)

PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Classroom Observation Tools for Teachers
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Computing-Curriculum for Schools in Ghana
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Basic Mud Logging Guide for educational purpose
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
O7-L3 Supply Chain Operations - ICLT Program
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Microbial diseases, their pathogenesis and prophylaxis
STATICS OF THE RIGID BODIES Hibbelers.pdf
RMMM.pdf make it easy to upload and study
Microbial disease of the cardiovascular and lymphatic systems
102 student loan defaulters named and shamed – Is someone you know on the list?
Classroom Observation Tools for Teachers
Renaissance Architecture: A Journey from Faith to Humanism
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
01-Introduction-to-Information-Management.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Computing-Curriculum for Schools in Ghana
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Basic Mud Logging Guide for educational purpose
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape

THREADS of Operating System by Noman Zahid

  • 1. Threads (Operating System) Noman Zahid (02-134171-135) BS(CS)-6A
  • 2. What is Thread ? A thread is a flow of execution through the process code, with its own program counter, system registers and stack. A thread is also called a light weight process. Threads provide a way to improve application performance through parallelism. Each thread belongs to exactly one process and no thread can exist outside a process.
  • 3. Single threaded Process and Multi- threaded Process
  • 5. Advantages of Threads : • Thread minimizes context switching time. • Use of threads provides concurrency within a process. • Efficient communication. • Economy- It is more economical to create and context switch threads. • Utilization of multiprocessor architectures to a greater scale and efficiency.
  • 6. Disadvantages of Threads : •Blocking of parent threads will stop all child thread. •Security.
  • 7. Types of Threads : Threads are implemented in following two ways : • User Level Threads (ULT) • Kernel Level Threads (KLT)
  • 8. User Level Threads (ULT) : User level thread implement in user level libraries, so thread switching does not need to call operating system and to cause interrupt to the kernel. In fact, the kernel knows nothing about user level threads and manages them as if they were single-threaded process.
  • 9. Advantages of ULT : User level threads does not require modification to operating system. • Easy to represent and manage. • User level thread can run on any operating system. • User level threads are fast and efficient.
  • 10. Disadvantages of ULT : • There is a lack of coordination between threads and operating • system kernel. • ULT require non-blocking system call (i.e. Multithreaded kernel)
  • 11. Kernel Level Threads (KLT) : In this method, the kernel knows about and manages the threads. No runtime system is needed in this case. Operating system kernel provides system call to create and manage threads.
  • 12. Advantages of KLT : Kernel can simultaneously schedule multiple threads from the same process on multiple processes. • If one thread in a process is blocked the kernel can schedule another thread of the same process. • Kernel routines themselves can multithreaded.
  • 13. Disadvantages of KLT : Kernel thread are generally slower to create and manage than the user threads. • Kernel requires Thread Control Block (TCB) for each thread in the pool, hence complexity increases.
  • 15. Multi-Threading Models : Some operating system provides a combined user level thread and kernel level thread facility. Solaris is a good example of this combined approach. Multi-Threading models are three types. • Many-to-One Model • One-to-One Model • Many-to-Many Model
  • 16. Many-to-One Model /One-to-One Model /Many-to-Many Model