You are on page 1of 32

UNDERSTANDING

HOW OPERATING
SYSTEMS WORK
MANY ELEMENTS GO INTO ENABLING AN OPERATING
SYSTEM TO WORK WITH THE COMPUTER ON WHICH IT IS
LOADED. THESE INCLUDE:
• The kernel

• Resource managers

• Device drivers

• Application software

• BIOS
THE KERNEL
THE KERNEL

The kernel consists of the essential program code of the operating system. To help
illustrate this concept, you might draw a parallel to a general contractor on a job site.
The general contractor is there to schedule all the specific tasks that must be
completed to finish the job and to ensure that all the subcontractors have the
necessary resources and tools to do their jobs in a timely manner. Tasks are
scheduled, resources are allocated, and then tasks are terminated and resources
released so they can be used for other tasks. Scheduling computer processes and
managing resources, such as memory and processing time, are key tasks of the OS
kernel.
NOTE

The term kernel has evolved from the UNIX operating system, but is also used to apply to the core code in the
Windows and Mac OS X operating systems. In UNIX and Linux systems, the basic interface with the kernel is
called the shell, which is a program that enables users to execute commands.
THE JOBS PERFORMED BY THE KERNEL
CAN INCLUDE:
• Managing interactions with the CPU
• Starting, managing, and scheduling programs that handle I/O activities, including
device and networking activities
• Handling basic computer security
• Managing use of the computer’s memory (RAM)
• Managing priority levels assigned to programs and computer processes
In Windows systems, the name of the kernel file is ntoskrnl.exe. In Mac OS X, the
kernel is called XNU. The actual kernel name in Linux depends on the distribution
and release of Linux. You can determine information about the kernel by using the
uname -sr command in Linux
THE RESOURCE MANAGER
A computer is a set of resources for the
movement, storage, and processing of
data and for the control of these
functions.The OS is responsible for
managing resources like mouse ,printer
,memory ,etc.OS provides instructions for
the processor.it is a program or suite of
programs executed by the processor.    
RESOURCE MANAGERS

One of the functions of the operating system is to manage RAM and central processor
use. For example, programs and devices require access to memory. If two devices or
programs use the same memory space at the same time, they will not function
properly, and they might cause the computer and operating system to hang. Even the
computer’s CPU contains memory that must be properly managed to avoid problems.
The operating system uses specialized programs called resource managers to help
ensure that memory is used properly and there are no memory conflicts.
OS AS RESOURCE MANAGER

The operating system also manages how programs access the processing capabilities of the
CPU. Even if a computer has two or more CPUs, it is still important that one program not
dominate the processing time on any one CPU. If one program were able to take over all of
the time on a CPU, the computer might appear to hang and the work by other programs
would come to a halt, possibly crashing the computer. When multiple programs and processes
are running, the operating system manages the amount of time each is given by the CPU.
OS AS RESOURCE MANAGER

For example, if there is one CPU and 10 programs that want to access it, the operating system
will give each program a time slice on the CPU—as determined by the priority the CPU gives
a particular program or process. Each program or process does a little work during its time
slice, and then the kernel gives the next program or process CPU access for its time slice.
Often programs associated with operating system tasks have a higher priority than user
programs, because operating system programs are necessary for the smooth functioning of
the computer.
DEVICE DRIVERS AND THE OPERATING
SYSTEM
The operating system communicates and works directly with many devices, including the
monitor, keyboard, disk drives, mouse, network adaptor, sound card, and so on. Some
operating system programs exchange information with specific hardware (chips) inside the
computer that control these devices. The code (instructions) for this information exchange is
typically referred to as a device driver. A device driver translates computer code to display
text on a screen, or translates movements of a mouse into action, for example. A separate
device driver is usually present for each I/O device as shown in the figure(slide 14)
DEVICE DRIVERS AND THE OPERATING
SYSTEM
operating systems have a standardized way of communicating with a certain type of device
driver. The device driver contains the actual code (instructions) to communicate with the
chips on the device. This way, if another piece of hardware is introduced into the computer,
the operating system code does not have to change. To enable the computer to communicate
with the new device, you simply need to load a new device driver onto the operating system.
NOTE:

