wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Threads

profile
Harsh Darji
Aug 15, 2024
0 Likes
0 Discussions
36 Reads

A thread is a single sequence stream within a process. Threads are also called lightweight processes as they possess some of the properties of processes.

Each thread belongs to exactly one process. In an operating system that supports multithreading, the process can consist of many threads. But threads can be effective only if the CPU is more than 1 otherwise two threads have to context switch for that single CPU.

What is Thread in Operating Systems?

In a process, a thread refers to a single sequential activity being executed. these activities are also known as thread of execution or thread control. Now, any operating system process can execute a thread. we can say, that a process can have multiple threads.

Why Do We Need Thread?

  • Threads run in parallel improving the application performance. Each such thread has its own CPU state and stack, but they share the address space of the process and the environment. 
  • Threads can share common data so they do not need to use inter-process communication 
  • . Like the processes, threads also have states like ready, executing, blocked, etc. 
  • Priority can be assigned to the threads just like the process, and the highest priority thread is scheduled first.
  • Each thread has its own Thread control 
  • . Like the process, a context switch occurs for the thread, and register contents are saved. As threads share the same address space and resources, synchronization is also required for the various activities of the thread.

Components of Threads

These are the basic components of the Operating System.

  • Stack Space
  • Register Set



Comments ()


Sign in

Read Next

Malware Defense

Blog banner

Is It Too Late to Straighten My Teeth as an Adult?

Blog banner

6 Digital Marketing Trends You Must Watch Out For In 2022

Blog banner

LISP - Library Management System

Blog banner

'Positivity in life'

Blog banner

Music is life

Blog banner

26/11 The Black Day Of Mumbai

Blog banner

Blockchain Transactions

Blog banner

Memory heirchy

Blog banner

Why am I never satisfied with my Life?

Blog banner

ahh wait a min

Blog banner

Banaras

Blog banner

Challenges of Digital forensics in cloud computing environment

Blog banner

Vikrant’s first blog

Blog banner

Python as a tool for Data science task & project

Blog banner

Dangers of Using Public WiFis

Blog banner

Process and Threading

Blog banner

Expert System In AI

Blog banner

Why Kanye West (Now Ye) is the GOAT: A Legacy Beyond Music

Blog banner

Travelling blog

Blog banner

evolution of operating system - Disha Parekh

Blog banner

This is my first blog.

Blog banner

Regression Analysis

Blog banner

BEAUTY IS IN THE EYE OF THE BEHOLDER

Blog banner

GIS Applications: How Different Industries are Leveraging Geospatial Data

Blog banner

File System

Blog banner

INTERNET

Blog banner

Basic Security For SOAP Services

Blog banner

Memory Management Techniques

Blog banner

Different memory allocation strategies

Blog banner

How to invest in Indian Stock Market ? ~ Tutorial 1

Blog banner

How to tie a Tie

Blog banner

Cache memory

Blog banner

Koinex is shutting down and here is how you can withdraw...

Blog banner

Ola

Blog banner

Data Visualization in Decision-Making

Blog banner

An Overview of Virtual Machines

Blog banner

Wedding photographer

Blog banner

Memory Partitioning

Blog banner

Multiprocessor and Multicore Organization

Blog banner

Service Catalogue Management

Blog banner

Stephen Hawking : A Remarkable Physicist

Blog banner