21-02-2012, 02:02 PM
INSIDE THE LINUX KERNEL
[attachment=17626]
WHAT IS A KERNEL? (1/2)
it’s a program that runs in Kernel Mode
CPUs run either in Kernel Mode or in User Mode
when in User Mode, some parts of RAM can’t be addressed, some instructions can’t be executed, and I/O ports can’t be accessed
when in Kernel Mode, no restriction is put on the program
IS AN INSTRUCTION REALLY FAULTY?
faulty instructions may occur for two distinct reasons:
programming error
deferred allocation of some kind of resource
the kernel must be able to identify the reason that caused the exception
WHY IS A KERNEL SO COMPLEX?
large program with many entry points
must offer disk caching to lower average disk access time
must support run nested kernel invocations --> must run with the interrupts enabled most of the time
must be updated quite frequently to support new hardware circuits and devices