Short Notes: Virtual File Systems (VFS)

Deeper Dive into the Virtual File Systems

Krishanu Konar

8 minute read

The dentry cache is a portion of the Linux kernel that stores directory entries, it is a part of the Virtual File System (VFS) layer. A dentry is the glue that holds inodes and files together by relating inode numbers to file names. Dentries also play a role in directory caching which, ideally, keeps the most frequently used files on-hand for faster access. It tracks the locations of files and directories on a Linux file system, allowing for faster path name resolution.

Krishanu Konar

19 minute read

The Virtual File System (also known as the Virtual Filesystem Switch) is the software layer in the kernel that provides the filesystem interface to userspace programs. It also provides an abstraction within the kernel which allows different filesystem implementations to coexist. VFS is an abstraction layer, it’s what makes “everything is a file” philosophy possible in linux.

Short Notes: cGroups and Namespaces

Diving deep into the internals of containerization.

Krishanu Konar

13 minute read

Control groups (or cgroups as they are commonly known) are a feature provided by the Linux kernel to track, manage, restrict, and audit groups of processes. It also allows to limit/prioritize what resources are available to a group of processes. The way you interact with cgroups are by using sub-systems; cgroup system is an abstract framework, subsystems are the concrete implementation. Cgroups are more flexible as they can operate on (sub)sets of processes (possibly with different system…

Short Notes: Unix System Calls

How do Processes interact with the hardware?

Krishanu Konar

12 minute read

Unix systems were created in 1970s, and by 1980s the 2 most prevelant systems were SystemV (created by AT&T) and BSD (Berkeley System Distribution). Many variants exist nowadays, including many distros for Linux, MacOSX (based on Darwin), FreeBSD etc.

Krishanu Konar

9 minute read

IPC (Inter Process Communication) refers to the mechanisms by which processes in an operating system communicate with each other. This involves synchronizing their actions and managing shared data. This can be done between related processes (parent/child) and between unrelated processes. These mechanisms are implemented as part of the kernel module. The Linux kernel has many IPC mechanisms that allow processes to communicate and collaborate. Here are some of the main ones:

Short Notes: Memory Management

How the OS actually manages memory for all processes

Krishanu Konar

23 minute read

The CPU can only access its registers and main memory. It cannot, for example, make direct access to the hard drive, so any data stored there must first be transferred into the main memory chips before the CPU can work with it. Device drivers communicate with their hardware via “interrupts” and “memory” accesses, sending short instructions.