Fundamentals 35 min read

Unlock Linux: A Deep Dive into Kernel, Memory, Processes, and Filesystems

This comprehensive guide explains the core components of a Linux system—including the kernel, memory management, process scheduling, device drivers, networking, shells, file‑system types, VFS architecture, mounting procedures, and link handling—providing clear examples, commands, and diagrams for each topic.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Unlock Linux: A Deep Dive into Kernel, Memory, Processes, and Filesystems

Linux Kernel

The kernel is the heart of the operating system, managing processes, memory, device drivers, the file system, and networking, which directly affect system performance and stability. Its source code resides in ./linux/kernel, and architecture‑specific parts are under ./linux/arch.

Memory Management

Linux uses virtual memory to abstract physical RAM, dividing memory into 4 KB pages. The slab allocator builds on these pages to allocate structures and track usage. When RAM is exhausted, pages are swapped to disk. Source code for memory management is located in ./linux/mm.

Process Management

Linux supports multitasking by giving each process a time slice and using a priority‑based scheduler to select the next runnable process. Inter‑process communication mechanisms include signals, pipes, shared memory, semaphores, and sockets. System calls such as fork, exec, kill, and exit are provided via the SCI (System Call Interface) layer.

File System Architecture

Unlike DOS, Linux organizes file systems into a single hierarchical tree. The Virtual File System (VFS) abstracts hardware details, offering a uniform API for over 50 supported file systems. VFS sits between user space and concrete file‑system drivers, while a buffer cache optimises block access.

Common Linux file‑system types include Ext2/Ext3, FAT, VFAT, NTFS, XFS, JFS, ReiserFS, and many others. Each file system consists of a superblock (metadata), inode tables (file attributes), and data blocks (file contents). Ext2, for example, uses indexed allocation, allowing the OS to read all blocks of a file in one operation.

Device Drivers

Device drivers run in kernel mode and provide the hardware‑specific implementation of the abstract interfaces exposed by VFS and other subsystems. Errors in drivers can crash the entire system.

Network Interface (NET)

Linux implements the BSD socket API and supports the full TCP/IP stack. Network drivers handle hardware communication, while protocol layers implement transmission standards.

Shell

The shell is the user interface for issuing commands to the kernel. Common shells are Bourne, Bash, Korn, and C‑Shell.

Linux Directory Structure and Partitions

Linux uses a single root directory (/) with sub‑directories such as /bin, /etc, /home, /usr, /var, /dev, and others. Partitions are identified as /dev/hdaX or /dev/sdX, with primary, extended, and logical partitions. The fdisk -l command lists partition details.

Every partition must be mounted to a directory before it can be accessed.

Mount points are ordinary directories; mounting hides the original contents of the mount point.

Mounting Filesystems

Use the mount command: mount [-t fstype] [-o options] device mount_point. Common options include ro, rw, user, nouser, codepage=, and iocharset=. Example to mount a Windows FAT32 partition:

sudo mkdir /mnt/winc
sudo mount -t vfat /dev/hda5 /mnt/winc

Automatic mounting at boot is configured in /etc/fstab, where each line specifies device, mount point, file‑system type, and options.

Links

Linux supports hard links and symbolic (soft) links. Hard links share the same inode, cannot cross file‑system boundaries, and persist after the original name is removed. Symbolic links contain a pathname to the target and can span file systems; they become dangling if the target is deleted.

Create links with the ln command:

ln source_file hard_link
ln -s source_file soft_link

Key Commands

Disk/space: fdisk, df, du File navigation: cd, pwd, mkdir, rmdir, ls File manipulation: cp, mv, rm Viewing files: cat, more, less, head, tail Permissions: chmod, chown, chgrp, umask Search: which, whereis, locate,

find

Illustrative Diagrams

Linux system components diagram
Linux system components diagram
Kernel components diagram
Kernel components diagram
VFS architecture
VFS architecture
Ext2 file system layout
Ext2 file system layout
Inode and block mapping
Inode and block mapping
FAT file system block access
FAT file system block access
Hard and soft link comparison
Hard and soft link comparison
<code># fdisk -l Disk /dev/hda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders</code>
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Memory ManagementKernelprocess managementfile systemvfsMountLinks
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.