SlideShare a Scribd company logo
2
Most read
4
Most read
11
Most read
Computer Engineering
Department
GANDHINAGAR INSTITUTE OF
TECHNOLOGY
Operating System(2140702)
Threads, Concept of Multithreads,
Benefits of threads, Types of threads
Prepared By:
Darji Mit
Threads
A threads is a flow of execution through the
process code, with its own program counter,
System register and stack. A thread is also called
a light weigth process. Threads provide a way to
improve application performance through
parallelism.
Each thread belongs to exactly one process and
no thread can exits outside a process.
Threads .ppt
Concept of Multithreads
• Some operating system provide a combined
user level thread and Kernel level thread
facility.
• Multiple threads within the same application
can run in parallel on multiple processors and
a blocking system call need not block the
entire process.
1.Many to many relationship.
2.Many to one relationship.
3.One to one relationship.
Many to Many
 The many-to-many model multiplexes any number of user
threads onto an equal or smaller number of kernel threads,
combining the best features of the one-to-one and many-to-
one models.
Many to one
• In the many-to-one model, many user-level threads are all
mapped onto a single kernel thread. Thread management is
handled by the thread library in user space, which is efficient
in nature.
One to one
 Each user thread maps to one kernel thread. provides more
concurrency, if one thread makes a blocking call another
thread is allowed to run. Creating user thread requires
creating coorresponding kernel thread.
Benefits of Threads
Responsiveness
Resource Sharing
Economy
Types of Threads
User Level
Thread (ULT)
Kernel level
Thread (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 singel-threaded process.
Advantages of ULT:
• User level threads does not reqquire 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.
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 ccreate and manage
that the user threads.
• Kernel requires Thread Control Block(TCB) for each thread in
the pool, hence complexity increases.
Threads .ppt

More Related Content

PPTX
Lecture 3 threads
PPTX
Multi threaded programming
PPTX
process and thread.pptx
PPT
Os Threads
PPT
Process management in os
PPTX
Threads & Concurrency
PPTX
Cpu scheduling
Lecture 3 threads
Multi threaded programming
process and thread.pptx
Os Threads
Process management in os
Threads & Concurrency
Cpu scheduling

What's hot (20)

PPTX
Threads (operating System)
PPT
CPU Scheduling Algorithms
PDF
Thread
PPT
Multi core-architecture
PDF
File system in operating system e learning
PPT
Memory Management in OS
PPT
Kernel mode vs user mode in linux
PPT
Disk management
PPTX
CPU Scheduling in OS Presentation
PPTX
Process state in OS
PDF
Memory management
PPTX
Operating system
PPTX
Multiprocessor Scheduling
PPTX
Memory Management in OS
PPTX
System program
PPTX
Cpu scheduling in operating System.
PPS
Deadlock
PPTX
MULTILEVEL QUEUE SCHEDULING
PDF
Operating systems system structures
Threads (operating System)
CPU Scheduling Algorithms
Thread
Multi core-architecture
File system in operating system e learning
Memory Management in OS
Kernel mode vs user mode in linux
Disk management
CPU Scheduling in OS Presentation
Process state in OS
Memory management
Operating system
Multiprocessor Scheduling
Memory Management in OS
System program
Cpu scheduling in operating System.
Deadlock
MULTILEVEL QUEUE SCHEDULING
Operating systems system structures
Ad

Similar to Threads .ppt (20)

PPTX
Threads ppt
PPTX
PPT
Threads.ppt
PPTX
thread os.pptx
PPTX
threads-ppfldkgsh;reghuiregiuhrughet.pptx
PPTX
Threads
PPTX
OPERATING SYSTEM chapter no 3rd (8).pptx
DOC
PPTX
Operating System-Thread concept in Operating System
PPTX
THREADS of Operating System by Noman Zahid
PPT
PPTX
Thread (Operating System)
PPTX
Engineeering Operating systemsOS UNIT 3 Threads.pptx
PDF
PPTX
Threads
PPTX
Operating system: threads(mulithreading,benefits of threads, types of thread)
PPT
multi-threading
PPT
Lecture 13 threads presentation 16 slides
PPTX
dos slide share.pptx
PPTX
Threads in operating system computer science
Threads ppt
Threads.ppt
thread os.pptx
threads-ppfldkgsh;reghuiregiuhrughet.pptx
Threads
OPERATING SYSTEM chapter no 3rd (8).pptx
Operating System-Thread concept in Operating System
THREADS of Operating System by Noman Zahid
Thread (Operating System)
Engineeering Operating systemsOS UNIT 3 Threads.pptx
Threads
Operating system: threads(mulithreading,benefits of threads, types of thread)
multi-threading
Lecture 13 threads presentation 16 slides
dos slide share.pptx
Threads in operating system computer science
Ad

Recently uploaded (20)

PPTX
“Next-Gen AI: Trends Reshaping Our World”
PPTX
Internship_Presentation_Final engineering.pptx
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
web development for engineering and engineering
PDF
International Journal of Information Technology Convergence and Services (IJI...
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
algorithms-16-00088-v2hghjjnjnhhhnnjhj.pdf
PPTX
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
PDF
Top 10 read articles In Managing Information Technology.pdf
PDF
flutter Launcher Icons, Splash Screens & Fonts
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
Road Safety tips for School Kids by a k maurya.pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
bas. eng. economics group 4 presentation 1.pptx
“Next-Gen AI: Trends Reshaping Our World”
Internship_Presentation_Final engineering.pptx
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
web development for engineering and engineering
International Journal of Information Technology Convergence and Services (IJI...
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
OOP with Java - Java Introduction (Basics)
Model Code of Practice - Construction Work - 21102022 .pdf
algorithms-16-00088-v2hghjjnjnhhhnnjhj.pdf
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
Top 10 read articles In Managing Information Technology.pdf
flutter Launcher Icons, Splash Screens & Fonts
CH1 Production IntroductoryConcepts.pptx
Road Safety tips for School Kids by a k maurya.pptx
Operating System & Kernel Study Guide-1 - converted.pdf
bas. eng. economics group 4 presentation 1.pptx

Threads .ppt

  • 1. Computer Engineering Department GANDHINAGAR INSTITUTE OF TECHNOLOGY Operating System(2140702) Threads, Concept of Multithreads, Benefits of threads, Types of threads Prepared By: Darji Mit
  • 2. Threads A threads is a flow of execution through the process code, with its own program counter, System register and stack. A thread is also called a light weigth process. Threads provide a way to improve application performance through parallelism. Each thread belongs to exactly one process and no thread can exits outside a process.
  • 4. Concept of Multithreads • Some operating system provide a combined user level thread and Kernel level thread facility. • Multiple threads within the same application can run in parallel on multiple processors and a blocking system call need not block the entire process. 1.Many to many relationship. 2.Many to one relationship. 3.One to one relationship.
  • 5. Many to Many  The many-to-many model multiplexes any number of user threads onto an equal or smaller number of kernel threads, combining the best features of the one-to-one and many-to- one models.
  • 6. Many to one • In the many-to-one model, many user-level threads are all mapped onto a single kernel thread. Thread management is handled by the thread library in user space, which is efficient in nature.
  • 7. One to one  Each user thread maps to one kernel thread. provides more concurrency, if one thread makes a blocking call another thread is allowed to run. Creating user thread requires creating coorresponding kernel thread.
  • 9. Types of Threads User Level Thread (ULT) Kernel level Thread (KLT)
  • 10. 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 singel-threaded process.
  • 11. Advantages of ULT: • User level threads does not reqquire 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.
  • 12. 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
  • 13. 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 ccreate and manage that the user threads. • Kernel requires Thread Control Block(TCB) for each thread in the pool, hence complexity increases.