wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Synchronization

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

Types of threads

Blog banner

The Impact of Tolerances and Wall Thickness on Pipeline Integrity

Blog banner

Improving the Accuracy of GPS and GNSS

Blog banner

Explain Kernel in OS

Blog banner

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

Blog banner

virtual memory

Blog banner

Zero-Day Attack

Blog banner

Memory Management

Blog banner

Some web vulnerabilities

Blog banner

How To Implement Search Engine Marketing (Sem) Strategy Effectively

Blog banner

What Your Child Learns During Free Play (That You Might Not Notice)

Blog banner

memory cache

Blog banner

Cloud Security: Trends and Innovations

Blog banner

File management in os

Blog banner

Odoo

Blog banner

How Social Media Algorithms Will Work in 2026?

Blog banner

Best Time to Visit Arcadia, Florida & Why Oak Tree Hotel Is Always Ready

Blog banner

Virtual memory

Blog banner

" THE ANSWERS THAT LED INDIAN BEAUTIES TO THE MISS UNIVERSE HISTORIC WIN. "

Blog banner

Culture Of Ladakh

Blog banner

Privacy in Social Media and Online Services

Blog banner

ODOO

Blog banner

Meshoo

Blog banner

Image Steganalysis in Digital Forensics

Blog banner

Hacking of web server and application

Blog banner

The Role of Fibre in Everyday Nutrition and Digestive Health

Blog banner

15 Interesting Facts about India

Blog banner

OS Assignment 1

Blog banner

Risk factors in service transistion

Blog banner

virtual machine

Blog banner

How Industrial Gratings Improve Safety, Drainage, and Workplace Efficiency?

Blog banner

MEMORY MANAGEMENT

Blog banner

What is a Dumpster Diving Attack?

Blog banner

Super Garlicky Tomato Soup with Smashed White Beans

Blog banner

Deadlock and Starvation

Blog banner

Jira Software

Blog banner

"Can Lisp do Machine Learning?"

Blog banner

Natural Language Processing(NLP)

Blog banner

Demystifying Cryptography: A Beginner's Guide

Blog banner

**THE MUJAWARR: Transforming the Logistics Industry**

Blog banner

Virtual Memory

Blog banner

Stop Racism

Blog banner