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

DIGITAL ECONOMY

Blog banner

Kernel in Operating System

Blog banner

Deadlock

Blog banner

What are Tenders its various types

Blog banner

Volatile Memory & Non-Volatile Memory Explained

Blog banner

Smartsheet

Blog banner

Cyber Attacks -- Trends Patterns and Security Countermeasures

Blog banner

Memory Management

Blog banner

Microsoft Windows Overview

Blog banner

E-security systems | CCTV

Blog banner

How to Conquer Depression ?

Blog banner

MY FIRST BLOG?

Blog banner

38_Network Sniffing Techniques_SBC

Blog banner

Why is online marketing is important in current scenario

Blog banner

FILE SHARING

Blog banner

Virtual Memory

Blog banner

Game via listing method

Blog banner

Google App Engine

Blog banner

Latest Email Marketing Techniques

Blog banner

History of ITIL

Blog banner

New Ransomware Encrypts Your Android And Then Changes PIN Lock

Blog banner

Segmentation and paging concept

Blog banner

Predicting Student Performance with Data Science

Blog banner

Cyber Forensics in Healthcare: Protecting Patient Data and Preventing Breaches

Blog banner

Full Disk Encryption on Digital Forensics

Blog banner

MySQL

Blog banner

Cache memory

Blog banner

How the mobile IP is used in GSM architecture.

Blog banner

SQL Injection

Blog banner

Elements and Principles of Photography

Blog banner

How to Avoid being a Victim of Cybercrime

Blog banner

Game Theory in Blockchain

Blog banner

A Happier Workplace Starts with Healthy Lunches by Meal Maharaj

Blog banner

HTML vs HTML5

Blog banner

Clarizen

Blog banner

How to make Pancakes

Blog banner

10 Problems you face if you are an Otaku

Blog banner

A Statistical Analysis of Player Performance and their Value in cricket

Blog banner

Vulnerability Assessment

Blog banner

I/O Buffering

Blog banner

The War With Cold On Earth

Blog banner

INSTAGRAM

Blog banner