0% found this document useful (0 votes)
69 views

Processes: Bilkent University Department of Computer Engineering CS342 Operating Systems

The document outlines a chapter on processes from an operating systems textbook, including an introduction to process concepts like process states, scheduling, and context switching, as well as inter-process communication and examples of client-server systems.

Uploaded by

Muhammed Naci
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views

Processes: Bilkent University Department of Computer Engineering CS342 Operating Systems

The document outlines a chapter on processes from an operating systems textbook, including an introduction to process concepts like process states, scheduling, and context switching, as well as inter-process communication and examples of client-server systems.

Uploaded by

Muhammed Naci
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 79

Bilkent University

Department of Computer Engineering


CS342 Operating Systems

Chapter 3
Processes
Last Update: Sep 30, 2020

1
Outline

OUTLINE
• Process Concept
• Process Scheduling
• Operations on Processes
– Creating processes
• Inter-process Communication
• Examples of IPC Systems
• Communication in Client-Server Systems

2
Process Concept and Process Management

3
Process Concept

• Process: a program in execution; process execution must progress in


sequential fashion
• A process includes:
• text – code – section (program counter – PC)
• stack section (stack pointer)
• data section
• set of open files currently used
• set of I/O devices currently used
• An operating system executes a variety of programs:
• Batch systems: jobs
• Time-shared systems: user programs or tasks
– We will use the terms job and process almost interchangeably.

4
Process: program in execution

• If we have a single program running in the system, then the task of OS is


easy:
– load the program, start it, and program runs in CPU
– (from time to time it calls OS to get some service done)

• But if we want to start several processes, then the running program in CPU
(current process) has to be stopped for a while and other program (process)
has to run in CPU.
– Process management becomes an important issue
– To do process switch, we have to save the state/context (register values)
of the CPU which belongs to the stopped program, so that later the
stopped program can be re-started again as if nothing has happened.
• Keep track of process progress

5
Process: program in execution

CPU

SP
registers

(Physical)
(Physical)
PSW Main
Main
PC Memory
Memory
(RAM)
(RAM)
IR

CPU state
of the process
(CPU context) process address space

(currently used portion of the address space


must be in memory)
6
Multiple Processes
one program counter

Process processes
Three program counters
A

Process C
B Process
Process Process B
A C
B
Process A
C
time
Conceptual model
what is of three different one process
happening processes executing at
physically a time

7
Process in Memory

Stack segment
(holds the called function parameters,
local variables, return values)

Storage for dynamically created


variables

Data segment
(includes global
variables, arrays, etc., you use)

Text segment
A process needs this memory (code segment)
content to run (instructions are here)
(called address space; memory image)

8
Process Address Space

• A process can only access its address space

• Each process has its own address space

• Kernel can access everything

9
Process State

• As a process executes, it changes state


– new: The process is being created
– running: Instructions are being executed
– waiting: The process is waiting for some event to occur
– ready: The process is waiting to be assigned to a processor
– terminated: The process has finished execution

In a single-CPU system, only one process may be in running state; many


processes may be in ready and waiting states.

10
Diagram of Process State

11
Process Control Block
Process 1 Process 2 Process 3 Process N

address space
stack stack stack stack

process
data data data data
text text text text

PCB PCB PCB PCB


1 2 3 N
Kernel Memory
Kernel maintains a PCB for each process.
They can be linked together in various queues.
12
Process Control Block

Information associated with each process • I/O status information


• Process state (ready, running, waiting, – List of I/O devices allocated to the
etc) process,
• Program counter (PC) • Process ID (pid)
• CPU registers • Parent process
• CPU scheduling information • Child processes
– Priority of the process, etc. • File management info
• Memory-management information – Root directory
– text/data/stack section pointers, – Working directory
sizes, etc. – a list of open files, etc.
– pointer to page table, etc. – UID
• Accounting information – GID
– CPU usage, clock time so far, …

13
Process Representation in Linux

In Linux kernel source tree, the file include/linux/sched.h contains


the definition of the structure task_struct,which is the PCB for a process.

struct task_struct {
long state; /* state of the process */
….
pid_t pid; /* identifier of the process */

unisigned int time_slice; /* scheduling info */

struct files_struct *files; /* info about open files */
….
struct mm_struct *mm; /* info about the address space of this process */

}

