Pick a Free OS

User login

Navigation

For Kernel_Newbies By a Kernel_Newbie

cache for objects is kept in cpucache_t,which gets initialised on a

enable_all_cpucaches call.For SMP,the cpucache_t caches the list of objects

depending upon the batchcount and the object limit per cpu.The kmem_cache_t

contains a per CPU pointer to cpucache_t,where the objects are cached. The

updation of the kmem_cache_ts cpucache_t pointer is done by having a ccupdate_t

structure,which updates the cpucache_t and frees up any old cpucache_t

entries.Try looking at slab.c to see their implementation.

Epilogue

To wrap it up,its evident that most of the issues like

spinlocks,semaphores,read/write,IPC werent taken up. I wanted to take them

up,but they were very well discussed on Linux 2.4 Internals Document in

linuxdoc.org. You should also have a look at include/linux/list.h for the

list_head double_linked_list interface as they are heavily used in the

Kernel.From what I have analysed till now,a reader can get first hand looks at

implementation of all kinds of data structures like linked lists,queues,trees(as

in AVL),hashing,etc. Moreover,IPC should be the first point to start hacking the

kernel.While going through the shm.c (shared memory), try going through the

shmem.c code in linux/mm which is the implementation of the shmem file system

used by shared memory,while mapping the files to user_space.Focus on

pipelined_send in message queues,and the sem_queue and the sem_undo structure

management in sem.c.If you want to check out the reboot magic,have a look at

machine_restart in arch/i386/process.c, which switches to real mode before

making the jump to BIOS.(0xffff0000). Before I stop,its evident that this

document is totally incomplete and will/should have future revisions. Thanks for

a __patient__ reading.I hope it was useful.

- A.R.Karthick