wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Threading

profile
Sanket Deora
Jul 15, 2023
0 Likes
0 Discussions
148 Reads

Thread is a single sequence stream within a process. Threads have same properties as of the process so they are called as light weight processes. Threads are executed one after another but gives the illusion as if they are executing in parallel. Each thread has different states. 

Similarity between Threads and Processes –  

 

Only one thread or process is active at a time 

Within process both execute sequential

Both can create children 

Both can be scheduled by the operating system: Both threads and processes can be scheduled by the operating system to execute on the CPU. The operating system is responsible for assigning CPU time to the threads and processes based on various scheduling algorithms.

Both have their own execution context: Each thread and process has its own execution context, which includes its own register set, program counter, and stack. This allows each thread or process to execute independently and make progress without interfering with other threads or processes.

Both can communicate with each other: Threads and processes can communicate with each other using various inter-process communication (IPC) mechanisms such as shared memory, message queues, and pipes. This allows threads and processes to share data and coordinate their activities.

Differences between Threads and Processes –  

 

Resources: Processes have their own address space and resources, such as memory and file handles, whereas threads share memory and resources with the program that created them.

Scheduling: Processes are scheduled to use the processor by the operating system, whereas threads are scheduled to use the processor by the operating system or the program itself.

Creation: The operating system creates and manages processes, whereas the program or the operating system creates and manages threads.

Communication: Because processes are isolated from one another and must rely on inter-process communication mechanisms, they generally have more difficulty communicating with one another than threads do. Threads, on the other hand, can interact with other threads within the same programme directly.


Comments ()


Sign in

Read Next

KASHMIR TRIPS

Blog banner

Stories Woven in Silk: The Meaning Behind Patola Motifs

Blog banner

Distributed Denial of Service (DDoS) attack

Blog banner

Password Generator - Lisp

Blog banner

Earth with no trees

Blog banner

S-Tool : Steganography

Blog banner

“CONSISTENCY” in Social Media Marketing

Blog banner

From Model Mistakes to Metrics

Blog banner

What is a Dumpster Diving Attack?

Blog banner

Skills An Ethical Hacker Must Have

Blog banner

Perfect Moments to Wear a Rich Patola Design Outfit

Blog banner

Game Theory in Blockchain

Blog banner

Computer security techniques

Blog banner

E-BUSINESS RISK MANAGEMENT

Blog banner

Kernel Modes: User Mode vs. Kernel Mode - 80

Blog banner

Importance of education

Blog banner

NETWORK SECURITY RISKS

Blog banner

Current Trends in GIS and Remote Sensing(Ocean Applications)

Blog banner

Cyber Security Control

Blog banner

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

Blog banner

What is Segmentation?

Blog banner

computer security

Blog banner

Digital Forensics Challenges and Tools

Blog banner

Mumbai famous street food

Blog banner

The most common internet security threats

Blog banner

The functions of operating system

Blog banner

DIGITAL TECHNOLOGY

Blog banner

POSITIVE ATTITUDE IN LIFE

Blog banner

Why You Should Not Use Free VPNs

Blog banner

Hosting basics

Blog banner

Virtual memory

Blog banner

Preparing Students for Higher Education: How International Schools Shape Future Success

Blog banner

differentiate thinking humanly and rationally

Blog banner

Best password managers: Reviews of the top products

Blog banner

Data Visualization

Blog banner

Internet of Things

Blog banner

Improving the Accuracy of GPS and GNSS

Blog banner

Introduction to Solidity Programming for Blockchain Development

Blog banner

Broken Authentication Attacks

Blog banner

Process Description

Blog banner

Malware Detection Techniques for Mobile Devices

Blog banner

Security in Cloud Computing Environment using cryptography - Rushabh Modi

Blog banner