My Tech notes: The things must know about Linux kernel ...
Subscribe

Unix Documentation

Free Online Unix Training Materials

Lists many links to free Unix training materials.

Pointers and Arrays Materials

Pointers and Arrays materials Explained for C beginners

C FAQ and General Questions C Interview Questions

Powered By

Free XML Skins for Blogger

Powered by Blogger

Wednesday, July 15, 2009

The things must know about Linux kernel ...

As a kernel or device driver developer one must know what Linux kernel can not

1) No access to C library
Generally, C library is large. Accessing a C lib function from kernel space is very time consuming.
It affects the kernel speed and size. So many libc functions are implemented in the kernel. Just like printf in libc is implemented as printk in kernel.

2) The kernel lacks memory protection.
Application in user space lacks memory protection. so when an application access illegal memory location, it results in segment violation. But when in kernel space segment violation occures, it results in oops. It is a major kernel error.

3) Difficult to use floating point.
When floating point arithmetic is done in user space, kernel manages the transition from integer to floating point mode. But enabling floating point in kernel, the kernel requires manually saving and restoring the floating point register. It is extra overhead for kernel.

4) Limited and small stack
Linux kernel has very small stack size. The size varies by architectures. Generally it is 8KB for 32-bit architecture and 16KB for 64-bit architecture.

5) Requires synchronization and concurrency
Linux kernel is a preemptive multitasking operating system. So scheduler schedules any process among the pool of processes. It requires synchronization between tasks. The concurrency is required when two or more processes tries to access the same resource.

No comments:

Post a Comment