14
CPU Switch from Process to Process

15
Example: Processes in Linux

• Use ps command to see the currently started processes in the system


• Use ps aux to get more detailed information
• See the manual page of the ps to get help about the ps:
– Type: man ps
• The man command gives info about a command, program, library function,
or system call.

• The /proc file system in Linux is the kernel interface to users to look to the
kernel state (variables, structures, etc.).
– Many subfolders
– One subfolder per process (name of subfolder == pid of process)

16
Process Queues and Scheduling

17
Process Scheduling

• In a multiprogramming or time-sharing system, there may be multiple


processes ready to execute.

• We need to select one them and give the CPU to that.


– This is scheduling (decision).
– There are various criteria that can be used in the scheduling decision.

• The scheduling mechanism (dispatcher) than assigns the selected process to


the CPU and starts execution of it.

Select Dispatch
(Scheduling Algorithm) (mechanism)

18
Scheduling

• Ready queue is one of the many queues that Process/CPU scheduling

a process may be added


• CPU scheduling schedules from ready
CPU
queue.
• Other queues possible:
– Job queue – set of all processes started Ready
in the system waiting for memory queue Device
– Device queues – set of processes queue
Device
waiting for an I/O device
• A process will wait in such a queue Memory
Device
until I/O is finished or until the queue
waited event happens. Device
• Processes migrate among the various queues

Job queue

19
Ready Queue and Various I/O Device Queues

20
Representation of Process Scheduling

CPU Scheduler

ready queue

I/O queue

21
Schedulers

• Long-term scheduler (or job scheduler) – selects which processes should be


brought into the ready queue
• Short-term scheduler (or CPU scheduler) – selects which process should be
executed next and allocates CPU

Short-term
scheduler
CPU
ready queue

Long-term Main Memory


scheduler

job queue
22
Schedulers

• Short-term scheduler is invoked very frequently (milliseconds)  (must be


fast)
• Long-term scheduler is invoked very infrequently (seconds, minutes) 
(may be slow)
• The long-term scheduler controls the degree of multiprogramming
– i.e. number of processes in memory
– Can also control kind of processes in memory!

• What kind of processes will be in memory?


– A good mix of IO bound and CPU bound processes

23
Addition of Medium Term Scheduling

Medium term Medium term


scheduler scheduler
Short term
Scheduler
(CPU Scheduler)

24
Process Behavior

• Processes can be described as either:


– I/O-bound process – spends more time doing I/O than computations,
many short CPU bursts
– CPU-bound process – spends more time doing computations; few very
long CPU bursts
• CPU burst: the execution of the program in CPU between two I/O
requests (i.e., time period during which the process wants to
continuously run in the CPU without making I/O)
– We may have a short or long CPU burst.

I/O bound CPU bound

waiting waiting

25
Context Switch

• When CPU switches to another process, the system must save the state of the
old process and load the saved state for the new process via a context switch

• Context of a process represented in the PCB

• Context-switch time is overhead; the system does no useful work while


switching

• Time dependent on hardware support

26
Process Creation and Termination

27
Process Creation

• Parent process create children processes, which, in turn create other


processes, forming a tree of processes
• Generally, process identified and managed via a process identifier (pid)

• Resource sharing alternatives:


Process
– Parent and children share all resources
– Children share subset of parent’s resources
– Parent and child share no resources
Process Process
• Execution alternatives:
– Parent and children execute concurrently
– Parent waits until children terminate
Process Process Process

28
Process Creation (Cont)

• Child’s address space?


Parent Child
1)
Child has a new address space. AS AS
Child’s address space can contain:
– 1) the copy of the parent (at creation)
– 2) has a new program loaded into it
Parent Child
2)
AS AS

• UNIX examples
– fork system call creates new process
– exec system call used after a fork to replace the process’ memory space
with a new program
29
C Program Forking Separate Process in Linux
int main()
{ Parent
pid_t n; // stores process id pid=x
n=?
n = fork(); before fork() executed
if (n < 0) {
fprintf(stderr, "Fork Failed");
exit(-1);
} Parent Child pid=y
else if (n == 0) { /* child process*/ pid=x
n=y n=0
execlp("/bin/ls", "ls", NULL);
}
else { /* parent process */ after fork() executed

wait (NULL);
printf ("Child Complete");
exit(0); Parent
} pid=x n=y Child pid=y
}
after execlp() executed
30
Execution Trace: fork()

