INTER PROCESS COMMUNICATION: Process
communicates with each other is called IPC. Process frequently needs to
communicate, for instance in a shell pipeline, the output of the first process
need to pass to the second one and so on to the other process. It is even
possible for the two processes to be running on different machines.
REQUESTING SYSTEM SERVICE: There are
two ways by which a program executing in the user mode can request the kernel
services:
1. System call 2. Message
passing
OS are designed with one of the two
but not both. First assume that the user process wishes to invoke a particular target
system function. For the system call approach, the user process uses the TRAP
instruction. The idea is that the system call should appear to be an ordinary
procedure call to the application program; the OS provide the library of user
functions with names corresponding to each actual system call. Each of these
function contains the TRAP instruction, which switches the CPU to kernel mode
and then branches to the entry point of the function which is to be invoked.
When the function completes, it switches the processor to user mode and then
returns control to the user process.
No comments:
Post a Comment