SlideShare a Scribd company logo
1 of 32
Download to read offline
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.
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

Arm programmer's model
Arm programmer's modelArm programmer's model
Arm programmer's modelv Kalairajan
 
Device drivers and interrupt service mechanism
Device drivers and interrupt service mechanismDevice drivers and interrupt service mechanism
Device drivers and interrupt service mechanismVijay Kumar
 
Target hardware debugging
Target hardware debuggingTarget hardware debugging
Target hardware debuggingShriya Shankar
 
Automatic chocolate vending machine using mucos rtos ppt
Automatic chocolate vending machine using mucos rtos pptAutomatic chocolate vending machine using mucos rtos ppt
Automatic chocolate vending machine using mucos rtos pptJOLLUSUDARSHANREDDY
 
IoT Enabling Technologies
IoT Enabling TechnologiesIoT Enabling Technologies
IoT Enabling TechnologiesPrakash Honnur
 
Chapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain SpecificChapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain SpecificMoe Moe Myint
 
Design challenges in embedded systems
Design challenges in embedded systemsDesign challenges in embedded systems
Design challenges in embedded systemsmahalakshmimalini
 
Diversity Techniques in Wireless Communication
Diversity Techniques in Wireless CommunicationDiversity Techniques in Wireless Communication
Diversity Techniques in Wireless CommunicationSahar Foroughi
 
Mac protocols
Mac protocolsMac protocols
Mac protocolsjuno susi
 
ARM Exception and interrupts
ARM Exception and interrupts ARM Exception and interrupts
ARM Exception and interrupts NishmaNJ
 
Ppt 3 - IOT logic design
Ppt   3 - IOT logic designPpt   3 - IOT logic design
Ppt 3 - IOT logic designudhayakumarc1
 
Disassembler and simulators
Disassembler and simulatorsDisassembler and simulators
Disassembler and simulatorsShriya Shankar
 
Wireless routing protocols
Wireless routing protocolsWireless routing protocols
Wireless routing protocolsbarodia_1437
 
EDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLE
EDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLEEDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLE
EDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLESabeel Irshad
 

What's hot (20)

Arm programmer's model
Arm programmer's modelArm programmer's model
Arm programmer's model
 
Device drivers and interrupt service mechanism
Device drivers and interrupt service mechanismDevice drivers and interrupt service mechanism
Device drivers and interrupt service mechanism
 
Target hardware debugging
Target hardware debuggingTarget hardware debugging
Target hardware debugging
 
Automatic chocolate vending machine using mucos rtos ppt
Automatic chocolate vending machine using mucos rtos pptAutomatic chocolate vending machine using mucos rtos ppt
Automatic chocolate vending machine using mucos rtos ppt
 
06. thumb instructions
06. thumb instructions06. thumb instructions
06. thumb instructions
 
IoT Enabling Technologies
IoT Enabling TechnologiesIoT Enabling Technologies
IoT Enabling Technologies
 
Chapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain SpecificChapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain Specific
 
Design challenges in embedded systems
Design challenges in embedded systemsDesign challenges in embedded systems
Design challenges in embedded systems
 
TMS320C5x
TMS320C5xTMS320C5x
TMS320C5x
 
Diversity Techniques in Wireless Communication
Diversity Techniques in Wireless CommunicationDiversity Techniques in Wireless Communication
Diversity Techniques in Wireless Communication
 
Mac protocols
Mac protocolsMac protocols
Mac protocols
 
Gsm radio-interface
Gsm radio-interfaceGsm radio-interface
Gsm radio-interface
 
ARM Exception and interrupts
ARM Exception and interrupts ARM Exception and interrupts
ARM Exception and interrupts
 
Multiplexing
MultiplexingMultiplexing
Multiplexing
 
Ppt 3 - IOT logic design
Ppt   3 - IOT logic designPpt   3 - IOT logic design
Ppt 3 - IOT logic design
 
Lambda design rule
Lambda design ruleLambda design rule
Lambda design rule
 
