Tag: kernel

Notes on Memory Mapped Files using mmap

Introduction mmap maps a file to a process virtual address space. The file blocks are loaded as needed, in units of the system page size. Each I/O must align with the page size. A block load is handled as a page fault. mmap() can provide a private or shared mapping of a region. mmap() to…

Internals of Linux Process Signals

Linux Signals A process in Linux is represented as task_struct. A process A sends a signal to process B using system call kill() or kill -<sig num> <pid>. Kernel updates the task_struct of the receiving process B. It changes the signal field with the passed value. The scheduler checks the signals on a process before…

Linux Device Driver Development: Block Device Driver

It is my very first interaction with Linux kernel at device driver level. My objective is to develop a block device driver, very simple, that just forward I/O requests to a virtual device. This post explains my observations limited to attacking the problem. Block v/s Character Device Linux support block and character device drivers. Only…