wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Synchronization

profile
23 B Titiksha Shah
Aug 16, 2024
0 Likes
0 Discussions
121 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

Understanding the 'Ambiverts'

Blog banner

JUSTICE FOR EVERY “BEZUBAAN ANIMAL”

Blog banner

Game Theory in Blockchain

Blog banner

DNS Cache

Blog banner

What Are Electro-Forged Gratings? Benefits, Applications, and Why Industries Prefer Them

Blog banner

Cyber-crime Investigation and Future Directions

Blog banner

Why Mumbai Professionals Are Switching Back to Home-Style Tiffin Meals

Blog banner

Hubspot

Blog banner

Exploring Florida Beyond the Obvious Tourist Trails

Blog banner

Mobile Survey

Blog banner

Smartsheet

Blog banner

Charcoal, Lemon, and DIY Kits: Which “Viral” Dental Trends Are Actually Dangerous?

Blog banner

Deadlock

Blog banner

How Reading Books Shape a Child’s Imagination and Thinking?

Blog banner

Simple STEM Activities for Toddlers That Spark Curiosity

Blog banner

IT Service as as Value Creation

Blog banner

Information Technology In E- Commerce

Blog banner

COMFORT IS ALL ABOUT FASHION

Blog banner

Rock, Paper, Scissors Game in Common Lisp

Blog banner

Vulnerability Assessment

Blog banner

Protect yourself from System Hacking with these Simple Steps

Blog banner

?What Children Learn Between Activities: The Hidden Learning Moments in a Preschool Day

Blog banner

Data Exfiltration

Blog banner

IS CONVERTING AMBITION INTO PROFESSION?

Blog banner

Apple

Blog banner

Semaphores

Blog banner

Exploring Human Factors in Cyber Forensics Investigations.

Blog banner

IP Address

Blog banner

Session Hijacking

Blog banner

Types of Big Data

Blog banner

Esri India launches Policy Maps.

Blog banner

IT Service Continuity Management

Blog banner

Zomato (Income Sources)

Blog banner

Memory Partitioning

Blog banner

Virtual machine and virtualizing

Blog banner

Computer security techniques

Blog banner

Climate Anxiety: Understanding the Psychological Impact of a Changing World

Blog banner

Cyber Forensics in Healthcare: Protecting Patient Data and Preventing Breaches

Blog banner

Threads

Blog banner

How Puppet Shows and Role Play Teach Empathy to Preschoolers

Blog banner

SWEET SHREDDED MANGO CHUNDA (MANGO CHUNDA)

Blog banner

Importance of Network Security Risk

Blog banner