If a particular device is not working, one way to troubleshoot the problem is to obtain and install the latest driver
for that device, which can usually be downloaded from the manufacturer’s Web site.
DEVICE DRIVERS AND THE OPERATING
SYSTEM
For example, high-capacity removable hard drives that connect through a Universal Serial
Bus (USB) were introduced after some earlier operating systems were written. Thus, earlier
versions of operating systems did not natively support USB-based removable hard drives.
However, because removable hard drives are similar to other types of disk drives, early
versions of operating systems could be adapted to use removable hard drives by loading a
few simple drivers for the operating system. You may encounter device drivers that interface
with your operating system for other devices, including:
YOU MAY ENCOUNTER DEVICE DRIVERS THAT INTERFACE
WITH YOUR OPERATING SYSTEM FOR OTHER DEVICES,
INCLUDING:
• Fixed internal hard disk drives (HDDs) and solid • Tape drives, flash drives, hard drives, and other
state drives (SSDs) removable media
• Computer monitors • Digital cameras and video hardware
MP3 players or other audio hardware
• Keyboards
DVD/CD-ROM drives
• Mouse and trackball devices
• Gaming interfaces
• Remote communications modems
• PDA (personal digital assistant) interfaces
• Printers and scanners
• Wired and wireless network interfaces

• USB interfaces
THE ROLE OF APPLICATION SOFTWARE

In addition to communicating with computer hardware, the operating system communicates


with the application software running on the computer, as shown in Figure 1-3. Application
software is a fairly vague term; it can mean a word processor, spreadsheet, database,
computer game, or many other types of applications. Basically, application software is any
program a user might choose to run on the computer.
THE ROLE OF APPLICATION SOFTWARE

If an application program accesses a piece of hardware, it sends a request to the operating


system to execute the job. For example, the application program may have to access the
keyboard to see if a user has pressed a key, or might need to access the monitor to show the
user a message. This makes the application programmer’s job easier because she does not
have to know exactly how to manipulate the chips in the computer to communicate with the
keyboard, monitor, or printer. She only has to know how to communicate with the operating
system.
Figure 1-3 Application programs communicate with
hardware through the operating system

In its most basic form, an operating system manages the


communication among the application programs, the user,
and the computer. This level of management allows
application programmers to concentrate on applications
that will run on any hardware, as long as the operating
system can control them. In other words, an application
program can submit a general request to the operating
system, such as “write this information to disk,” and the
operating system handles the details. The application
programmer doesn’t have to worry about how to queue
data, update the disk directory, or physically copy data
from memory to the disk drive.
THE ROLE OF APPLICATION SOFTWARE

In early operating systems, programmers designed code to directly access hardware and
improve overall application performance. This practice can make hardware response fast, but
there are serious drawbacks. A significant drawback is that memory is often required for
directly managing the hardware. If a memory block is programmed for use that conflicts with
the same (or a part of the same) memory block used by other hardware or the operating
system, the hardware devices involved may become unstable or the operating system may
crash.
Another drawback is incompatibility with other software that also needs to use the hardware
or that uses the same memory block, which can cause the software applications to hang or
crash. A third drawback is that direct access to hardware devices makes a system more
vulnerable to malicious software (malware) or an attacker. Such access, for example, can
allow malware to damage a disk or extensively damage disk files.
NOTE

Windows operating systems from Windows 2000 forward do not allow the programmer to
directly access hardware. Instead, the programmer must call on an intermediary process that
decides how to handle the request. This design makes it more difficult for an application
program to crash a computer, such as when two application programs access the same
memory location at the same time. This was a significant problem in earlier versions of
Windows, such as Windows 3.x, Windows 95, and Windows 98.
THE ROLE OF THE BIOS

