Posix Threads – An Introduction

Historically, many independent thread implementations by different hardware vendors were present. This caused portability between different Hardware problematic and a common interface was needed to be standardized. The IEEE POSIX 1003.1c  standard was a step in this direction. Implementations that follow the above standard are termed as POSIX threads (or Pthreads in short). The below […]

Advantages and Disavantages of Threads

Threads have a lot many advantages and a disadvantage as well. The article tries to outline the advantages and disadvantages of using threads in Linux. ADVANTAGES Parallelism and blocking I/O – With Most multi-core systems, threads provide a means of achieving parallelism. If a particular thread is waiting for I/O, another thread can still continue […]

What is Multi-threading?

The Concept of running multiple instances of a certain process can be termed as multi-threading. A Process is the basic block of a running program, the unit of execution of a process is a thread. A process with a single unit of execution is termed a single threaded process and a process that runs more […]

Threads in Linux

A thread is unit of execution of a process. A process can execute multiple threads. The Process that executes only one thread, it is termed as a single threaded process. Multiple threads can be executed by a process and can execute concurrently. Parallel execution of threads is possible on a multi-processor system.   A depiction of […]

Netlink Protocol Families

The Netlink protocol family has many protocol families. Some of them have been deprecated and some are presently as of the date of this article present in the Linux Kernel. The list provides the reader in knowing the different protocol families available (I do not claim to know what each of them does individually myself […]

Netlink Message Macros

The interested reader can refer the netlink socket structures in the below two links Netlink Socket structures – part 1 Netlink Socket structures – part 2 The Netlink Message construction uses a number of macros to create the complete netlink message. The below Netlink macros provide information on how the netlink message is constructed. int […]

Introduction to system programming

System programming in my own words can possibly be described as programming mechanisms to interact with various aspects of a system. It could be a shell script, a daemon, user space to kernel space interaction mechanisms, interaction between processes, file system management, memory management etc. System programming in Linux is in itself a very vast […]

The Netlink Socket Structures – Part 2

The Part 1 of ths Netlink socket structures discussion can be found in the below link. The Netlink Socket Structures – Part 1 The netlink message is sent using a netlink message. The format of the netlink message is shown below Fig Courtesy: https://people.redhat.com/nhorman/papers/netlink.pdf The nlmsghdr is the netlink message header and is given below […]

The Netlink Socket Structures – Part 1

The Socket Address structure for Netlink sockets is provided below (linux/netlink.h). struct sockaddr_nl {         sa_family_t nl_family;         unsigned short nl_pad;         __u32 nl_pid;         __u32 nl_groups; }; The socket structure uses the AF_NETLINK socket family. The nl_pad bytes are zero filled pad-bytes. […]

The Netlink Socket

The Netlink socket mechanism might be better placed in the socket programming section. However, the Netlink mechanism being a socket mechanism which is used to converse with the kernel, placing it here. The Netlink Socket is a mechanism to retrieve and send data between user space and kernel space. The Netlink socket has its own […]