wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Types of Threads

profile
Apeksha Harsora
Jul 11, 2023
0 Likes
0 Discussions
79 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

RAID

Blog banner

What is metaverse?

Blog banner

Understanding Mobile Device Forensics

Blog banner

Building a Better You: Fitness Tips and Inspiration.

Blog banner

Remote Work in 2026

Blog banner

CONCURRENCY

Blog banner

Networking 101: How to Build Meaningful Connections in College

Blog banner

OS Assignment 3 Deadlock

Blog banner

ZOHO

Blog banner

GIS info about Bermuda Triangle

Blog banner

Data Science in Healthcare: Predicting Diseases

Blog banner

Apache Kafka

Blog banner

Smart Shoephone: Is that technology overdose!?

Blog banner

Privacy LAWs in IT

Blog banner

BUFFER OVERFLOW_142

Blog banner

Exploring Virtual Machines and Computer Forensic Validation Tools

Blog banner

How to Prepare Your Child for Their First Day of School?

Blog banner

Buffer Overflow

Blog banner

Be you

Blog banner

Instagram

Blog banner

GUIDE TO GIS

Blog banner

Music helps reduce stress

Blog banner

What is Vishing?

Blog banner

The Right way of cooking

Blog banner

Operating System

Blog banner

My favourite food

Blog banner

Ethical Hacking

Blog banner

INTRODUCTION

Blog banner

Navigation With Indian Constellation(NavIC) by ISRO in Geographic Information Systems

Blog banner

What is Virtual Memory

Blog banner

Data Visualization in Decision-Making

Blog banner

Virtual Memory - Explaination, Working, Steps

Blog banner

The application udemy

Blog banner

The 60-Minute Window: What to Do (And What NOT to Do) When You Knock Out a Tooth

Blog banner

Multicore and Multithreading

Blog banner

Consumer to consumer Business model

Blog banner

bulk email software

Blog banner

Deadlock

Blog banner

MENDELEY

Blog banner

Facebook marketing

Blog banner

Crypto tax evasion

Blog banner

c

Blog banner