wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Types of Threads

profile
Apeksha Harsora
Jul 11, 2023
0 Likes
0 Discussions
78 Reads

In operating systems, a THREADS refers to a sequence of instructions that can be executed independently by a processor. Threads are lightweight units of execution within a process and allow concurrent execution of multiple tasks within a single program. Example of a simple multi-threaded program: a web browser. When you open a web browser, it allows you to open multiple tabs and load web pages simultaneously. Each tab can be considered as a separate thread within the browser process. 

Types of Threads: 

User Level thread (ULT) – Is implemented in the user level library, they are not created using the system calls. Thread switching does not need to call OS and to cause interrupt to Kernel. Kernel doesn’t know about the user level thread and manages them as if they were single-threaded processes. 

Advantages of ULT –

1) Can be implemented on an OS that doesn’t support multithreading.

2) Simple representation since thread has only program counter, register set, stack space.

3) Simple to create since no intervention of kernel.

4) Thread switching is fast since no OS calls need to be made. 

Limitations of ULT –

1) No or less co-ordination among the threads and Kernel.

2) If one thread causes a page fault, the entire process blocks.

Kernel Level Thread (KLT) – Kernel knows and manages the threads. Instead of thread table in each process, the kernel itself has thread table (a master one) that keeps track of all the threads in the system. In addition kernel also maintains the traditional process table to keep track of the processes. OS kernel provides system call to create and manage threads.

Advantages of KLT –

1) Since kernel has full knowledge about the threads in the system, scheduler may decide to give more time to processes having large number of threads.

2) Good for applications that frequently block.

Limitations of KLT –

1) Slow and inefficient.

2) It requires thread control block so it is an overhead.

 


Comments ()


Sign in

Read Next

Veg Mix Pickle

Blog banner

Cyber Bullying - Neeta Vonkamuti

Blog banner

Best password managers: Reviews of the top products

Blog banner

DEVELOPMENTS LEADING TO MODERN OPERATING SYSTEMS

Blog banner

What is Minting & Mining

Blog banner

Virtual Memory

Blog banner

Business-to-Business

Blog banner

Embedded Operating System

Blog banner

Evolution of Operating System

Blog banner

Functions Of Operating Systems

Blog banner

ADIDAS

Blog banner

Domain Name System

Blog banner

Install Ubuntu Easily

Blog banner

IOT Hacking Techniques

Blog banner

Heart Fulness Meditation

Blog banner

The Importance of Financial Literacy for College Students

Blog banner

Getting into anime My anime suggestions

Blog banner

Why Inconel 625 and Monel 400 Remain Unbeatable in Refinery Applications?

Blog banner

A-B-C of Networking: Part-1 (Basics)

Blog banner

Memory Management

Blog banner

MEMORY HIERARCHY

Blog banner

Socket Programming in Java

Blog banner

10 Reasons to Date a South Indian Girl

Blog banner

Different types of scam Fraud

Blog banner

Why Data Privacy Is Changing Online Advertising

Blog banner

Penetration Testing

Blog banner

Deadlocks in operating system

Blog banner

Stephen Hawking : A Remarkable Physicist

Blog banner

10 Problems you face if you are an Otaku

Blog banner

Topic: Sessions in Operating system

Blog banner

Answer

Blog banner

Famous Indian dishes that where misunderstood to be Indian

Blog banner

Smart Homes | Zigbee Alliance

Blog banner

TEAMWORK

Blog banner

File management

Blog banner

Multicore and Multithreading

Blog banner

Multiprocessor and Multicore Organization

Blog banner

Google classroom

Blog banner

The Difference Between Plaque and Tartar Explained Simply

Blog banner

Cache Memory

Blog banner

Interesting fact about kangaroo.

Blog banner

What is thread and alse multithreading

Blog banner