|
|
CIS 106a: Introduction to Operating System Concepts
Chapter 1: Introducing Operating Systems
Objectives:
This chapter discusses operating systems. The objectives important to
this chapter are:
- Understanding operating systems
- Understanding user interfaces
- Understanding the operating system tools
- Recognizing some major operating systems
Concepts:
As with the previous chapter, I will concentrate here on the most important
features of the chapter.
Operating System software is defined as software "related
to controlling the operations of the computer hardware". To the beginner,
that sounds like a definition of all software. You need to know that some
programs, like applications, only deal with their own concerns
(such as processing data into a report). Such programs must interface
with the system software to save files, to print, to display data,
to access memory, and to perform any other function involving hardware.
A brief discussion of several operating systems follows. You
will want know something about most of them, since an operating system
is choice you make when purchasing a computer:
- DOS - stands for Disk Operating System. Several versions have
existed, from various vendors, notably Microsoft and IBM. This is an
older system that does not support a 32 bit graphic environment. DOS
was used as the basic operating system for most of the early versions
of Windows. (See below)
- Windows 3.x - this refers to versions 3.0, 3.1 and 3.11 of
Windows. These products were not really operating systems. They were
actually Graphical User Interfaces to the DOS operating system.
- Windows 9x and Me
- Windows 95 - this version of Windows is more of an operating
system, but it is still an interface because it requires some DOS
components be loaded before it is loaded.
- Windows 98 - this version of Windows is a bit less reliant
on DOS than Windows 95, but again, it is not truly an operating
system.
- Windows Me (Millennium Edition) - Few people liked
this version of Windows. For our purposes, know that it still ran
on top of a DOS layer.
- Windows CE - this is a true operating system, but it is meant
for handheld devices, not desktop or laptop computers.
- Windows NT - this was the first version of Windows that was
truly an operating system for desktops, laptops, and servers. The workstation
and server versions were marketed as separate software.
- Windows 2000 - more stable than NT, plug-and-play support introduced,
supported Active Directory (a network database system for managing users
and computers) When users need a command line interface, they start
a DOS simulator program.
- Windows XP - introduced multiple logons to the same
computer (user profiles), introduced Windows Firewall
- Windows Vista - current version of Windows (2007-2008),
higher hardware requirements, many interface changes
- Windows Server 2003 - several
versions available (to be replaced by Server 2008)
- Windows Small Business Server 2003
- Storage Server 2003
- Server 2003 Web Edition
- Server 2003 Standard Edition
- Server 2003 Enterprise Edition
- Server 2003 Datacenter Edition
- Macintosh - a proprietary system, because it has only been
used on Apple Macintosh computers for most of its life. Several
versions have been released. OS-X (version 10 of the Mac OS) can run
on some Intel computers.
- OS/2 - an IBM product, developed with Microsoft. This system
could be run on many kinds of machines. It was not a marketing success.
- UNIX - various versions exist. The original was invented at
Bell Labs. Many people are promoting one version or another as a replacement
for Windows.
- Linux - started as a free version of UNIX, now marketed
by several vendors as well, notably:
- NetWare - this is a network operating system created by Novell.
The operating system runs on servers, a client interface runs on workstations
in the network. It has been a widely used system, and it supports workstations
that run any of the operating systems listed above. Windows is
used on more corporate networks now.
The text reminds us that all operating systems must provide four
common features:
- a user interface
- file management
- application management
- hardware management
Operating systems can be discussed in terms of major components:
- the Shell - provides the user interface, and an interface
for applications to access the operating system
- the Kernel - provides the interface between the operating
system and hardware
- Configuration settings - in newer versions of Windows,
configuration settings for applications, and Windows itself, are kept
in the Registry database. Previously, they were kept in separate files.
Operating systems can be grouped in terms of the interfaces they offer
to users:
- command line interface - user must type commands
- menu-driven interface - user may choose options from menus,
usually with a keyboard
- graphical user interface - user may use a mouse to click buttons
and icons
The menu-driven interfaces often allow a user to enter typed commands.
The graphical interfaces often allow the user to use menus and typed commands
as well.
All operating systems include file systems. Without a file system,
there would be no way to store information on a floppy disk, a hard drive,
an optical drive, or a USB connected device. File systems provide a means
to make folders (also called directories) and subfolders (also called
subdirectories) to organized files. This organization is for the user's
convenience, but it is also for programs which need to find their own
files in specific folders.
In order for disks to store data, there has to be a logical system of
organizing the data. Disks are divided into tracks, which
are concentric circles. Floppy disks typically have 80 tracks
per side. Floppy drives read and write to the tracks with magnetic
read/write heads (like in a tape recorder or VCR). The heads take
turns, writing to one side then the other, so the user does not have to
be aware that both sides are used (and does not have to flip the disk
over, as I had to with my first computer: an Apple IIc). Floppy drives
rotate at about 360 rpm (revolutions per minute), and the read/write
heads are meant to make light contact with the disk. This is part of what
causes a floppy disk to wear out after about 40 hours of actual use.
 |
