wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Types of Threads

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

Multiprocessor and Multicore Organization

Blog banner

What is semaphore in operating system?

Blog banner

Malware

Blog banner

Bulk E-mail software

Blog banner

Virtual Memory

Blog banner

DATA SCIENCE IN BUSINESS AND MARKETING

Blog banner

10 Signs your Computer has Virus

Blog banner

Concurrency:Deadlock and Starvation

Blog banner

38_Network Sniffing Techniques_SBC

Blog banner

File management in os

Blog banner

Mariana Trench: The deepest depths

Blog banner

Kernel in Operating System

Blog banner

How HRMS, Task Management, and Team Chats Can Improve Workplace Productivity

Blog banner

Zero Trust Security Model: Revolutionizing Cybersecurity in the Digital Age

Blog banner

Privacy-Enhancing Computation Techniques

Blog banner

Memory heirachy (Operating system)

Blog banner

Trello ( management software)

Blog banner

Deadlock

Blog banner

Semaphores

Blog banner

Scala - a programming tool

Blog banner

THE LEGAL ISSUES OF COMPUTER FORENSICS IN INDIA

Blog banner

Electronic Funds Transfer

Blog banner

File management

Blog banner

Diwali

Blog banner

Service Design Model

Blog banner

The Peephole

Blog banner

Explaining Buffer Overflow with Example

Blog banner

Different types of scam frauds

Blog banner

Blockchain

Blog banner

Data Visualization – Importance and tools (Tableau, Power BI)

Blog banner

Brain wash of social media

Blog banner

The Power of Forensic Watermarking in the Fight Against Content Piracy

Blog banner

Scheduling

Blog banner

VIRTUAL MEMORY

Blog banner

JUSTICE FOR EVERY “BEZUBAAN ANIMAL”

Blog banner

Blockchain Transactions

Blog banner

"Mahakali cave"

Blog banner

How Does Preschool Help Children Become Better Decision Makers?

Blog banner

Fault tolerance

Blog banner

MACHINE LEARNING

Blog banner

Virtual memory

Blog banner

Palm Vein Biometric Technology; Contactless vein authentication

Blog banner