EmbLogic's Blog

Category Archives: Linux Internals and System Programming

How to Send a signal -Using Kill command

Send a signal by Kill command ======================= – To send a signal to a process other than current task. – It has prototype :- int kill(pid_t pid, int signo); – It is included using header :- #include<signal.h> – The system … Continue reading

Posted in Linux Internals and System Programming, Project 03: Client Server Communication using Linux and IPC | Tagged , , , , , , , , | Leave a comment

How to register a signal

Register a signal ================== – Program can handle a signal using signal library function signal(). – signal() is used to register the signal handler function with kernel on behalf of current process. – It is included in header :- #include<header.h> … Continue reading

Posted in Linux Internals and System Programming, Project 03: Client Server Communication using Linux and IPC | Tagged , , , , , , , | Leave a comment

About Signals

Signals ======== – A signal is an event generated by UNIX/LINUX system in response to some condition. – On receipt of a signal, process may in turn take some action. – Signals are generated by some error conditions such as:- … Continue reading

Posted in Linux Internals and System Programming, Project 03: Client Server Communication using Linux and IPC | Tagged , , , , | Leave a comment

Replacing a Process Image

Replacing a Process Image ========================= – The exec function replaces current process with a new process. – The path of new process is specified as argument to exec. – It is defined in header : #include<unistd.h> – Last argument of … Continue reading

Posted in Linux Internals and System Programming, Project 03: Client Server Communication using Linux and IPC | Tagged , , , , , , , | Leave a comment

Orphan Process

Orphan Process =============== If in a process, the parent process is terminated before the child process, the child process become orphan – It takes the lowest possible process as its parent – And its PPID is changed to the PID … Continue reading

Posted in Linux Internals and System Programming, Project 03: Client Server Communication using Linux and IPC | Tagged , , , , , | Leave a comment

Zombie or Defunct Process

Zombie or Defunct Process ========================== If a child proces tries to teminate,its association with parent remains until the parent terminates normally or calls wait. – The child process entry in process table is therfore not freed up immediately. – Althougth … Continue reading

Posted in Linux Internals and System Programming, Project 03: Client Server Communication using Linux and IPC | Tagged , , , , , , | Leave a comment

waiting for a process

Waiting For a Process ===================== – Sometime we would like to find out when a child process has finished. – It is needed for parent process to wait until the child finishes before continuing by calling wait. – It has … Continue reading

Posted in Linux Internals and System Programming, Project 03: Client Server Communication using Linux and IPC | Tagged , , , , , | Leave a comment

Process Duplication using fork

Process Duplication using system call fork ============================== – A new process is created using fork(). – fork() is a system call. – fork duplicates the current process. – It creates a new entry in the process table with many of … Continue reading

Posted in Linux Internals and System Programming, Project 03: Client Server Communication using Linux and IPC | Tagged , , , , | Leave a comment

THE LINUX FIRE WALL

  If we talk about firewall the first thing that comes to our mind is a software “Barrier” between a system and a network it may be either internal or external. The purpose of this software is to protect our … Continue reading

Posted in Linux Internals and System Programming, Project 00: Linux System / Network Administration | Leave a comment

Inter process communication using pipe successfully done.

RCS file: header.h,v Working file: header.h head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: This is header file include stdio.h stdlib.h sys/types.h unistd.h —————————- revision 1.2 locked … Continue reading

Posted in Linux Internals and System Programming | Leave a comment

inter process communication using file successfully done.

RCS file: header.h,v Working file: header.h head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: Header file —————————- revision 1.2 locked by: root; date: 2015/02/26 14:25:18; author: root; … Continue reading

Posted in Linux Internals and System Programming | Leave a comment

CREATING STATIC LIBRARY

Static libraries are collection of ordinary object files. For a static library, the actual code is extracted from the library by the linker and used to build the final executable at the point you compile/build your application. Steps: 1.Creates .c … Continue reading

Posted in Linux Internals and System Programming, Uncategorized | Leave a comment

an overview of how the system call in linux works

0) There is global system_call_table which has offsets of every system call provided by the kernel (system call is just some function inside kernel). The global means every process share the same system_call_table 1) User software prepares arguments of the … Continue reading

Posted in Linux Internals and System Programming | Leave a comment

Kernel Space and User Space Understanding of Kernel space and User space in detail is very important if you wish to have a strong base of Linux Kernel. Here Kernel Space and User Space corresponds to their Virtual address space. … Continue reading

Posted in Linux Internals and System Programming | Leave a comment

memory management concept

Memory Management The memory management subsystem is one of the most important parts of the operating system. Since the early days of computing, there has been a need for more memory than exists physically in a system. Strategies have been … Continue reading

Posted in Linux Internals and System Programming | Leave a comment