Disassembler and simulators
Disassembler and simulatorsDisassembler and simulators
Disassembler and simulators
 
Wireless routing protocols
Wireless routing protocolsWireless routing protocols
Wireless routing protocols
 
Line coding
Line codingLine coding
Line coding
 
EDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLE
EDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLEEDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLE
EDLC-EMBEDDED PRODUCT DEVELOPMENT LIFE CYCLE
 

Similar to Task communication

Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2DBU
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptxFamiDan
 
Ch4 OS
Ch4 OSCh4 OS
Ch4 OSC.U
 
Internetworking
InternetworkingInternetworking
InternetworkingRaghu nath
 
CN unit 1 part 2 2023.ppt
CN unit 1 part 2 2023.pptCN unit 1 part 2 2023.ppt
CN unit 1 part 2 2023.pptmohanravi1986
 
Middleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMIMiddleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMIPrajakta Rane
 
Chapter 2B-Communication.ppt
Chapter 2B-Communication.pptChapter 2B-Communication.ppt
Chapter 2B-Communication.pptsirajmohammed35
 
Lec+3-Introduction-to-Distributed-Systems.pdf
Lec+3-Introduction-to-Distributed-Systems.pdfLec+3-Introduction-to-Distributed-Systems.pdf
Lec+3-Introduction-to-Distributed-Systems.pdfsamaghorab
 
Designing Application over mobile environment
Designing Application over mobile environmentDesigning Application over mobile environment
Designing Application over mobile environmentMaulik Patel
 
Process Management.ppt
Process Management.pptProcess Management.ppt
Process Management.pptJeelBhanderi4
 
OSI Model of Networking
OSI Model of NetworkingOSI Model of Networking
OSI Model of NetworkingMukesh Tekwani
 

Similar to Task communication (20)

Chapter 4 communication2
Chapter 4 communication2Chapter 4 communication2
Chapter 4 communication2
 
Chapter 3-Processes.ppt
Chapter 3-Processes.pptChapter 3-Processes.ppt
Chapter 3-Processes.ppt
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptx
 
Ch4 OS
Ch4 OSCh4 OS
Ch4 OS
 
OS_Ch4
OS_Ch4OS_Ch4
OS_Ch4
 
Process
ProcessProcess
Process
 
OSCh4
OSCh4OSCh4
OSCh4
 
Distributed System
Distributed System Distributed System
Distributed System
 
Internetworking
InternetworkingInternetworking
Internetworking
 
OSI MODEL
OSI MODEL OSI MODEL
OSI MODEL
 
CN unit 1 part 2 2023.ppt
CN unit 1 part 2 2023.pptCN unit 1 part 2 2023.ppt
CN unit 1 part 2 2023.ppt
 
Ch03
Ch03Ch03
Ch03
 
Chapter 3 - Processes
Chapter 3 - ProcessesChapter 3 - Processes
Chapter 3 - Processes
 
Middleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMIMiddleware in Distributed System-RPC,RMI
Middleware in Distributed System-RPC,RMI
 
Chapter 2B-Communication.ppt
Chapter 2B-Communication.pptChapter 2B-Communication.ppt
Chapter 2B-Communication.ppt
 
Lec+3-Introduction-to-Distributed-Systems.pdf
Lec+3-Introduction-to-Distributed-Systems.pdfLec+3-Introduction-to-Distributed-Systems.pdf
Lec+3-Introduction-to-Distributed-Systems.pdf
 
Designing Application over mobile environment
Designing Application over mobile environmentDesigning Application over mobile environment
Designing Application over mobile environment
 
Osi model
Osi modelOsi model
Osi model
 
Process Management.ppt
Process Management.pptProcess Management.ppt
Process Management.ppt
 
OSI Model of Networking
OSI Model of NetworkingOSI Model of Networking
OSI Model of Networking
 

Recently uploaded

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 

Recently uploaded (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 

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.
  • 27.
  • 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