wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Threads

profile
Sanskriti undefined
Jul 05, 2024
0 Likes
0 Discussions
92 Reads

Threads

A thread is a single sequential flow of activities being executed in a process it is also known as thread of execution or thread of control. There is a way of thread execution inside the process of any operating system. Thread is often referred to as a lightweight process. Threads aren’t actually allowed to exist outside the process. A single process can have several threads. Each thread has its own control block.

Need of Thread:

o It takes far less time to create a new thread in an existing process than to create a new process.
o Threads can share the common data; they do not need to use Inter- Process communication.
o Context switching is faster when working with threads.
o It takes less time to terminate a thread than a process.
o Threads enable parallel processing, increasing overall system performance and throughout.
o Threads are on the basis of real time system.
o Priority can be assigned to threads just like process, and the thread with highest priority is executed first.

Components of Threads:

Any thread has the following components.

1. Program counter
2. Register set
3. Stack space

 

 

Types of Threads:

In the operating system, there are two types of threads.

1. Kernel level thread.

The operating system is recognized by the kernel thread. Each thread has a process in this level that has its own thread control block as well as control block system. The kernel is aware of all threads and it controls them. It provides a system call for the user space thread creation and management. For example: Solaris.

Advantages of Kernel-level threads

1. The kernel-level thread is fully aware of all threads.
2. The scheduler may decide to spend more CPU time in the process of threads being large numerical.
3. The kernel-level thread is good for those applications that block the frequency.

Disadvantages of Kernel-level threads

1. The kernel thread manages and schedules all threads.
2. The implementation of kernel threads is difficult than the user thread.
3. The kernel-level thread is slower than user-level threads.

 

2. User-level thread.

The user level thread is ignored by the operating system. This threads are simple to implement and are done so by the user. The entire process is blocked if a user executes a user level operation of thread blocking. For example: Java, POSIX.

Advantages of User-level threads

1. The user threads can be easily implemented than the kernel thread.
2. User-level threads can be applied to such types of operating systems that do not support threads at the kernel-level.
3. It is faster and efficient.

Disadvantages of User-level threads

1. User-level threads lack coordination between the thread and the kernel.
2. If a thread causes a page fault, the entire process is blocked.

 


Comments ()


Sign in

Read Next

Street foods

Blog banner

SECURITY RISKS OF REMOTE WORKING

Blog banner

Internet of Things and cyber security

Blog banner

The Future of Web Development in 2026: Trends Every Business Must Know

Blog banner

What is Packet Filtering?

Blog banner

The Rich Heritage Of Patola Sarees: Gujarat’s Timeless Weaving Art

Blog banner

THE ROLE OF CYBER FORENSICS IN CRIMINOLOGY

Blog banner

Global versus Indian Mental Health Differences

Blog banner

Paginng In OS

Blog banner

Vaping vs. Chewing Gum: The Hidden ‘Stress Fix’ Destroying Sydney’s Teeth

Blog banner

Digital Life And Mental Health: A Psychological Perspective in the Modern World

Blog banner

Digital black market or dark net poses a national security threat?

Blog banner

NIKE

Blog banner

My First Dream Bike

Blog banner

HOW CAN SOCIAL MEDIA MAKE YOU HAPPIER?

Blog banner

"Games and the future"

Blog banner

OS ASSIGNMENT

Blog banner

Memory managment

Blog banner

Deadlock and Starvation

Blog banner

Difference Between Classification And Clustering

Blog banner

The Best Photography Spots in and Around Arcadia, Florida

Blog banner

Data Structures

Blog banner

Big O Notation

Blog banner

Memory Management Techniques

Blog banner

Unlocking the Secrets: Basic Operations of Computer Forensic Laboratories

Blog banner

Record Blocking

Blog banner

Gen Z buys by seeing things online, and why you, as a new company, need to be online

Blog banner

The Chapped Lips and Dry Mouth Trap: The Sneaky Reason Cavities Spike in Winter

Blog banner

Apache Spark :- Powerful Data Processing Tool

Blog banner

What is a Malware ?

Blog banner

?Your Guide to Great Flossing, by the best affordable dentist in Maroubra

Blog banner

Types of email

Blog banner

Deadlocks

Blog banner

Benefits of Yoga

Blog banner

What does the Australian summer have in store for your oral health?

Blog banner

LINUX VSERVER VIRTUAL MACHINE ARCHITECTURE

Blog banner

Introduction to Data Science: Life Cycle & Applications

Blog banner

Assignment-3

Blog banner

'Positivity in life'

Blog banner

SPEM

Blog banner

Modern Operating System - Suren Kotian

Blog banner

Virus

Blog banner