SlideShare a Scribd company logo
TASK
COMMUNICATION
A PRESENTATION BY:
JAIKI (13)
JAYANTI SINGH (14)
KAVITA RAJPUT (19)
WHAT IS A TASK ?
 It is defined as a program in execution and has an
order of priority , schedule or timeline for
execution.
 Also called a “job” .
 A program / part of task / job in execution is called
a process.
TASKS OF THE OPETATING SYSTEM
TASK COMMUNICATION
 Task communication comprises all mechanisms serving to exchange
information among tasks. 
 In a multitasking system multiple task/ process run concurrently (in
pseudo parallelism ) & each process may / may not interact .
 Based on degree of interaction , processes running on OS are classified
as :
 Cooperating process
 Competing process
 Cooperating Process
 Cooperating processes are those that can affect or
are affected by other processes running on the
system. Cooperating processes may share data with
each other.
 Exchange of information & communication by:
 Cooperation by sharing
 Cooperation by communication
Cooperation by sharing
The cooperating processes can cooperate
with each other using shared data such as
memory, variables, files, databases etc.
Critical section is used to provide data
integrity and writing is mutually exclusive to
prevent inconsistent data.
Cooperation by communication
No data is shared between processes . They
communicate for synchronization . The cooperating
processes can cooperate with each other using
messages. This may lead to deadlock if each
process is waiting for a message from the other to
perform a operation. Starvation is also possible if a
process never receives a message.
 Competing Process
The processes do not share anything among themselves but they
share system resources . These type of processes compete for
system resources like file, display devices etc.
PROCESS 1 PROCESS 2 PROCESS 3
SHARED RESOURCES
(Critical Section)
INTER PROCESS COMMUNICATION (IPC)
 The mechanism by which process or task communicate.
 Essential for process coordination
 IPC Mechanisms:
 Shared Memory
 Message Passing
 Remote Procedure Call & Sockets
Shared Memory
 Information to be communicated is written to shared
memory. Process that require this information can read it
from there.
 It’s implementation is kernel dependant.
 Mechanisms for implementing shared memory for IPC :
 Pipes
 Memory mapped objects
 PIPES
 A section of shared memory used by processes for
communicating .
 Process that create a pipe – Pipe Server
 Process that connect a pipe – Pipe Client
 There are two types of pipe for IPC :
 Anonymous pipes
 Named pipes WRITE ()
READ()
PROCESS
P[0]
P[1]
 Anonymous pipe:
Unnamed, unidirectional for data transfer between two processes.
 Named pipe:
 Named , unidirectional / bidirectional for data exchange between
two processes.
 Any process can act as both client and server allowing
point to point communication.
Memory Mapped Objects
 A shared memory technique adopted by RTOS for allocating
shared block of memory that can be accessed by multiple
process simultaneously.
 Any process which want to share data with other process can
map physical memory area of mapped object to it’s virtual
memory space and use it for sharing data.
Memory mapped
objects
MESSAGE PASSING
 Operations
 Send(message)
 Receive(message)
 Methods to implement link b/w two processes
 Direct or indirect communication
 Synchronous or asynchronous communication
 Direct communication
 Each process must explicitly name the recipient or sender of
communication.
 send(P, message) – send a message to process P
 receive(Q, message) – receive a message from process Q
 Communication link has the following properties
 Link is automatically established. Process must only know the
identity of other process.
 Link is associated with exactly two processes
 B/w each pair of processes, exists exactly one link
Symmetric Addressing
Asymmetric Addressing
 Indirect communication
 Messages are sent and received through mailboxes or ports.
 Send(A, message) – send a message to mailbox
 Receive (A, message) – receive a message from mailbox A
 Link properties
 Link is established between a pair of processes only if both
members of the pair have a shared mailbox.
 Link may be associated with more than two processes.
 Between each pair of communicating processes,
there may be a number of different links, with each
link corresponding to one mailbox.
Mail Box
Type of Communication
link by Mail Box:
 One to One Link.
 Many to One Link.
 One to Many Link.
 Many to Many link.
