wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Synchronization

profile
23 B Titiksha Shah
Aug 16, 2024
0 Likes
0 Discussions
119 Reads

Synchronization

The communication of a message between two processes implies some level of synchronization

between the two: The receiver cannot receive a message until it has

been sent by another process. In addition, we need to specify what happens to a

process after it issues a send or receive primitive.

Consider the send primitive first. When a send primitive is executed in a

process, there are two possibilities: Either the sending process is blocked until the

message is received, or it is not. Similarly, when a process issues a receive primitive,

there are two possibilities:

1. If a message has previously been sent, the message is received and execution

continues.

2. If there is no waiting message, then either (a) the process is blocked until

a message arrives, or (b) the process continues to execute, abandoning the

attempt to receive.

Thus, both the sender and receiver can be blocking or nonblocking. Three

combinations are common, although any particular system will usually have only

one or two combinations implemented:

• Blocking send, blocking receive: Both the sender and receiver are blocked until

the message is delivered; this is sometimes referred to as a rendezvous . This

combination allows for tight synchronization between processes.

• Nonblocking send, blocking receive: Although the sender may continue on,

the receiver is blocked until the requested message arrives. This is probably

the most useful combination. It allows a process to send one or more messages

to a variety of destinations as quickly as possible. A process that must receive

a message before it can do useful work needs to be blocked until such a message

arrives. An example is a server process that exists to provide a service or

resource to other processes.

• Nonblocking send, nonblocking receive: Neither party is required to wait.

The nonblocking send is more natural for many concurrent programming

tasks. For example, if it is used to request an output operation, such as printing, it

allows the requesting process to issue the request in the form of a message and then

carry on. One potential danger of the nonblocking send is that an error could lead

to a situation in which a process repeatedly generates messages. Because there is no

blocking to discipline the process, these messages could consume system resources,

including processor time and buffer space, to the detriment of other processes and

the OS. Also, the nonblocking send places the burden on the programmer to determine

that a message has been received


Comments ()


Sign in

Read Next

The House ??of Patola Designs: Traditional Weaves with a Modern Twist

Blog banner

What your Favorite colour says about You?

Blog banner

Decoding Confusion Matrix

Blog banner

How the mobile IP is used in GSM architecture.

Blog banner

AutoML: The Future of Automated Data Science

Blog banner

PROCESS CONTROL BLOCK IN OS

Blog banner

Cross site scripting Attack

Blog banner

Cyber Forensics in a Ransomware Attack Recovery

Blog banner

Tiranga - Abbas Haveliwala

Blog banner

Finding Meaning, and Identity : Understanding Existential Concerns and Mental Well-being

Blog banner

Binary Search Tree (BST) in Data Structure

Blog banner

Pink sauce pasta

Blog banner

Veg Mix Pickle

Blog banner

Service transition principles

Blog banner

Socket Programming in Java

Blog banner

Yahoo! mail

Blog banner

The Right way of cooking

Blog banner

Why Seasonal Summer Foods Are Best for Your Health?

Blog banner

MEMORY FORENSIC ACQUISITION AND ANALYSISOF MEMORY AND ITS TOOLS COMPARISON

Blog banner

Virtual memory in Operating System

Blog banner

Dental Problems That Start Small But Should Never Be Ignored

Blog banner

Emotional Resilience and Psychological Flexibility: The Hidden Foundation of Mental Health Well-being

Blog banner

RACI model in IT services

Blog banner

Is Social Media Marketing The Next Wave Of Digital Marketing?

Blog banner

Deadlocks in Operating System

Blog banner

Spitting Pink in the Sink: Why Your Gums Randomly Bleed

Blog banner

The Art Of Getting What You Want In Life....

Blog banner

Cyber Laws In India and Around the World

Blog banner

Footprinting

Blog banner

RAID

Blog banner

Deadlock and Starvation

Blog banner

Studying Denial of service attack using DOSHTTP tool

Blog banner

First-Order Logic (FOL): The Foundation of Modern Logic

Blog banner

Social engineering in cyber security

Blog banner

semaphores

Blog banner

Deadlock Prevention

Blog banner

Types of Threads

Blog banner

Why Eating a Variety of Foods Is Important for Complete Nutrition?

Blog banner

The Psychology of Diversity, Equity & Inclusion: How Inclusive Workplaces Boost Productivity

Blog banner

Getting started with Android Studio

Blog banner

Process and Threading

Blog banner

What if COVID does not exist!

Blog banner