You are on page 1of 1

Kernel

The kernel of Windows provides the foundation for the executive and the subsystems. The kernel is never paged out of memory,
and its execution is never preempted. It has four main responsibilities: thread scheduling, interrupt and exception handling, low-
level processor synchronization, and recovery after a power failure. We examine each of these below.

The kernel is object oriented. An object type in Windows is a system- defined data type that has a set of attributes (or data values)
and a set methods that is, functions or operations). An object is just an instance of a particular object type. The kernel performs its
job by using a set of kernel objects whose attributes store the kernel data and whose methods perform the kernel activities.

The kernel uses two sets of objects: dispatcher objects and control objects. Dispatcher objects control dispatching and
synchronization in the system. Examples of these objects are events, mutants, mutexes, semaphores, threads, and timers.
 The event object is used to record an event occurrence and to synchronize the latter with some action.
 The mutant provides kernel-mode or user-mode mutual exclusion with the notion of ownership.
 The mutex, which is available only in kernel mode, provides deadlock-free mutual exclusion.
 A semaphore object acts as a counter or gate to control the number of threads that access some resource.
 The thread object is an entity that is run by the kernel and is associated with a process object.
 Timer objects are used to keep track of the time and to signal timeouts when operations take too long and need to be
interrupted.

The second set of kernel objects comprises the control objects. These objects include asynchronous procedure calls, interrupts,
power-notify objects, power-status objects, process objects, and profile objects.
 The system uses an asynchronous procedure call (APC) to break into an executing thread and to call a procedure.
 The interrupt object binds an interrupt service routine to an interrupt source.
 The system uses the power-notify object to call a specified routine automatically after a power failure.
 The power-status object to check whether the power has failed.
 A process object represents the virtual address space and control information necessary to execute the set of threads
associated with a process.
 Finally, the system uses the profile object to measure the amount of time used by a block of code.

You might also like