Difference between Shared
memory and Message passing
Shared memory
1. Processes exchange
information by reading
or writing into the
shared region.
2. Used for exchanging
large amount of data.
3. Faster than message
passing (system calls
required only to
establish shared
region and rest all
access are treated as
normal memory
access)
Message passing
1. Direct exchange of
messages.
2. Used for exchanging
small amounts of
data.
3. Slower than shared
memory because it is
implemented using
system calls , which
involves kernel
intervention.
REMOTE PROCEDURE CALL (RPC)
Is a protocol that one program can use to request a service from a
program located in another computer in a network without having to
understand network details.
A procedure call is also sometimes known as a function call or a
subroutine call.
The requesting program is a client and the service- providing
program is the server.
When program statements that use RPC are compiled into an
executable program, a stub is included in the compiled code
that acts as the representative of the remote procedure code.
the server includes a runtime program and stub that
interface with the remote procedure itself.
RPC allows programs to call procedures located on other machines.
When a process on machine A calls' a
procedure on machine B, the calling process
on A is suspended, and execution of the
called procedure takes place on B.
Information can be transported from the
caller to the callee in the parameters and
can come back in the procedure result.
STUBS
 When the calling process calls a procedure, the action performed by that procedure will
not be the actual code as written, but code that begins network communication.
 It has to connect to the remote machine, send all the parameters down to it, wait for
replies, do the right thing to the stack and return. This is the client side stub.
 The server side stub has to wait for messages asking for
a procedure to run.
 It has to read the parameters, and present them in a suitable form to execute the
procedure locally. After execution, it has to send the results back to the calling process.
HOW RPC WORKS?
 An RPC is analogous to a function call. Like a
function call, when an RPC is made, the
calling arguments are passed to the remote
procedure and the caller waits for a response
to be returned from the remote procedure.
 The client makes a procedure call that sends a
request to the server and waits.
 When the request arrives, the server calls a
dispatch routine that performs the requested
service, and sends the reply to the client.
 After the RPC call is completed, the client
program continues. RPC specifically
supports network applications.
Task communication
RPC APPLICATION DEVELOPMENT
To develop an RPC application the following steps are needed:
 Specify the protocol for client server communication
 Develop the client program
 Develop the server program
The programs will be compiled separately.
The communication protocol is achieved by generated stubs
and these stubs and RPC (and other libraries) will need to
be linked in.
STUB
 The client calls the local stub procedure. The stub packages up the
parameters into a network message. This is called marshaling.
 Networking functions in the O/S kernel are called by the stub to send the
message.
 The kernel sends the message(s) to the remote system. This maybe
connection-oriented or connectionless.
 A server stub unmarshals the arguments from the network message.
 The server stub executes a local procedure call.
 The procedure completes, returning execution to the server stub.
 The server stub marshals the return values into a networkmessage.
 The return messages are sent back.
 The client stub reads the messages using the network functions.
 The message is unmarshalled. And the return values are set on the
stack for the local process.
STUB
BIBLIOGRAPHY  www.geeksforgeeks.org/inter-process-com
municationipc/
 www.w3schools.in/operating-system-tutori
al/interprocess-communicationipc/
 microcontrollerslab.com/embedded-
operatingsystem/
 www.sciencedirect.com/topics/computer-sc
ience/embeddedoperating-system
 www.slideshare.net
THANK YOU

More Related Content

What's hot (20)

PPT
Quality attributes of Embedded Systems
VijayKumar5738
 
PPTX
Introduction to Embedded System I: Chapter 2 (5th portion)
Moe Moe Myint
 
PPTX
Interfacing memory with 8086 microprocessor
Vikas Gupta
 
PPTX
Classification of embedded systems
Vikas Dongre
 
PPT
Embedded firmware
Joel P
 
PPT
Real Time Operating system (RTOS) - Embedded systems
Hariharan Ganesan
 
PPTX
Target hardware debugging
Shriya Shankar
 
