Showing posts with label Linux Kernel. Show all posts
Showing posts with label Linux Kernel. Show all posts

Referring kernel source structure-I| memory management, inter process communication, kernel ,PCI

Referring kernel source structure related to source tree with respect to a particular topic.
System Startup initialization
View /arch/i386/kernel/head.s it is make some architecture specific setup and proceed the main() routine in /init/main.c
Memory Management
/arch/*/mm it is directory for memory management.
Page fault handling code is in /mm/memory.c
Memory maping cache code in /mm/filemap.c
Swap cache is applied in /mm/swap.c
And buffer cache is applied in /mm/buffer.c
Kernel
/arch/*/kernel::it is directory
/kernel/sched.c ::kernel scheduler directory
/kernel/fork.c::fork codedirectory
/include/linux/interrupt.h::Bottom half handling code directory
/include/linux/sched.h::task_struct date structure directory
PCI
/drivers/pci/pci,c::PCI pseudo driver directory
/include/linux/pci.h::system wide definition directory
Interposes Communication

System V IPC object s has an ipc_term data structure present in /include/linux/ipc.h
ipc/msg.c:: system v messages are present
/ipc/shm.c::shared memory and semaphore directory
/ipc/pipes.c:: pipes are applied

Linux kernel Management | Thin layer of Linux system | Linux kernel modules

The innermost layer of the Linux operating system is the kernel.
This is the thin layer between hardware and software
When the system boot up the bios setting passes the control to the kernel
Then kernel manages all task of the system.
Kernel modules it contains chunks of codes that have to be linked to the kernel dynamically for use. In the modeling it perform two process
Loading modules
Unloading modules

Linux Kernel source structure | Linux kernel important directories

Linux Kernel has many directories and the structure of the Linux kernel source.
Linux kernel source structure generally it present in the /user/src/linux directory
There important directories are
Documentation-> these consists of documentation of all the data
Arch-> This directory has the all kernel codes particularly related to architecture and it is further divided into subdirectory like
alpha,arm,1386,m68k,mipc,ppc,sparc,and sparc64,it has
boot code, interrupt, trap handling,fp emulation and optimized utility routines.
mm subdirectories for platform-specific memory.
Drivers- this directory contains all the system’s device driver
fs-it contain file system code
Example: vfs,vfat,ext3,proc,etc
include-<most of the include files required to building kernel codes
init-These directory contain initialization code.
ipc- the kernel has inter process communication code
kernel-these directory contain main kernel code. And the architecture specific kernel is in /arch/*/kernel
lib- lib directory contains library code of the kernel and architecture specific library in /arch/*/lib
mm-mm directory has memory management code and directory /arch/*/mm
net-net directory contain networking code of the kernel
script-script directory used to configure the kernel
modules-All built modules are contain in these directory.