How Operating Systems Work
The purpose of an operating system is to organize and control hardware and software so that the device it lives in behaves in a flexible but predictable way.
The link address is: http://computer.howstuffworks.com/operating-system.htm