Process-Parent Process-Child
stack n y stack n 0
PC
data data
…. ….
text n=fork(); text n=fork();
If (n == 0) If (n == 0)
.. ..
else if (n>0) else if (n>0)
CPU ... ...

PC PC
x pid y pid
PCB-Parent PCB-Child
sys_fork()
Kernel {….}
RAM
31
Execution Trace: fork() with execlp()

Process-Parent Process-Child
stack n y stack n 0
PC
data data
…. ….
text n=fork(); text n=fork();
If (n == 0) If (n == 0)
new code
…exec() …exec()
else if (n>0) else if (n>0)
CPU ... ...

PC PC
x pid y pid
PCB-Parent PCB-Child
sys_fork() sys_execve()
Kernel {….} {….}
RAM
32
Family of exec() Functions in Unix
Program A Program B
… …
Your Programs execlp(…); execv(…); …..
… …

user
execl(...) execlp(...) execle(...) execv(...) execvp(...) execve(...) mode
C Library {…} {…} {…} {…} {…} {…}

sys_execve(…)
{ kernel
Kernel … mode
}

33
Examples

What is the following pseudocode doing?

main()
pid_t n=0; What is the following pseudocode doing?

for (i=0; i<10; ++i) { main()


n = fork(); pid_t n=0;
if (n==0) {
print (“hello”); for (i=0; i<2; ++i) {
exit (0); print (i);
} n = fork();
} print (“hello”);
}
for (i=0; i<10; ++i) }
wait();
} 34
Examples

What is the following pseudocode doing?

main()
pid_t x,y;

x = fork();
if (x==0) {
y = fork();
if (y==0) {
print (“hello”);
}
}
}

35
Examples
What is the following pseudocode doing?

main() {
int x,y;

x = fork();
if (x==0) {
y = fork();
if (y==0) {
print (“hello”);
exit(0);
}
exit(0);
}
waitpid (x);
}
36
A tree of processes on a typical Solaris

the shell that


a remote user is using

your local shell

your started programs

37
Process Termination

• Process executes last statement and asks the operating system to delete it (can
use exit system call)
– Output data from child to parent (via wait)
– Process’ resources are deallocated by operating system

• Parent may terminate execution of children processes (abort)


– Child has exceeded allocated resources
– Task assigned to child is no longer required
– If parent is exiting
• Some operating systems do not allow child to continue if its parent
terminates
– All children terminated - cascading termination

38
Process Termination

Parent Child

fork();
….
….
….
….
….
x = wait ();
exit (code);

PCB of parent PCB of child

sys_wait() sys_exit(..)
{ {
…return(..) …
Kernel } }

39
Inter-process Communication (IPC)

40
Cooperating Processes and the need for
Interprocess Communication
• Processes within a system may be independent or cooperating
– Independent process cannot affect or be affected by the execution of
another process
– Cooperating process can affect or be affected by the execution of
another process
Application

• Reasons for process cooperation


– Information sharing
Process Process Process
– Computation speed-up
– Modularity (application will
be divided into modules/sub-tasks)
– Convenience (may be better to cooperating process
work with multiple processes)
The overall application is designed
to consist of cooperating processes

41
IPC Mechanisms

• Cooperating processes require a facility/mechanism for inter-process


communication (IPC)

• There are two basic IPC models provided by most systems:

1) Shared memory model


processes use a shared memory to exchange data

2) Message passing model


processes send messages to each other through the kernel

42
Communication Models

message passing approach shared memory approach

43
Shared Memory IPC Mechanism

• A region of shared memory is


established between (among) two or
more processes. Process A
– via the help of the operating
system kernel (i.e. system calls). shared region

• Processes can read and write shared


memory region (segment) directly as Process B
ordinary memory access (pointer
access)
– During this time, kernel is not
involved.
– Hence it is fast Kernel

44
Access via pointers

char *cptr;
char c;

cptr = …open/attach shared memory region…

/* cptr points to the beginning of shared memory,


which can be considered as a sequence of bytes / characters
*/

cptr[0] = ‘A’ // write a value into byte 0 of shared memory


cptr[1] = ‘B’; // write a value into byte 1 …