PDF
IoT and m2m
pavan penugonda
 
PPTX
Design challenges in embedded systems
mahalakshmimalini
 
PPTX
Unit 4
Mayura shelke
 
PPTX
Arduino and its hw architecture
Zeeshan Rafiq
 
PPTX
EDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLE
Sabeel Irshad
 
PDF
IoT Physical Servers and Cloud Offerings.pdf
GVNSK Sravya
 
PDF
Typical Embedded System
anand hd
 
PDF
Question paper with solution the 8051 microcontroller based embedded systems...
manishpatel_79
 
PPTX
Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
Moe Moe Myint
 
PDF
Device drivers and interrupt service mechanism
Vijay Kumar
 
PPTX
Chapter 3 Charateristics and Quality Attributes of Embedded System
Moe Moe Myint
 
PPT
Embedded System Basics
Dr M Muruganandam Masilamani
 
PPT
RTOS Basic Concepts
Pantech ProLabs India Pvt Ltd
 
Quality attributes of Embedded Systems
VijayKumar5738
 
Introduction to Embedded System I: Chapter 2 (5th portion)
Moe Moe Myint
 
Interfacing memory with 8086 microprocessor
Vikas Gupta
 
Classification of embedded systems
Vikas Dongre
 
Embedded firmware
Joel P
 
Real Time Operating system (RTOS) - Embedded systems
Hariharan Ganesan
 
Target hardware debugging
Shriya Shankar
 
IoT and m2m
pavan penugonda
 
Design challenges in embedded systems
mahalakshmimalini
 
Arduino and its hw architecture
Zeeshan Rafiq
 
EDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLE
Sabeel Irshad
 
IoT Physical Servers and Cloud Offerings.pdf
GVNSK Sravya
 
Typical Embedded System
anand hd
 
Question paper with solution the 8051 microcontroller based embedded systems...
manishpatel_79
 
Ch 1 introduction to Embedded Systems (AY:2018-2019--> First Semester)
Moe Moe Myint
 
Device drivers and interrupt service mechanism
Vijay Kumar
 
Chapter 3 Charateristics and Quality Attributes of Embedded System
Moe Moe Myint
 
Embedded System Basics
Dr M Muruganandam Masilamani
 
RTOS Basic Concepts
Pantech ProLabs India Pvt Ltd
 

Similar to Task communication (20)

PPTX
Chap-3- Process.pptx distributive system
Tofikmohammed5
 
PPT
Chapter 4 communication2
DBU
 
PPTX
COMPLEXITY CHAPTER 4 LECTURE FOR FOURTH YEAR .pptx
RadielKassa
 
PPT
Chapter 3-Processes.ppt
sirajmohammed35
 
PPTX
CHP-4.pptx
FamiDan
 
PPT
Process
Sachin MK
 
PPT
OSCh4
Joe Christensen
 
PPT
Ch4 OS
C.U
 
DOCX
Distributed System
Nitesh Saitwal
 
PPT
DS-Chapter DDEFR2-Communication_105220.ppt
menoralemu03
 
PPTX
Internetworking
Raghu nath
 
PDF
OSI MODEL
Soumo Dhali
 
PPT
CN unit 1 part 2 2023.ppt
mohanravi1986
 
PPTX
Chapter 2- distributed system Communication.pptx
gadisaAdamu
 
PPT
Chapter 3 - Processes
Wayne Jones Jnr
 
PPTX
Middleware in Distributed System-RPC,RMI
Prajakta Rane
 
PPT
Chapter 2B-Communication.ppt
sirajmohammed35
 
PPTX
osimodel-2106121ffffffffffffffffffffffffffff70731.pptx
mahendrasubedi2060
 
Chap-3- Process.pptx distributive system
Tofikmohammed5
 
Chapter 4 communication2
DBU
 
COMPLEXITY CHAPTER 4 LECTURE FOR FOURTH YEAR .pptx
RadielKassa
 
Chapter 3-Processes.ppt
sirajmohammed35
 
