0% found this document useful (0 votes)
42 views36 pages

IPC Mechanism, Kernel-Application Communication

The document discusses the components of a Linux system including the boot loader, kernel modules, and applications. It describes how applications are linked with the kernel and compiled into a single image. It also covers various inter-process communication (IPC) mechanisms used by applications to communicate with the kernel like pipes, sockets, shared memory, FIFOs, semaphores, and signals. Process vs threads and task state transition diagrams are also included.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views36 pages

IPC Mechanism, Kernel-Application Communication

The document discusses the components of a Linux system including the boot loader, kernel modules, and applications. It describes how applications are linked with the kernel and compiled into a single image. It also covers various inter-process communication (IPC) mechanisms used by applications to communicate with the kernel like pipes, sockets, shared memory, FIFOs, semaphores, and signals. Process vs threads and task state transition diagrams are also included.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 36

IPC Mechanism, Kernel-Application Communication

Feb 2012
What constitutes a Linux system?

Boot code
Initializes the system
Loads the operational code into memory
From ROM, network etc.
Kernel modules
A huge number of .o files
Process subsystem, file subsystem, device drivers etc.
Applications
Specific applications (networking, multimedia, GUI)
Standard applications: ls, rm, cp, telnet, ftp etc.
Zipped together in a single file
Linked with the kernel module

Proprietary and Confidential


Linux Architecture

Proprietary and Confidential 3


Boot Loader

Resides in ROM
Downloads the operating system into
the system memory
Can download over UART or Ethernet
Can flash the OS and boot from flash
Contains initialization routines,
drivers, file systems, network stack
Can load a new version into flash
Can boot the system from a remote
host using ftp over network

Proprietary and Confidential


Kernel(Operating System)

Modules that form the kernel


Architecture specific code
File system
Process subsystem
Memory management
Networking
Drivers
Sources compiled into a number
of .o files
All linked together along with the applications to form the final image

Proprietary and Confidential


Application

Applications cross compiled with


target specific libraries

All applications in individual


executables stored in the standard
Unix file system

The file system goes on the system


as ROM/RAMFS

Proprietary and Confidential


Linking apps with the kernel

How are applications linked with the kernels?

Applications are cross compiled and executables are stored in a


Unix-like directory structure
The application directory structure converted into a single file
(similar to tar)
The single file is converted into an object file (similar to a C
array)
The object file is linked with the rest of the kernel object files
to form the final image

Proprietary and Confidential


Process vs Thread

Process
Process is Program under execution
Representation of a Program in memory.
An application in action, a file with life .

Thread
Thread is an entity within a process.
Allows virtually parallel execution of different
sections of a program.

Proprietary and Confidential


IPC Mechanism

Pipes

Sockets

Shared memory

FIFOs

Semaphores

signals.

Proprietary and Confidential


Signals

Widely used in Unix systems.


Signals are predefined numerical constants, e.g. KILL, STOP,
etc., which are sent to a process by a user
These signals are received by signal handlers, simple
procedures, which belong to each process.
This system is fast, but the problem is, that the signals have
to be predefined numbers.
Existing signals cannot be changed, because then, processes
would react a different way than expected.

Proprietary and Confidential


Sockets

A process binds itself to one socket (or more), and "listens" to it, i.e.
from then on, it can receive messages from other processes.
Most of the sockets are full duplex
The owner of a socket, i.e. the process which is bind to a socket, is
also called server, while the other processes are called clients.
Because messages sent through sockets, they are not limited to
numerical values, the information could be more than just control
signals.

Proprietary and Confidential


Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential
Reference links

http://tldp.org/LDP/tlk/ipc/ipc.html

Proprietary and Confidential


Proprietary and Confidential
Task State Transition Diagram

Proprietary and Confidential


Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential
Proprietary and Confidential

You might also like