c = cptr [5]; // read value at byte 5 of shared memory

// we can also read / write integers and structures


// all via pointer operations of C
45
Shared Memory IPC Mechanism

• To illustrate use of an IPC mechanism, a general model problem, called


producer-consumer problem, can be used. A lot of problems look like this.
– We have a producer, a consumer, and data is sent from producer to
consumer.
• unbounded-buffer places no practical limit on the size of the buffer
• bounded-buffer assumes that there is a fixed buffer size

Buffer
Producer Produced Items Consumer
Process Process

We can solve this problem via shared memory IPC mechanism


46
Bounded-Buffer – Shared-Memory Solution

// Shared data
#define BUFFER_SIZE 10
typedef struct {
...
} item;

item buffer[BUFFER_SIZE];
int in = 0; // next free position
int out = 0; // first full position

Solution is correct, but can only use BUFFER_SIZE-1 elements

47
Buffer State in Shared Memory

item buffer[BUFFER_SIZE]

Producer Consumer

int out;
int in;

Shared Memory

48
Buffer State in Shared Memory

Buffer Full

in out
((in+1) % BUFFER_SIZE == out) : considered full buffer

Buffer Empty

in out

in == out : empty buffer


49
Bounded-Buffer – Producer and Consumer
Code
while (true) { Producer
// produce an item
while ( ((in + 1) % BUFFER SIZE) == out)
; // do nothing -- no free buffers
buffer[in] = item;
in = (in + 1) % BUFFER SIZE;
while (true) { Consumer
}
while (in == out)
; // do nothing -- nothing Consumer
to consume

buffer (an array) // remove an item from the buffer


in, out integer variable item = buffer[out];
out = (out + 1) % BUFFER SIZE;
Shared Memory return item;
}

50
Message Passing IPC Mechanism

• Another mechanism for processes to communicate and to synchronize their


actions
• With message passing system, processes communicate with each other
without resorting to shared variables

• This IPC facility provides two operations: messages


passed
– send(message) – message size fixed or variable through
– receive(message)
P Q
• If P and Q wish to communicate, they need to:
– establish a (logical) communication link Logical
Communication
between them Link
– exchange messages via send/receive

51
Implementation in a system

• The
Howmessaging
are links established?
passing facility can be implemented in various ways.
– Explicitly by the process? Or implicitly by the kernel?
• Can
That ameans
link bethe
associated
facility may
withhave
moredifferent
than twofeatures
processes?
depending on the system
• How many links can be there between a pair of communicating processes?
• What is the capacity of a link?
• Is the size of a message that the link can accommodate fixed or variable?
• Is a link unidirectional or bi-directional?

52
Naming: Identifying the receiver
• Naming (how do we identify the receiver)
– Direct naming and communication
• Receiver and sender process explicitly specified
– send (P, message) – send a message to process P
– receive(Q, message) – receive a message from process Q

– Indirect naming and communication