CHP-4.pptx
FamiDan
 
Process
Sachin MK
 
Ch4 OS
C.U
 
Distributed System
Nitesh Saitwal
 
DS-Chapter DDEFR2-Communication_105220.ppt
menoralemu03
 
Internetworking
Raghu nath
 
OSI MODEL
Soumo Dhali
 
CN unit 1 part 2 2023.ppt
mohanravi1986
 
Chapter 2- distributed system Communication.pptx
gadisaAdamu
 
Chapter 3 - Processes
Wayne Jones Jnr
 
Middleware in Distributed System-RPC,RMI
Prajakta Rane
 
Chapter 2B-Communication.ppt
sirajmohammed35
 
osimodel-2106121ffffffffffffffffffffffffffff70731.pptx
mahendrasubedi2060
 
Ad

Recently uploaded (20)

PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PPTX
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PPTX
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
PDF
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Ad

Task communication

  • 1. TASK COMMUNICATION A PRESENTATION BY: JAIKI (13) JAYANTI SINGH (14) KAVITA RAJPUT (19)
  • 2. WHAT IS A TASK ?  It is defined as a program in execution and has an order of priority , schedule or timeline for execution.  Also called a “job” .  A program / part of task / job in execution is called a process.
  • 3. TASKS OF THE OPETATING SYSTEM
  • 4. TASK COMMUNICATION  Task communication comprises all mechanisms serving to exchange information among tasks.   In a multitasking system multiple task/ process run concurrently (in pseudo parallelism ) & each process may / may not interact .  Based on degree of interaction , processes running on OS are classified as :  Cooperating process  Competing process
  • 5.  Cooperating Process  Cooperating processes are those that can affect or are affected by other processes running on the system. Cooperating processes may share data with each other.  Exchange of information & communication by:  Cooperation by sharing  Cooperation by communication
  • 6. Cooperation by sharing The cooperating processes can cooperate with each other using shared data such as memory, variables, files, databases etc. Critical section is used to provide data integrity and writing is mutually exclusive to prevent inconsistent data.
  • 7. Cooperation by communication No data is shared between processes . They communicate for synchronization . The cooperating processes can cooperate with each other using messages. This may lead to deadlock if each process is waiting for a message from the other to perform a operation. Starvation is also possible if a process never receives a message.
  • 8.  Competing Process The processes do not share anything among themselves but they share system resources . These type of processes compete for system resources like file, display devices etc. PROCESS 1 PROCESS 2 PROCESS 3 SHARED RESOURCES (Critical Section)
  • 9. INTER PROCESS COMMUNICATION (IPC)  The mechanism by which process or task communicate.  Essential for process coordination  IPC Mechanisms:  Shared Memory  Message Passing  Remote Procedure Call & Sockets
  • 10. Shared Memory  Information to be communicated is written to shared memory. Process that require this information can read it from there.  It’s implementation is kernel dependant.  Mechanisms for implementing shared memory for IPC :  Pipes  Memory mapped objects
  • 11.  PIPES  A section of shared memory used by processes for communicating .  Process that create a pipe – Pipe Server  Process that connect a pipe – Pipe Client  There are two types of pipe for IPC :  Anonymous pipes  Named pipes WRITE () READ() PROCESS P[0] P[1]
  • 12.  Anonymous pipe: Unnamed, unidirectional for data transfer between two processes.  Named pipe:  Named , unidirectional / bidirectional for data exchange between two processes.  Any process can act as both client and server allowing point to point communication.
  • 13. Memory Mapped Objects  A shared memory technique adopted by RTOS for allocating shared block of memory that can be accessed by multiple process simultaneously.  Any process which want to share data with other process can map physical memory area of mapped object to it’s virtual memory space and use it for sharing data.
  • 15. MESSAGE PASSING  Operations  Send(message)  Receive(message)  Methods to implement link b/w two processes  Direct or indirect communication  Synchronous or asynchronous communication
  • 16.  Direct communication  Each process must explicitly name the recipient or sender of communication.  send(P, message) – send a message to process P  receive(Q, message) – receive a message from process Q  Communication link has the following properties  Link is automatically established. Process must only know the identity of other process.  Link is associated with exactly two processes  B/w each pair of processes, exists exactly one link
  • 19.  Indirect communication  Messages are sent and received through mailboxes or ports.  Send(A, message) – send a message to mailbox  Receive (A, message) – receive a message from mailbox A  Link properties  Link is established between a pair of processes only if both members of the pair have a shared mailbox.  Link may be associated with more than two processes.  Between each pair of communicating processes, there may be a number of different links, with each link corresponding to one mailbox.
  • 21. Type of Communication link by Mail Box:  One to One Link.  Many to One Link.  One to Many Link.  Many to Many link.
  • 22. Difference between Shared memory and Message passing Shared memory 1. Processes exchange information by reading or writing into the shared region. 2. Used for exchanging large amount of data. 3. Faster than message passing (system calls required only to establish shared region and rest all access are treated as normal memory access) Message passing 1. Direct exchange of messages. 2. Used for exchanging small amounts of data. 3. Slower than shared memory because it is implemented using system calls , which involves kernel intervention.
  • 23. REMOTE PROCEDURE CALL (RPC) Is a protocol that one program can use to request a service from a program located in another computer in a network without having to understand network details. A procedure call is also sometimes known as a function call or a subroutine call. The requesting program is a client and the service- providing program is the server. When program statements that use RPC are compiled into an executable program, a stub is included in the compiled code that acts as the representative of the remote procedure code. the server includes a runtime program and stub that interface with the remote procedure itself.
  • 24. RPC allows programs to call procedures located on other machines. When a process on machine A calls' a procedure on machine B, the calling process on A is suspended, and execution of the called procedure takes place on B. Information can be transported from the caller to the callee in the parameters and can come back in the procedure result.
  • 25. STUBS  When the calling process calls a procedure, the action performed by that procedure will not be the actual code as written, but code that begins network communication.  It has to connect to the remote machine, send all the parameters down to it, wait for replies, do the right thing to the stack and return. This is the client side stub.  The server side stub has to wait for messages asking for a procedure to run.  It has to read the parameters, and present them in a suitable form to execute the procedure locally. After execution, it has to send the results back to the calling process.
  • 26. HOW RPC WORKS?  An RPC is analogous to a function call. Like a function call, when an RPC is made, the calling arguments are passed to the remote procedure and the caller waits for a response to be returned from the remote procedure.  The client makes a procedure call that sends a request to the server and waits.  When the request arrives, the server calls a dispatch routine that performs the requested service, and sends the reply to the client.  After the RPC call is completed, the client program continues. RPC specifically supports network applications.
  • 28. RPC APPLICATION DEVELOPMENT To develop an RPC application the following steps are needed:  Specify the protocol for client server communication  Develop the client program  Develop the server program The programs will be compiled separately. The communication protocol is achieved by generated stubs and these stubs and RPC (and other libraries) will need to be linked in.
  • 29. STUB  The client calls the local stub procedure. The stub packages up the parameters into a network message. This is called marshaling.  Networking functions in the O/S kernel are called by the stub to send the message.  The kernel sends the message(s) to the remote system. This maybe connection-oriented or connectionless.  A server stub unmarshals the arguments from the network message.  The server stub executes a local procedure call.  The procedure completes, returning execution to the server stub.  The server stub marshals the return values into a networkmessage.  The return messages are sent back.  The client stub reads the messages using the network functions.  The message is unmarshalled. And the return values are set on the stack for the local process.
  • 30. STUB
  • 31. BIBLIOGRAPHY  www.geeksforgeeks.org/inter-process-com municationipc/  www.w3schools.in/operating-system-tutori al/interprocess-communicationipc/  microcontrollerslab.com/embedded- operatingsystem/  www.sciencedirect.com/topics/computer-sc ience/embeddedoperating-system  www.slideshare.net