How Operating Systems Work
How Operating Systems Work
When you turn on your computer, it's nice to think that you're in control. There's the trusty computermouse, which
you can move anywhere on the screen, summoning up your music library orInternet browser at the slightest whim.
Although it's easy to feel like a director in front of your desktop orlaptop, there's a lot going on inside, and the real
man behind the curtain handling the necessary tasks is the operating system.
Most desktop or laptop PCs come pre-loaded with Microsoft Windows. Macintosh computers come pre-loaded with
Mac OS X. Many corporate servers use the Linux or UNIX operating systems. The operating system (OS) is the first
thing loaded onto the computer -- without the operating system, a computer is useless.
More recently, operating systems have started to pop up in smaller computers as well. If you like to tinker with
electronic devices, you're probably pleased that operating systems can now be found on many of the devices we use
every day, from cell phones to wireless access points. The computers used in these little devices have gotten so
powerful that they can now actually run an operating system and applications. The computer in a typical modern cell
phone is now more powerful than a desktop computer from 20 years ago, so this progression makes sense and is a
natural development.
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.
It's important to differentiate between multi-user operating systems and single-user operating systems that support
networking. Windows 2000 and Novell Netware can each support hundreds or thousands of networked users, but the
operating systems themselves aren't true multi-user operating systems. Thesystem administrator is the only "user"
for Windows 2000 or Netware. The network support and all of the remote user logins the network enables are, in the
overall plan of the operating system, a program being run by the administrative user.
With the different types of operating systems in mind, it's time to look at the basic functions provided by an operating
system.
Computer Operating Systems
When you turn on the power to a computer, the first program that runs is usually a set of instructions kept in the
computer's read-only memory (ROM). This code examines the system hardware to make sure everything is
functioning properly. This power-on self test (POST) checks the CPU, memory, and basic input-output systems (BIOS)
for errors and stores the result in a special memory location. Once the POST has successfully completed, the software
loaded in ROM (sometimes called the BIOS or firmware) will begin to activate the computer's disk drives. In most
modern computers, when the computer activates the hard disk drive, it finds the first piece of the operating system:
the bootstrap loader.
The bootstrap loader is a small program that has a single function: It loads the operating system into memory and
allows it to begin operation. In the most basic form, the bootstrap loader sets up the small driver programs that
interface with and control the various hardware subsystems of the computer. It sets up the divisions of memory that
hold the operating system, user information and applications. It establishes the data structures that will hold the
myriad signals, flags and semaphores that are used to communicate within and between the subsystems and
applications of the computer. Then it turns control of the computer over to the operating system.
The operating system's tasks, in the most general sense, fall into six categories:
Processor management
Memory management
Device management
Storage management
Application interface
User interface
While there are some who argue that an operating system should do more than these six tasks, and some operating-
system vendors do build many more utility programs and auxiliary functions into their operating systems, these six
tasks define the core of nearly all operating systems. Next, let's look at the tools the operating system uses to perform
each of these functions.