EmbLogic's Blog

Author Archives: deepanshuemblinux

Call Stack

Programs written in the procedural style (as opposed to object-oriented style) are organized as a logical hierarchy of subroutine calls. In general, each subroutine call involves passing arguments from the caller to the callee. In addition, the callee may declare … Continue reading

Posted in Data Structures with C | Leave a comment

How to install grub on a floppy disk or a partition?

  When you are working on an already installed linux distribution, the grub package will be bydefault installed on the system. I will be showing you, the example’s of working with grub-legacy. Because any grub version number thats in the … Continue reading

Posted in Project 00: Linux System / Network Administration | Leave a comment

difference between monolithic and microlithic kernel

Monolithic Kernel (Macro Kernel): Kernel Image = (Kernel Core+Kernel Services). When system boots up entire services  are loaded and resides in memory. Example: Windows and Unix.   Micro kernel : Kernel Image = Kernel Core. Services are build in to … Continue reading

Posted in Project 00: Linux System / Network Administration | Leave a comment

check this code out on function pointers

Posted in Data Structures with C | Leave a comment

code to pass more than one number of variables into a thread by parent thread

Posted in Project 04: FTP based Client Server using Threads and Sockets | Leave a comment

Structure Member Alignment and structure Padding

What do we mean by data alignment, structure packing and padding? Predict the output of following program. #include <stdio.h> // Alignment requirements // (typical 32 bit machine) // char         1 byte // short int    2 … Continue reading

Posted in Data Structures with C | Leave a comment

foreground and background processes

Background Process Unlike with a foreground process, the shell does not have to wait for a background process to end before it can run more processes. Within the limit of the amount of memory available, you can enter many background … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

Phony Targets, Macros and Special Characters in MAKEFILES

Sometimes a target does not mean a file but it might represent an action to be performed. When a target  is not related to a file it is called phony target. For instance: getobj: mv obj/*.o . 2>/dev/null getobj target move … Continue reading

Posted in Data Structures with C | Leave a comment

what does a makefile contain??

A make file consists of a set of targets, dependencies and rules. A target most of time is a file to be created/updated. target depends upon a set of source files or even others targets described in Dependency List. Rules … Continue reading

Posted in Data Structures with C | Leave a comment

Process States

  Linux processes generally go through six major states, which are listed below: 1. Running or Runnable ( R ) – A running state has a broader concept here. Running always does not mean utilising the CPU. Even while a … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

points to remember about ‘extern’ in C

1. Declaration can be done any number of times but definition only once. 2. “extern” keyword is used to extend the visibility of variables/functions(). 3. Since functions are visible through out the program by default. The use of extern is … Continue reading

Posted in Data Structures with C | 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

ZOMBIE PROCESSES

What is a Zombie Process ? It’s a pretty much common question asked in most of the interviews related to Linux, and most of the time people got it confused with Orphan Process. But these two are totally different from … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

                What are  processes and threads?? A process is a program (object code stored on some media) in execution.  Processes are, however, more than just the executing program code (often called the text … Continue reading

Posted in Project 6: Client Server using Inter Process Communication Mechanism | 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