• Messages are directed and received from mailboxes (also
referred to as ports) Process
Process
– send (mqid, message)
– receive (mqid, message)
send() receive()
Mailbox (mqid)
{.. {…
{ }
Kernel
53
Synchronization

• How does the sender/receiver behave if it can not send/receive the message
immediately
– Depends whether Blocking or Non-Blocking communication is used

• Blocking is considered synchronous


– Sender blocks until receiver or kernel receives
– Receiver blocks until message available
• Non-blocking is considered asynchronous
– Sender sends the message really or tries later, but always returns
immediately and can do something
– Receiver receives a valid message or null, but always returns immediately
and can do something

54
Buffering

• Exact behavior depends also on the Available Buffer

• Buffer: Queue of messages attached to the link. Implemented in one of three


ways
1. Zero capacity – 0 messages
Sender must wait for receiver (rendezvous)
2. Bounded capacity – finite length of n messages
Sender must wait if link full
3. Unbounded capacity – infinite length
Sender never waits

55
Synchronization
Sender Receiver

Kernel
Buffer

Zero Buffer Some Buffer

Blocking Send Wait until receiver Wait until kernel


receives receives (if buffer has
space no wait)
What if there
Blocking Receive Wait until sender has a Wait until kernel has a
message message (if buffer has would be an
message no wait) infinite buffer?
Nonblocking Send Return with receiver Return with kernel
received the message received the message
or error or error

Nonblocking Receive Return with a message Return with a message


or none or none

56
Example IPC: POSIX message queues
POSIX (Portable Operating System Interface) is the standard API for Unix-like systems.

shareddefs.h

struct item {
int id;
char astr[64];
};

#define MQNAME "/justaname"

--- We have a producer, a consumer process.


--- Producer sends messages to the consumer.
--- In the following example, run the consumer first.
57
#include <stdlib.h>
#include <mqueue.h>
#include <stdio.h>
#include <unistd.h> producer.c
#include <errno.h>
#include <string.h>

#include "shareddefs.h"

int main()
{
mqd_t mq; struct item item; int n;

mq = mq_open(MQNAME, O_RDWR);
if (mq == -1) { perror("mq_open failed\n"); exit(1); }
int i = 0;
while (1) {
item.id = i;
strcpy(item.astr, "os is good\n");
n = mq_send(mq, (char *) &item, sizeof(struct item), 0);
if (n == -1) {perror("mq_send failed\n"); exit(1); }
i++;
sleep(1);
}
mq_close(mq);
return 0;
}

58
#include <stdlib.h>
#include <mqueue.h>
#include <stdio.h> consumer.c
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include "shareddefs.h”
int main()
{ mqd_t mq; struct mq_attr mq_attr;
struct item *itemptr;
int n, buflen; char *bufptr;

mq = mq_open(MQNAME, O_RDWR | O_CREAT, 0666, NULL);


if (mq == -1) { perror("can not create msg queue\n"); exit(1); }
mq_getattr(mq, &mq_attr);
printf("mq maximum msgsize = %d\n", (int) mq_attr.mq_msgsize);
/* allocate large enough space for the buffer */
buflen = mq_attr.mq_msgsize;
bufptr = (char *) malloc(buflen);
while (1) {
n = mq_receive(mq, (char *) bufptr, buflen, NULL);
if (n == -1) { perror("mq_receive failed\n"); exit(1); }
printf("mq_receive success, message size=%d\n", n);
itemptr = (struct item *) bufptr;
printf("item->id = %d\n", itemptr->id);
printf("item->astr = %s\n", itemptr->astr); printf("\n");
}
free(bufptr);
mq_close(mq);
return 0;
} 59
Makefile
all: producer consumer

consumer: consumer.c
gcc -Wall -o consumer consumer.c -lrt

producer: producer.c
gcc -Wall -o producer producer.c -lrt

clean:
rm -fr *~ producer consumer
korpe@ubuntu:~/x$ ls

60
Example IPC: POSIX shared memory

• The following functions are defined to create and manage shared memory in
POSIX API
• shm_open():
– create or open a shared memory region/segment (also called
shared memory object)
• shm_unlink():
– remove the shared memory object
• ftruncate():
– set the size of shared memory region
• mmap():
– map the shared memory into the address space of the process.
With this, a process gets a pointer to the shared memory region
and can use that pointer to access the shared memory.

61
Example IPC: POSIX shared memory

• The following functions are defined to create and manage shared memory in
POSIX API
• shm_open():
– create or open a shared memory region/segment (also called
shared memory object)
• shm_unlink():
– remove the shared memory object
• ftruncate():
– set the size of shared memory region
• mmap():
– map the shared memory into the address space of the process.
With this, a process gets a pointer to the shared memory region
and can use that pointer to access the shared memory.

62
producer
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h> In this example, run the producer first.
#include <sys/shm.h>
#include <sys/stat.h>
#include <sys/mman.h>

int main()
{
const int SIZE = 4096; const char *name = "OS";
const char *message0= "Studying "; const char *message1= "Operating Systems ";
const char *message2= "Is Fun!";
int shm_fd; void *ptr;

shm_fd = shm_open(name, O_CREAT | O_RDWR, 0666);


ftruncate(shm_fd,SIZE);

ptr = mmap(0,SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, shm_fd, 0);


if (ptr == MAP_FAILED) { printf("Map failed\n"); return -1; }

sprintf(ptr,"%s",message0);
ptr += strlen(message0);
sprintf(ptr,"%s",message1);
ptr += strlen(message1);
sprintf(ptr,"%s",message2);
ptr += strlen(message2);

return 0;
}

63
consumer

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <sys/mman.h>

int main()
{
const char *name = "OS";
const int SIZE = 4096;
int shm_fd;
void *ptr; int

shm_fd = shm_open(name, O_RDONLY, 0666);


if (shm_fd == -1) { printf("shared memory failed\n"); exit(-1); }

ptr = mmap(0,SIZE, PROT_READ, MAP_SHARED, shm_fd, 0);


if (ptr == MAP_FAILED) {printf("Map failed\n"); exit(-1); }

printf("%s",ptr);

if (shm_unlink(name) == -1) {printf("Error removing %s\n",name); exit(-1);


}
}

64
Other IPC methods:
pipes
• Unix/Linux Pipes:
– A pipe enables one-way communication
between a parent and child and vice versa
– It is easy to use.
– When process terminates, pipe is removed
automatically
– pipe() system call

P C

pipe

65
#include <stdio.h> Parent is sending to Child
#include <unistd.h>
#include <sys/types.h>
#include <string.h>

#define BUFFER_SIZE 25 C P
#define READ_END 0
#define WRITE_END 1
0(R) 1(W)
int main(void)
{
char write_msg[BUFFER_SIZE] = "Greetings";
char read_msg[BUFFER_SIZE]; pid_t pid;
int fd[2]; // an array of 2 integers fd[0] and fd[1]

if (pipe(fd) == -1) { fprintf(stderr,"Pipe failed"); return 1;}

pid = fork();
if (pid < 0) { fprintf(stderr, "Fork failed"); return 1; }

if (pid > 0) {
close(fd[READ_END]); //close read end (index 0) - it is unused here
write(fd[WRITE_END], write_msg, strlen(write_msg)+1);
close(fd[WRITE_END]);
}
else { /* child process */
close(fd[WRITE_END]); //close write end (index 1) - it is unused here
read(fd[READ_END], read_msg, BUFFER_SIZE);
printf("child read %s\n",read_msg);
close(fd[READ_END]);
}
return 0;
} 66
Other IPC methods:
named-pipes (FIFOs)
– A named-pipe is called FIFO.
• It has a name (a filename)
• Call mkfifo() to create
– When processes terminate, it is not removed automatically
– No need for parent-child relationship
– Bidirectional
– Any two processes can create and use named pipes.

P1 P2

a_filename
named pipe

67
Communication Through Network:
Client-Server Communication

68
Communications in Client-Server Systems

• Sockets
• Remote Procedure Calls
• Remote Method Invocation (Java)

69
Sockets

• A socket is defined as an endpoint for communication


• Concatenation of IP address and port
• The socket 161.25.19.8:1625 refers to port 1625 on host 161.25.19.8
• Communication happens between a pair of sockets
• A communication can be identified as a pair of sockets
– (IP1, Port1, IP2, Port2)
P – Bidirectional communication Q

Network
M1 M2
70
Socket Communication

71
Sockets

• Two types
– TCP (STREAM)
– UDP
• A socket is bound to an address and port.

• A network application
– Two parts
• Usually a server and a client

72
TCP Server and Client

• Create a socket cs and put to listening mode

• cConnect
= Accept (c,(s)
s_address_port)
• Read(c)
Read (c)and
andWrite(c)
Write (c)
• Close(c)
Close (c)

You will learn Socket programming in detail in Computer Networks course.

73
Remote Procedure Calls

• Remote procedure call (RPC) abstracts procedure calls between processes on


networked systems
• Stubs – client-side proxy for the actual procedure on the server
• The client-side stub locates the server and marshalls the parameters into a
message and sends a message to the server
• The server-side stub receives this message, unpacks the marshalled
parameters, and performs (executes) the procedure on the server
• The return value is put into a reply message and sent back to the client-side

74
Execution of RPC

75
Remote Method Invocation

• Remote Method Invocation (RMI) is a Java mechanism similar to RPCs


• RMI allows a Java program on one machine to invoke a method on a remote
object

76
Marshalling Parameters

77
References

• 1. Operating System Concepts, 9th edition, Silberschatz et al. Wiley.


• 2. Modern Operating Systems, Andrew S. Tanenbaum, 3rd edition, 2009.
• 3. The slides here are adapted/modified from the textbook and its slides:
Operating System Concepts, Silberschatz et al., 7, 8, 9th editions, Wiley.

78
Additional Study Material

79

You might also like