- Red
sector
- Blue
sector
- Track
|
The disks are further divided into pie-shaped wedges called sectors.
(Why is that word red? You'll see in a few lines.) Again, note in the chart
that the number of sectors on a disk varies from type to type. Our common
example, the 1.44 MB 3.5 inch disk has 18 sectors on each side.
(The number of sectors is always the same on each side of any disk.) Now
for the confusing part: the word "sector" has another meaning. Sector
can mean one of the wedges on a disk, but it can also mean the part
of a track inside that wedge. If we consider that a 1.44 MB disk has
18 sectors on a side, and that it has 80 tracks on that side, then those
tracks are divided by the sector lines into 1,440 track segments
that are also called sectors. It will
become tedious if I continue using colors for that word, and it will be
unrealistic: the real world is not color coded. You have to understand which
meaning of the word is intended from the context in which it is used, just
like any other oddity in English.
(In the picture on the right, the number of wedges has been reduced to
make the image clearer. The picture is a metaphor, not an exact representation.)
Something that does not vary, at present, is that a sector
can only hold 512 bytes of data, no matter what kind of disk is being
used. (Okay, one more time. I made it blue so you would know I meant "a
segment of a specific track".) Since there are two sides to that disk,
that means it can hold 512 bytes per sector, times 2 sides, times 1,440
sectors per side, making 1,440 Kilobytes, which is 1.44 Megabytes. (In
this paragraph, every time I used the word "sector", I meant "a segment
of a specific track".)
The next major concept is the cluster, sometimes also
called a file allocation unit. Think of sectors
and tracks as being physical aspects of a disk that are
dealt with by the BIOS. Think of clusters as being logical
aspects of a disk that are dealt with by the Operating System.
A cluster is defined as the smallest unit on a disk that the operating
system can read from or write to at one time. Again, the chart
above is helpful. For the type of disk we are discussing (1.44 MB), the
smallest amount of data that can be written to the disk (a cluster) is
the size of one sector. For the other types, it varies between one sector
and two sectors.
On computers that run Windows, a hard drive keeps track of the location
of data with a directory listing and a FAT table, just like
a floppy disk. A hard drive can have two (redundant copies) of
several kinds of FAT tables (FAT stands for File Allocation Table.
Redundant, isn't it?):
- Floppy disks use 12 bit FAT tables (FAT12)
- DOS and every version of Windows since 3.1 can use 16 bit FAT tables
(FAT16)
- Windows 95, version 2, and later can use 32 bit FAT tables (FAT32),
which are larger and can use larger addresses. Windows 2000 and XP can
use FAT32, but only if the drive is no larger than 32 GB.
- Windows NT can use any of these, or NT File System (NTFS) tables
which are larger still, using the most addresses. Windows 2000 and XP
also prefer NTFS.
- FAT 16 is usable for hard drives up to 2 or 4 GB (see below)
in size, but there is a penalty for large drives. The larger the drive,
the larger the cluster size for any FAT table.
- FAT 32 is better organized, and is practical for drives up
to 8 GB, where its cluster size is about 4 KB. From 8 GB to 16 GB, the
cluster size goes up to about 8 KB per cluster.
- NTFS allows the use of much larger hard drives.
This is a chart of cluster sizes for various logical drive sizes using
FAT12, FAT16, FAT32, and NTFS. For another view of the same data, see
this page at the
Microsoft Help and Support site.
DEFAULT Cluster Sizes, from Microsoft Help and Support
site
FAT Type |
Logical Drive Size |
Cluster Size |
FAT12 |
360 KB |
2 sectors = 1KB |
|
720 KB |
2 sectors = 1KB |
|
1.2 MB |
1 sector = 512 bytes |
|
1.44 MB |
1 sector = 512 bytes |
|
< 1 MB to 15 MB |
8 sectors = 4 KB |
FAT16 |
16 MB to 127 MB |
4 sectors = 2 KB |
|
128 MB to 255 MB |
8 sectors = 4 KB |
|
256 MB to 511 MB |
16 sectors = 8 KB |
|
512 MB to 1023 MB |
32 sectors = 16 KB |
|
1 GB to 2 GB (limit for DOS and Windows 9x) |
64 sectors = 32 KB |
|
2 GB to 4 GB (must be using NT, 2000, or XP) |
128 sectors = 64 KB |
FAT32 |
257 MB to 8 GB |
8 sectors = 4 KB |
|
8 GB to 16 GB |
16 sectors = 8 KB |
|
16 GB to 32 GB (limit for Windows 2000 and XP) |
32 sectors = 16 KB |
NTFS |
Up to 512 MB |
8 sectors = 4 KB |
|
512 MB to 1 GB |
8 sectors = 4 KB |
|
2 GB to 2 TB |
8 sectors = 4 KB |
|
2 TB to 16 TB |
8 sectors = 4 KB |
|
16 TB to 32 TB |
16 sectors = 8 KB |
|
32 TB to 64 TB |
32 sectors = 16 KB |
|
64 TB to 128 TB |
64 sectors = 32 KB |
|
128 TB to 256 TB |
128 sectors = 64 KB |
|
More than 256 TB |
not supported |
You may wonder why we don't just use NTFS on all large hard drives.
It is because NTFS is not available unless you are running Windows
NT, 2000, XP, or later versions of Windows. We can consider a file system to be
inefficient if it uses more than 8 sectors for a cluster size. By this
measurement, FAT16 is only efficient for hard drives up to 256 MB, and
FAT32 is only efficient for hard drives up to 8 GB.
After a drive is installed, you may have to partition it. The
FDISK utility in DOS or Windows 9x is used for this. As
you may know, FDISK is also used to assign drive letters to the disk.
You should be aware that the system will boot from the primary
partition, which is why it must be set as active. The primary
partition cannot contain more than one drive letter, but Windows
2000 and XP will allow up to four primary partitions on a single hard
drive. If more drive letters are desired, they must be assigned in an
extended partition.
An operating system manages applications run by the user. The
operating system provides memory and processor time to the applications,
tracks their installation and removal, and provides access to system hardware.
Five tasks performed when installing a program under Windows are listed:
- file folders are created
- files are copied or expanded to the folders
- Registry data is saved about the program
- Icons may be added to the desktop
- menu items are added to the Start menu
Once software is installed in on a computer running Windows, you can
run it several ways, including:
- icons can be double-clicked (an icon is most often a shortcut to the
program file itself)
- a menu item under Start can be selected
- you can click Start, Run, and enter the path to the main executable
file
- you can find the main executable file with Windows Explorer or My
Computer, and double-click it
Software can run in several modes under Windows. The modes can
be referred to by their names and by the number of bits each mode is capable
of processing at the same time:
- Real Mode (16-bit) - DOS used real mode, current Windows programs
should not. Programs were given direct access to hardware, which led
to crashes caused by programs trying to access the same resource at
the same time
- Protected Mode (32-bit) - the operating system works as a
interface between the programs and the hardware
- Long Mode (64-bit) - the operating system works as a interface
between the programs and the hardware
Confusingly, programs can be written to process 16, 32, or
64 bits at a time, regardless of the mode they may be run in:
- 16 bit programs were typically written for DOS or Windows
3.x
- 32 bit programs were typically written for Windows NT, 2000,
or XP (The text tells us that a program will typically run under
only one operating system. Be aware, however, that sometimes programs are
written to run on several similar operating systems.)
- 64 bit programs are written to run under Windows XP Professional
64-bit Edition (or other 64 bit OSs)
This leads to a discussion of process management. A process is
a single task a computer is trying to fulfill. Computer operating
systems can approach tasks in a number of ways. Two broad categories are:
- single tasking - the operating system can only do one thing
at a time
- multitasking - the operating system loads more than
one task at a time. Often, this is an illusion. In cooperative
multitasking, several tasks are loaded into memory and the processor
give a few nanoseconds to each one in turn until they
are done. In preemptive multitasking, the same thing happens,
except that more important tasks are given more time than less important
tasks.
Multiprocessing is mentioned. An operating system that supports
multiple processors can do real multitasking, assigning
different tasks to different processors.
As the operating system provides an interface between the user and the
hardware, drivers are programs that provide interfaces between
the operating system and hardware. When you install new hardware, it typically
comes with driver programs to install for various operating systems. Drivers
may be obtained from hardware manufacturer web sites, and from
operating system publisher web sites. Like applications, drivers
may be 16, 32, or 64 bit programs.
Another way to manage access to hardware is through the system BIOS
(Basic Input Output System). A keyboard is an example of a device that
is made available through the BIOS. The disadvantage to doing so
is that devices managed through the BIOS run more slowly than devices
managed by drivers, so keyboards are typically made available when you
start a computer by the BIOS, but a driver is loaded in Windows to provide
better, faster access.
You should be aware that Windows provides several tools to examine your
system and its performance.
- The Windows Desktop - be aware of the messages that appear
on the Task Bar and what the author calls the System Tray.
(Actually, most of the world calls it the System Tray. It is the area
in your task bar where the time is shown, along with icons for programs
and trouble messages about them. Microsoft calls this the Notification
Area. No one else does.)
- My Computer and Windows Explorer - folders and
files can be managed through these interfaces
- System Properties - access this through the Properties
of My Computer, or through the System program in Control
Panel. Several critical function are accessed from here. You can:
- View processor and memory information
- Change the name of the computer on the network
- Access Device Manager on the Hardware tab
- Control performance on the Advanced tab
- Switch System Restore on or off
- Use the Automatic Update tab to control updating
- Control Panel - just as the name implies, it provides controls
for many operating system features. Be aware of the two views of the
Control Panel: Classic and Category View.
- Device Manager - a graphical diagnostic aid that shows yellow
icons for hardware that is malfunctioning and red icons
for hardware that is disabled
- System Information - gives you detailed information
about installed components. Click Start, Run, then enter
msinfo32.exe (You don't have to type the .exe part.)
- Windows Help and the Microsoft Web Site - when wondering
what to do with a problem in Windows, try both of these sources. The
built-in help in Windows often checks online resources from Microsoft
when you have access to the Internet.
For some reason, the chapter fades into notes about common keyboard
commands in Microsoft compliant programs. You should be familiar with
several of them:
- Ctrl-x - cut the selected material to the clipboard
- Ctrl-c - copy the selected material to the clipboard
- Ctrl-v - insert whatever is on the clipboard at the
current cursor position
- Ctrl-z - a one-level undo (can also be activated by
alt-backspace)
|