kernel

Definition of kernel in The Network Encyclopedia.

What is Kernel (in computer science)?

The core services within an operating system. The term “kernel” is most often used in a UNIX environment and is contrasted with the term shell, which describes the outer portion of the operating system that is exposed to the user and provides a user interface for entering commands and receiving output. (In Microsoft Windows operating systems, the shell is the desktop.)

The kernel generally interfaces with other components of the operating system through system calls, which provide a standard interface to kernel functions. In many operating systems, the kernel is primarily responsible for scheduling processes and threads and for handling interrupts from devices. The kernel also typically manages input/output (I/O) operations and memory management.

How It Works

In Windows NT and Windows 2000, the kernel (called ntoskernl.exe and commonly referred to as the microkernel) is located in the \Winnt\System32 directory and runs in nonpageable memory (which means that it is always resident in memory). The kernel is responsible for thread scheduling and dispatching threads to processors on a symmetric multiprocessing (SMP) platform. The kernel code itself is not preemptive - that is, no other thread or process can preempt the kernel’s operations. Each thread is assigned a priority level from 0 to 31, as follows:

  • Levels 0 through 15 indicate dynamic priority and are assigned to application and user threads.
  • Levels 16 through 31 indicate real-time priority and are assigned only to key operating system threads.

The kernel adjusts priority levels for threads to ensure that no thread is starved and that each receives proper attention, with threads having a higher priority level getting the greater share of processor resources.

The kernel does its job by managing two classes of objects:

  • Control objects, which control the operation of the kernel and include processes, interrupts, asynchronous procedure calls, and profiles
  • Dispatcher objects, which manage thread dispatching and synchronization and include events, threads, timers, semaphores, mutants, and mutexes

The Windows NT kernel communicates with the hardware abstraction layer (HAL) to interact with hardware and communicates with the Windows NT executive and its components for higher-level operating system functions. The kernel loads when the screen turns blue during the boot process.

NOTE

In Windows 95 and Windows 98, the kernel file is kernel32.dll, and it is located in the \Windows\System directory. If the kernel is corrupt or missing, you can expand the file from the distribution CD and replace the damaged or missing file on your hard drive (as long as you can access that drive in a way that doesn’t involve this file, such as through MS-DOS).