Tag: Linux

Linux – Inside the Build Process

The Executable and Linking Format (ELF) is the file format standard for executables, objects, shared libraries and core dumps in Linux/Unix. The newest debug information format, compatible with ELF, is DWARF 5 If you are not writing a new compiler or debugger it is not necessary to understand every bit on those formats but there are […]

Read more

Linux – Handling Signals in a Multithreaded Application

Signals are very useful feature in linux to send notification from one process to another and from the kernel to the process. Signals are sent in some error cases (accessing wrong memory address, bus error, floating point error, …) and also to inform the user application (timer expired, child process finished, IO is ready, ….) […]

Read more

Understanding Linux Kernel Preemption

While configuring a Linux kernel, we can set some parameters that effect the system behavior. You can work with different priorities, scheduling classes and preemption models. It is very important to understand and choose the right parameters. In this post I will cover the different preemption models and how does each one effect the user and […]

Read more

Linux Control Groups

Using cgroups you can limit resource usage of processes , for example if you have a web server and you want limit its memory usage to 1GB its very easy to do with cgroups. This is also a basic building block for containers First we need to install some tools (in my example im using […]

Read more

Creating a Linux bridge

A network bridge helps you connect 2 different networks with the same characteristics (Ethernet for example). Its very easy to implement it in linux using some tools Example We run Qemu  image with tap interface – we can connect from the qemu image to the linux host but we cant access the entire network (internet) […]

Read more

Linux – Writing Fault handlers

Every Linux C/C++ developer is familiar with the message “Segmentation fault (core dumped)” , It can happen by accessing wrong memory address, making a floating point error and more. To find out the problem, you need to enter debug mode or use the core dump Post mortem – core dump While the program is loading […]

Read more

Linux file systems and Block layer

Presentation from linux kernel meetup Linux VFS and Block some nice links for more information: Simple file system example and details here (multiple posts) The page cache chapter from linux kernel development book Nice post – linux VFS Block filter example Dive into linux IO path The block IO layer  

Read more

The Amazing numbers of Linux OS

1.3 Million smartphones running Linux are activated every single day. 7,00,000 televisions are sold every single day running Linux. 92% of the world’s high performance computing systems, that predict climate change, forecast the weather, run the CERN super collider are all Linux. 85% of the world’s global equity trading platforms are running linux. read mode […]

Read more

Linux 4.10 ARM System Calls Table

As a result of continues changes in linux kernel, new system calls are added all the time. In version 4.9, to support a new system call we need to change a source assembly file (arch/arm/kernel/calls.S) and to add the source file with SYSCALL_DEFINEx macro and the function declaration From version 4.10 it is done by […]

Read more

Linux Shared Libraries

While writing applications in linux , the developer can use tons of libraries. Each library can packs functions, classes and variables and it is very  important to understand how to create and work with it. Lets start with simple example: Implicit link

To compile the library we use:

Here we use -g3 to […]

Read more