An operating system is the interface between the software of the computer and the actual hardware. It handles the operation of the hardwarwe which makes it easier for a person to write an application program. Examples of the most common operating systems that are used are Microsoft windows, Mac OS, Linux, and Solaris. The busiest part of an operating system is the kernel, which is always running at all times. The kernel loads a program code into memory and then executes the program.
Kernels also handle a computers interrupt which is very important in creating the code for operating systems. If an important method comes up that must be run at a certain time, such as a plane's engine goes down, that code can interrupt whatever is running so that the most important things get run first. Interrupts can save a computer system from failing, as well as saving a car from hitting something else. If a part of code gets interrupted that is called priorty pre-emptive scheduling. If a higher priority function comes into a waiting queue, then it can pre-empt whatever is running at the time in order to maintain safety and effiency.