Making swapping scalable

The swap subsystem is where anonymous pages (those containing program data not backed by files in the filesystem) go when memory pressure forces them out of RAM. A widely held view says that swapping is almost always bad news; by the time a Linux system gets to the point where it is swapping out anonymous pages, the performance battle has already been lost. So it is not at all uncommon […]

Web server in one line of shell code

If you want to quickly save a file through http but you don’t want to install a web server, you can just use netcat. You can run: index.html can be any file you want to serve it. You can access it after that as: http://<YOUR HOST>:8080/

Linux Kernel boot sequence

Execution in Assembly Entry point for Kernel uncompressed – arch/arm/kernel/head.S Read processor ID in coprocessor and obtain proc_info_list pointer Lookup machine type based on mach-id passed by bootloader (R1), get the mach_desc pointer and save mach-id Determine vailidity of ATAGS pointer (R2) and save Setup minimal pagetable to get Kernel running on virtual address, also setup one-to-one mapping for the page that turns on MMU Initialize TLB, caches, setup MMU […]

Mapped Memory

Mapped memory permits different processes to communicate via a shared file. To map an ordinary file to a process’s memory, use the mmap (“Memory MAPped,” pronounced “em-map”) call. The first argument is the address at which you would like Linux to map the file into your process’s address space; the value NULL allows Linux to choose an available start address. The second argument is the length of the map in bytes. The third […]