An essential step in starting a computer is to load the basic input/output system, or BIOS. The BIOS is low-level
program code that:
• Resides on a chip on the computer’s motherboard
• Initiates and enables communications with hardware devices
• Performs tests at startup, such as memory and hardware component tests, which as a group are called the
power-on self test (POST)
• Conducts basic hardware and software communications inside the computer

• Starts a full-fledged operating system that interfaces with the user


THE ROLE OF THE BIOS

Every PC has a BIOS, which is stored in a flash memory chip. Flash memory, which you are
familiar with from using thumb drives, does not lose its memory contents when the computer
is turned off. In early PCs, the BIOS was stored in a read-only memory (ROM) chip, but the
only way you could update the BIOS was to replace the chips, a major inconvenience to say
the least.
THE ROLE OF THE BIOS

When a computer is built, the BIOS is configured with a default set of parameters. The BIOS
configuration stores information about the amount of RAM, the storage devices, and other
I/O devices on the computer. The BIOS configuration is stored in a memory chip called
complementary metal oxide semiconductor (CMOS). A CMOS chip uses a low-power
memory technology that is powered by a small battery. Users can make changes to the BIOS
configuration by accessing the BIOS setup screen before the computer boots.
THE ROLE OF THE BIOS

Whenever you turn on your PC, the machine wakes up and begins executing the startup
program inside the BIOS. This program initializes the screen and keyboard, tests computer
hardware, such as the CPU and memory, initializes the hard disk and other devices, and then
loads the main operating system—Windows 10 or Linux, for example—that provides more
advanced functionality for application programs. Figure 1-5 illustrates the main operating
system components, including the relationship of an operating system to the BIOS.
NOTE

If a computer is turned on but cannot access a device, such as the main disk drive, check the
BIOS settings to make sure that the BIOS knows about the device and is correctly configured
for it. If several BIOS settings are changed or the computer won’t boot, consider changing the
CMOS battery. Also, on many computers you can set up a password in the BIOS to control
who can start the operating system or who can access a particular drive at startup. You can
access the BIOS settings when the computer starts by pressing a designated key. On many
computers, this key is F1, F2, or ESC—check the screen when the computer boots, or consult
your computer’s documentation.
A SUMMARY OF OPERATING SYSTEM ELEMENTS

Application software, such as a spreadsheet or a word processor.

Application programming interface. An application programming interface (API) is software designed to


communicate with the application software and the user. The API is program code that is like a specialized “hook”
into the operating system. It translates requests from an application into code that the operating system kernel can
understand and pass on to the hardware device drivers, and translates data from the kernel and device drivers so
the application can use it. This is the part of the operating system that is most visible to users. For example, a
word-processing application may request to create a specific display of characters on the monitor, and the API
translates the request from the application to the kernel. Another example is the use of messaging APIs, which
enable an e-mail program to send a message through the operating system to a computer network or the Internet.
A SUMMARY OF OPERATING SYSTEM ELEMENTS

BIOS, which provides the basic I/O functions to communicate with system devices, such as the monitor, the
keyboard, and disks. It usually loads other operating system components on startup.
Operating system kernel, the core of the operating system that coordinates operating system functions, such as
control of memory, CPU access, and storage. The kernel communicates with the BIOS, device drivers, and the
API to perform these functions. It also interfaces with the resource managers.

Device drivers, programs that take requests from the API via the kernel and translate them into commands to
manipulate specific hardware devices, such as disks, keyboards, monitors, and printers.
A SUMMARY OF OPERATING SYSTEM ELEMENTS

Resource managers, programs that manage computer memory and central processor use.
Optional drivers, for other functions and devices, such as sound.
Computer hardware, such as storage devices, CPU, mouse, keyboard, monitor, and printer.

Although all operating systems incorporate the basic I/O functions, the operating systems you are accustomed to,
such as Mac OS X, Microsoft Windows, or UNIX/Linux, include many additional functions. These functions
include network services such as those included with the TCP/IP protocol, file systems, and the ability to work
with multimedia files like audio and video files.

You might also like