Systems
7.1
Foundations of Computer Science Cengage Learning
Objectives
After studying this chapter, the student should be able
to:
Understand the role of the operating system.
Understand the process of bootstrapping to load the
operating system into memory.
List the components of an operating system.
Discuss the role of the memory manager.
Discuss the role of the process manager.
Discuss the role of the device manager.
Discuss the role of the file manager in an operating system.
Understand the main features of three common operating
systems: UNIX, Linux and Windows NT.
7.2
A computer is a system composed of two major
components:
hardware and software.
Computer hardware
is the physical equipment.
Software
is the collection of programs that allows the hardware to
do its job.
7.3
Computer software is divided into two broad
categories:
•Operating system
and
•Application programs
7.6
An operating system is an interface between the
hardware of a computer and the user
(programs or humans)
that facilitates the execution of other programs
and the access to hardware and software resources.
7.7
Bootstrap process
7.8
Figure 7.2 The bootstrap process
7.9
7-2 EVOLUTION
7.11
Personal systems
When personal computers were introduced, there was a need
for an operating system for this new type of computer.
During this era, single-user operating systems such as DOS
(Disk Operating System) were introduced.
Parallel systems
The need for more speed and efficiency led to the design of
parallel systems: multiple CPUs on the same machine. Each
CPU can be used to serve one program or a part of a
program, which means that many tasks can be accomplished
in parallel instead of serially. The operating systems required
for this are more complex than those that support single
CPUs.
7.12
Distributed systems
•Networking and internetworking have created a new
dimension in operating systems.
•A job that was previously done on one computer can
now be shared between computers that may be thousands
of miles apart.
•Distributed systems combine features of the previous
generation with new duties such as controlling
security.
Real-time systems
•A real-time system is expected to do a task within a specific
time constraint.
•They are used with real-time applications, which monitor,
respond to or control external processes or
environments.
7.13
7-3 COMPONENTS
7.16
Memory manager
One of the responsibilities of a modern computer system is
memory management.
•Although the memory size of computers has increased
tremendously in recent years, so has the size of the
programs and data to be processed.
•Memory allocation must be managed to prevent
applications from running out of memory.
•Operating systems can be divided into two broad
categories of memory management:
•Monoprogramming
and
•Multiprogramming.
7.17
Monoprogramming
In monoprogramming, most of the memory capacity is
dedicated to a single program; only a small part is needed to
hold the operating system. In this configuration, the whole
program is in memory for execution. When the program
finishes running, the program area is occupied by another
program.
7.25
Figure 7.11 Virtual memory
7.26
Process manager
A second function of an operating system is process
management, but before discussing this concept, we need to
define some terms.
7.27
State diagrams
The relationship between a program, a job and a process
becomes clearer if we consider how a program becomes a
job and how a job becomes a process. This can be illustrated
with a state diagram that shows the different states of each of
these entities.
7.28
Figure 7.12 State diagram with boundaries between program, job and process
7.29
Schedulers
To move a job or process from one state to another, the
process manager uses two schedulers: the job scheduler and
the process scheduler.
7.32
Figure 7.15 Queues for process management
7.33
Process synchronization
The whole idea behind process management is to
synchronize different processes with different resources.
Whenever resources can be used by more than one user
(or process, in this case), we can have two problematic
situations: deadlock and starvation.
7.34
Figure 7.16 Deadlock
i
Deadlock occurs when the operating system does not
put resource restrictions on processes.
7.35
Figure 7.17 Deadlock on a bridge
7.36
Figure 7.18 Starvation
7.37
Figure 7.19 The dining philosophers problem
7.39
File manager
Operating systems today use a file manager to control
access to files. A detailed discussion of the file manager also
requires advanced knowledge of operating system principles
and file access concepts that are beyond the scope of this
book. The file manager:
7.40
7-4 A SURVEY OF OPERATING SYSTEMS
7.41
UNIX
UNIX was originally developed in 1969 by Thomson and
Ritchie of the Computer Science Research Group at Bell
Laboratories. UNIX has gone through many versions since
then. It has been a popular operating system among
computer programmers and computer scientists.
7.42
Figure 7.20 Components of the UNIX operating system
7.43
Linux
•In 1991, Linus Torvalds, a Finish student at the
University of Helsinki at the time, developed a
new operating system that is known today as
Linux.
•The initial kernel, which was similar to a small
subset of UNIX, has grown into a full-scale
operating system today.
•The Linux 2.0 kernel, released in 1997, was
accepted as a commercial operating system
•It has all features traditionally attributed to
7.44
UNIX.
Windows NT/2000/XP
7.45
Figure 7.21 The architecture of Windows NT
7.46