Chapter 2

36
2 CHAPTER How Hardware and Software Work Together omputer systems contain both hardware and software, and computer technicians must understand how they work together. Although the physical hardware is the visible part of a computer system, the software is the intelligence of the system that enables the hardware compo- nents to work. In the last chapter, you were introduced to the different hardware devices. In this chapter, you’ll learn about the different oper- ating systems, what they do, and how they work to control several of the more significant hardware devices. You’ll also see how an OS provides the interface that users and applications need to command and use hardware devices. In this chapter, you will learn: About operating systems, what they are, and what they do How an OS interfaces with users, applications, and hardware How system resources help hardware and software communicate C 41 may be reproduced without prior permission in writing from Course Technology.Some of the product names and company names have been used for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers. Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

description

How Hardware & Software Work Together

Transcript of Chapter 2

Page 1: Chapter 2

2CHAPTER

How Hardware and SoftwareWork Together

omputer systems contain both hardware andsoftware, and computer technicians must

understand how they work together. Althoughthe physical hardware is the visible part of acomputer system, the software is the intelligenceof the system that enables the hardware compo-nents to work. In the last chapter, you wereintroduced to the different hardware devices. Inthis chapter, you’ll learn about the different oper-ating systems, what they do, and how they work

to control several of the more significant hardware devices. You’ll also see how an OSprovides the interface that users and applications need to command and usehardware devices.

In this chapter, you will learn:

• About operating systems, whatthey are, and what they do

• How an OS interfaces with users,applications, and hardware

• How system resources helphardware and softwarecommunicate

C

41

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 2: Chapter 2

Introducing Operating Systems

An operating system (OS) is software that controls a computer. It manages hardware,runs applications, provides an interface for users, and stores, retrieves, and manipu-lates files. In general, an operating system acts as the middleman between applica-tions and hardware (see Figure 2-1).

PrinterRAM Hard drive

CPU

ROM BIOS

Hardware

Application

(MS Word)

Operating system (Windows XP)

Figure 2-1 Users and applications depend on the OS to relate to all hardware components

Several applications might be installed on a computer to meet various user needs,but it only needs one operating system. The following operating systems on the mar-ket are each designed to support different types of hardware systems and user needs:

� DOS. DOS, the disk OS, was the first OS among IBM computers and IBM-compatible computers. Because DOS was written for early PCs, it has signifi-cant limitations today. DOS was the OS used by early versions of Windows,including Windows 3.1 and Windows 3.11 (collectively referred to as Windows3.x). Windows 3.x did not perform OS functions, but simply served as a user-friendly intermediate program between DOS, applications, and the user.

� Windows 9x. Other early OSs that use a DOS core are Windows 95, Windows98, and Windows Me, collectively called Windows 9x. These are true operatingsystems with a DOS core that provide a user-friendly interface. Even thoughWindows XP is expected to replace Windows 9x, Windows 98 is still the mostpopular OS for desktop computers for home use. (Many people chose not toupgrade from Windows 98 to Windows Me because they did not consider it asignificant enough upgrade.)

� Windows NT, Windows 2000, and Windows XP. Windows NT comes in twoversions: Windows NT Workstation for workstations, and Windows NT Serverto control a network. Windows 2000 is an upgrade of Windows NT, and Win-dows XP is an upgrade of Windows 2000. Windows 2000 also comes in severalversions, some designed for the desktop and others designed for high-endservers. Windows 2000 Professional is popular as an OS for the corporatedesktop. Windows 2000 Server, Advanced Server, and Datacenter Server are

A+OS1.1

42 CHAPTER 2 How Hardware and Software Work Together

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 3: Chapter 2

network server OSs. Windows XP also currently comes in several versions. Thetwo most popular versions for desktop PCs are Windows XP Home andWindows XP Professional.

� Unix. Unix is a popular OS used to control networks and to support applica-tions used on the Internet.

� Linux. Linux is a scaled-down version of Unix that is provided, in basic form,free of charge; it includes open access to the programming code of the OS. It isoften used for server applications.

� OS/2. OS/2, developed by IBM and Microsoft, is less common for home desk-top PCs, but is used in certain types of networks. Microsoft developed Win-dows NT using some of the core components of OS/2 and intended it toreplace OS/2.

� Mac OS. Mac OS is available only for Apple Macintosh computers and is oftenused for graphics applications and in educational settings.

Every operating system has two main internal components: the shell and the kernel(see Figure 2-2). A shell is the portion of the OS that relates to the user and to appli-cations. The shell provides a command, menu, or icon interface to the user using vari-ous interface tools such as Windows Explorer, the Control Panel, or My Computer.

Hardware

User

Core or Kernel

Operating System

Configuration filesThe registry

Configuration dataUser interface tools

Shell

Applications

Figure 2-2 Inside an operating system, different components perform various functions

An operating system needs a place to keep hardware and software configurationinformation, user preferences, and application settings that are used when the OS isfirst loaded and are accessed as needed by hardware, applications, and users. Thisinformation can be kept in a database or text files. Windows uses a database calledthe registry for most of this information. In addition, some data is kept in text filescalled initialization files, which often have an .ini or .inf file extension.

Introducing Operating Systems 43

2A+OS1.1

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 4: Chapter 2

What an Operating System Does

Recall that an OS manages hardware, runs applications, provides a user interface,and manages files and folders. We now look at how an OS functions in each of thesefour major areas.

An OS Provides a User Interface

When a PC is first turned on, the operating system is loaded. After the OS is in con-trol, it either automatically executes a program or turns to the user for its nextinstruction. If you are working with the OS, you see an interface on the monitorscreen. This interface can be command-driven, menu-driven, or icon-driven.

Command-Driven Interfaces

With a command-driven interface, you type commands to tell the OS to performoperations. Computer technicians who are good typists and are very familiar withDOS-like commands often prefer this kind of OS interface. For example, to access acommand-driven interface using Windows XP, click the Start button on the Win-dows taskbar, point to All Programs, point to Accessories, and then click CommandPrompt. You will learn to use a Command Prompt window in Chapter 3.

Menu-Driven Interfaces

Some OSs allow you to choose from a list of options displayed on the screen. Anexample of such a menu-driven interface is Windows Explorer in Windows XP. Fromthe drop-down menus, you can format disks, rename files, copy and delete files, andperform many other operations to manage files and storage devices (see Figure 2-3).Note that Windows Explorer uses icons as well as menus.

Icon-Driven Interfaces

Today’s OSs are more likely to use an icon-driven interface than a command-drivenone. With an icon-driven interface, sometimes called a graphical user interface (GUI),you perform operations by selecting icons (or pictures) on the screen. When an OS isfirst executed, the initial screen that appears, together with its menus, commands,and icons, is called the desktop. Just about all OSs today offer a combination ofmenu and icon-driven interfaces such as Windows Explorer, shown in Figure 2-3.

44 CHAPTER 2 How Hardware and Software Work Together

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 5: Chapter 2

Figure 2-3 A menu-driven interface: Explorer in Windows XP

An OS Manages Files and Folders

An operating system is responsible for storing files and folders on a secondary stor-age device such as a CD, floppy disk, or hard drive, using organizational methodscalled a file system. Windows uses several different file systems; the most popular areFAT and NTFS. The FAT file system is named after the file allocation table (FAT), atable on a hard drive or floppy disk that tracks the locations of files on a disk. Themost recent version of FAT, FAT32, is a more efficient method of organization forlarge hard drives than FAT16 (the earlier version). The New Technology file system(NTFS) is supported by Windows NT/2000/XP and is designed to be used on harddrives to provide greater security and support more data than the FAT file system.

A floppy disk or hard drive is composed of tracks, which are con-centric circles on the disk surface, shown in Figure 2-4. Each track isdivided into several segments, each called a sector. A cluster, thesmallest unit of space on a disk for storing data, is made up of one ormore sectors. A file system, either FAT or NTFS, tracks how theseclusters are used for each file stored on the disk.

A+OS1.11.4

✔✔ A+ EXAM TIPThe A+ OS exam expectsyou to know all the keyterms in this section.

What an Operating System Does 45

2

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 6: Chapter 2

One sector

One track

Figure 2-4 A hard drive or floppy disk is divided into tracks and sectors. Several sectorsmake one cluster.

Files and Directories

Regardless of the file system used, every OS manages a hard drive by usingdirectories (Windows calls these folders), subdirectories, and files. A directory table isa list of files and subdirectories. When a hard drive is first installed and formatted,there is a single directory table on the drive called the root directory. For logical driveC, the root directory is written as C:\.

A physical hard drive can be divided into logical drives, sometimes called volumes, such as driveC or drive D.

As shown in Figure 2-5, this root directory can hold files or other directories,which can have names such as C:\Tools. These directories, called subdirectories, childdirectories, or folders, can, in turn, have other directories listed in them.Any directory can have files and other directories listed in it, for example,C:\wp\data\myfile.txt in Figure 2-5. The C: identifies the logical drive. If a directoryis on a floppy disk, either A: or B: identifies it. When you refer to the drive and direc-tories pointing to the location of the file, as in C:\wp\data\myfile.txt, the drive anddirectories are called the path to the file. The first part of the file before the period iscalled the filename (myfile), and the part after the period is called the file extension(txt), which, for Windows and DOS, always has three characters or fewer. The fileextension identifies the file type, such as .doc for Microsoft Word document filesor .xls for Microsoft Excel spreadsheet files.

46 CHAPTER 2 How Hardware and Software Work Together

A+OS1.11.4

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 7: Chapter 2

Files

C:\

Hard drive

Files

C:\Tools

Files

C:\WP

Files

C:\Lotus

Files

C:\WP\Data

FilesMyfile.txt

C:\WP\Backup

Files

Rootdirectory

Childdirectories

orsubdirectories

Figure 2-5 A hard drive is organized into groups of files stored in directories. The first directory iscalled the root directory. All directories can have child directories or subdirectories. UnderWindows, a directory is called a folder.

Partitions and Logical Drives on a Hard Drive

A hard drive is organized into one or more partitions. A partition can be a primarypartition or an extended partition (see Figure 2-6). A primary partition can have onelogical drive and an extended partition can have one or more logical drives. Mosthard drives have one primary partition with one logical drive in it called drive C:,and one extended partition that can have one or more logical drives such as drive D:and drive E:. Each logical drive, sometimes called a volume, is formatted using itsown file system. For example, if a hard drive is divided into two logical drives, driveC: might be formatted using the FAT32 file system and drive D: might use the NTFSfile system. Each logical drive has its own root directory and subdirectories. You willlearn more about logical drives and volumes in Chapter 8.

What an Operating System Does 47

2A+OS1.11.4

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 8: Chapter 2

Each logical drivehas its own FAT and

directory table

Hard drive

Partitions(Primary or extended)

Logical drives(Drive C, D, or E)

Directory(C:\)

Subdirectory(C:\Data)

Files

Data

Figure 2-6 A hard drive is divided and organized at several levels

An OS Manages Applications

An operating system is responsible for managing all other software on the PC, includ-ing installing and running applications. An application depends on an OS to provideaccess to hardware resources, manage its data in memory and in secondary storage,and perform many other background tasks. For example, consider a situation inwhich Windows XP loads and executes an application. The application cannot runor even load itself without Windows XP, much as a document cannot be edited with-out a word-processing program. Windows XP stays available to the application forthe entire time the application is running. The application passes certain functions toWindows XP, such as reading from a CD-ROM or printing.

An application written to work with one OS, such as Windows XP, does not neces-sarily work with another, such as a Macintosh system, with some exceptions. Forinstance, Windows 9x is written so that any application designed to work with DOSor Windows 3.x also works with Windows 9x, an early selling point for Windows9x. However, to take full advantage of an operating system’s power and an applica-tion’s power, buy application software written specifically for your OS.

Application software is downloaded from the Internet or comes written onCD-ROMs or floppy disks; usually it must be installed on a hard drive in order torun. During the installation, the install program creates folders on the hard drive and

48 CHAPTER 2 How Hardware and Software Work Together

A+OS1.11.4

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 9: Chapter 2

copies files to them. For Windows, it also makes entries in the Windows registry, andit can place icons on the desktop and add entries to the Start menu. Because theinstall program does all the work for you, installing a software package usually isvery easy. Installing software is covered in later chapters.

Loading Application Software Using the Windows Desktop

Once an application is installed, Windows NT/2000/XP and Windows 9x offer fourways to execute, or load, software:

� Use a shortcut icon. Place a shortcut icon directly on the desktopfor the applications you use often and want to get to quickly.These shortcuts contain the command line used to execute theapplication. To view this command line, right-click an applicationicon on the desktop to open a shortcut menu. On the shortcutmenu, select Properties. The icon’s Properties dialogbox appears(see Figure 2-7). In this dialog box, you can view the completecommand line that the icon represents. Chapter 12 explains howto create shortcuts for Windows.

� Use the Start menu. Click the Start button, select Programs (or All Programs inWindows XP), and then select the program from the list of installed software.

� Use the Run command. Click the Start button, and then click Run to displaythe Run dialog box (see Figure 2-8). In this dialog box, enter a command lineor click Browse to search for a program file to execute.

Shortcut icon

Shortcut Propertiesdialog box

Taskbar

Desktop

Path to program file

Figure 2-7 Windows has icons on the desktop that point to program files on the hard drive

✔✔ A+ EXAM TIPThe A+ OS exam oftenexpects you to know morethan one way to do some-thing. Knowing the fourways to load an applicationis a good example.

What an Operating System Does 49

2

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 10: Chapter 2

Command line

Use Browse to search fora program file

Figure 2-8 The Windows Run dialog box allows you to enter DOS-like commands

� Use Windows Explorer or My Computer. Execute a program or launch anapplication file by double-clicking the filename in Windows Explorer orMy Computer.

APPLYING CONCEPTSPractice the last three ways listed to load an application. Use Microsoft Paint as your sampleapplication. The program file is Mspaint.exe. Execute the application by using the Start menu,using the Run dialog box, and using Windows Explorer.

Real (16-Bit) and Protected (32-Bit) Operating Modes

The CPU operates in two modes: 16-bit or 32-bit, which are sometimes called realmode and protected mode. There are several differences between these two modes,but fundamentally, in 16-bit mode, or real mode, the CPU processes 16 bits of dataat one time, and in 32-bit mode, or protected mode, it processes 32 bits at a time.

Two processors that operate in 64-bit mode are the Intel Itanium and the AMD Opteron. Win-dows XP 64-bit Edition is designed to use this type of processor.

In real mode, an application has complete access to all hardware resources, but inprotected mode, the OS controls how an application can access hardware. In pro-tected mode, more than one program can run at the same time, which is a type ofmultitasking. In protected mode, the OS provides to each program a limited and con-trolled access to hardware resources. Here lies the meaning behind the two terms,real and protected. Real mode means that the software has “real” access to the hard-ware; protected mode means that more than one program can be running, and eachone is “protected” from other programs accessing its hardware resources.

Even after protected mode became available, hardware and software needed to bebackward-compatible (able to support older technology), so today’s CPUs and operat-ing systems still support real mode. In fact, the CPU starts in real mode and must betold to switch to protected mode. For this reason, an OS starts in real mode andcommands the CPU to switch to protected mode before allowing user interaction orloading an application. DOS and the MS-DOS mode of Windows 9x operate in realmode. Windows 9x and Windows NT/2000/XP start in real mode and then switch to

50 CHAPTER 2 How Hardware and Software Work Together

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 11: Chapter 2

protected mode. In protected mode, the OS allots CPU time to an application for aspecified period and then preempts the processing to give the CPU to another applica-tion, in a process called preemptive multitasking. The end result is that the computerappears to be multitasking when it really is not. Windows 95 was the first version ofWindows to provide preemptive multitasking.

16-Bit and 32-Bit Software Software written for Windows 3.xare called 16-bit Windows software. Data access is 16 bits at a time,and each program is written so that it should not infringe on theresources of other programs that might be running. Software pro-grams written for Windows 95 and later Windows OSs are called32-bit programs. Nearly all software written today is 32-bit or 64-bit (for the Itani-ums and Opterons) although 16-bit software still exists, and youmust know how to support it in a Windows environment. This

16-bit, 32-bit, and 64-bit software can be applications or device drivers. The nextsection explains what a device driver is, and you will learn more about supporting16-bit applications and drivers in Chapter 12.

An OS Manages Hardware

An operating system is responsible for communicating with hardware, but the OSdoes not relate directly to the hardware. Rather, the OS uses device drivers or theBIOS to interface with hardware. Figure 2-9 shows these relationships. Therefore,most PC software falls into three categories:

� Device drivers or the BIOS� Operating system� Application software

Device drivers are small programs stored on the hard drive that tell the computerhow to communicate with a specific hardware device such as a printer, networkcard, or modem. These drivers are installed on the hard drive when the device isfirst installed.

Recall from Chapter 1 that the basic input/output system (BIOS) on the mother-board is hard-coded or permanently coded into a computer chip called the ROMBIOS chip. BIOS programs fall into three categories: programs to control I/O devices(called system BIOS), programs to control the startup of a computer (called startupBIOS), and a program to change the setup information stored in CMOS (calledCMOS setup). Next we look at how an OS uses device drivers and the BIOS tomanage hardware.

✔✔ A+ EXAM TIPThe A+ OS exam expectsyou to know how to installand run legacy 16-bit soft-ware. This section gives youthe foundational conceptsof 16-bit software to betterprepare you to support it.

What an Operating System Does 51

2

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 12: Chapter 2

Operating system

Hard drive

Operating system

ApplicationsUser

Kernel

Devicedrivers

Devicedrivers

SystemBIOS

Videocard

Floppy diskdrive

BIOS

Figure 2-9 An OS relates to hardware by way of BIOS and device drivers

How an OS Uses Device Drivers

Device drivers are software designed to interface with specific hardware devices.They are stored on the hard drive and installed when the OS is first installed or whennew hardware is added to a system. The OS provides some device drivers, and themanufacturer of the specific hardware device with which they are designed to inter-face provides others. In either case, unlike BIOS, device drivers are usually written fora particular OS and might need to be rewritten for use with another.

When you purchase a printer, DVD drive, Zip drive, digital camera, scanner, orother hardware device, bundled with the device is a set of floppy disks or CDs thatcontain the device drivers (see Figure 2-10). You must install these device driversunder the operating system so it will have the necessary software to control thedevice. In most cases, you install the device and then install the device drivers. Thereare a few exceptions, such as a digital camera using a USB port to download pictures.Most often in this case, you install the software to drive the digital camera before youplug in the camera.

52 CHAPTER 2 How Hardware and Software Work Together

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 13: Chapter 2

Figure 2-10 A device such as this CD-ROM drive comes packaged with its device drivers stored on afloppy disk or other media. Alternately, you can use device drivers built into the OS.

Device drivers come from a number of sources. Some come with and are part of the operatingsystem, some come with hardware devices when they are purchased, and some are provided fordownloading over the Internet from a device manufacturer’s Web site.

There are two kinds of device drivers: 16-bit real-mode drivers and 32-bit pro-tected-mode drivers. Windows 95 and Windows 98 support both, but Windows Meand Windows NT/2000/XP use only 32-bit drivers. Windows 9x andWindows 2000/XP provide hundreds of 32-bit drivers for many different kinds ofdevices, and device manufacturers also provide their own 16- or 32-bit drivers, whichcome bundled with the device or can be downloaded from the device manufacturer’sWeb site.Device Drivers Under Windows 2000/XP Before installing a new hardwaredevice on a Windows 2000/XP system, always check the hardware compatibility list(HCL) to determine if a driver will work under Windows 2000/XP. Go to thisMicrosoft Web site and search for your device:www.microsoft.com/whdc/hcl/search.mspx

Windows 2000/XP and Windows 9x keep information about 32-bit drivers in theWindows registry, a database of hardware and software settings, Windowsconfiguration settings, user parameters, and application settings.

What an Operating System Does 53

2

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 14: Chapter 2

Sometimes, to address bugs, make improvements, or add features, manufacturersrelease device drivers that are more recent than those included with Windows or bun-dled with the device. Whenever possible, it is best to use the latest driver available fora device provided by the device manufacturer. You can usually download theseupdated drivers from the manufacturer’s Web site. You will learn how to install,update, and troubleshoot drivers in later chapters.

APPLYING CONCEPTSSuppose you have just borrowed an HP 995c Deskjet printer from a friend, but you forgot toborrow the CD with the printer drivers on it. You can go to the Hewlett-Packard Web site(www.hp.com), download the drivers to a folder on your PC, and install the driver under Win-dows. Figure 2-11 shows you a Web page from the site listing downloadable drivers for inkjetprinters. Search the HP site and find the driver for your HP 995c borrowed printer.

Figure 2-11 Download the latest device drivers from a manufacturer’s Web site

Device Drivers Under Windows 9x Windows 9x comes with 32-bit drivers for hu-ndreds of hardware devices. However, Windows does not provide drivers for all old-er devices, so a system might sometimes need to use an older 16-bit real-mode device

54 CHAPTER 2 How Hardware and Software Work Together

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 15: Chapter 2

driver. These 16-bit drivers are loaded by entries in the Config.sys, Autoexec.bat, and System.ini files, text files used to configure DOS and Windows 3.x that Windows 95and Windows 98 support for backward compatibility. In Chapter 12, you will learnhow to install 32-bit and 16-bit drivers under Windows 9x.

Under DOS, a program such as a device driver that stays in memory until the CPU needs it iscalled a terminate-and-stay-resident (TSR) program. The term is seldom used today, exceptwhen talking about real-mode programs.

How an OS Uses System BIOS to Manage Devices

The OS communicates with simple devices, such as floppy drives or keyboards,through system BIOS. In addition, system BIOS can be used to access the hard drive.An OS has a choice of using system BIOS or device drivers to access a device. Mostoften it uses device drivers because they are faster. The trend today is to use devicedrivers rather than the BIOS to manage devices.

There is a good way to determine whether the BIOS or a device driver is controlling a device.If the device is configured using CMOS setup, most likely system BIOS controls it. If the deviceis configured using the OS, most likely a driver controls it. Sometimes you can use the WindowsSystem Information or Device Manager utilities to find out the name of a driver controllinga device.

For example, in Figure 2-12, the setup main menu for an Award BIOS system letsyou configure, or set, the system date and time, the Supervisor Password (power-onpassword), floppy disk drives, the hard drive, and the keyboard. Figure 2-13 showsanother setup window for this same BIOS that can configure serial ports, an infraredport, and a parallel port. System BIOS can control all these devices. On the otherhand, there is no setup window in this BIOS to control the DVD drive or Zip driveinstalled on this system. The BIOS is not aware of these devices; this means they arecontrolled by device drivers.

CMOS setup windows are accessed during startup. A system displays a message at the bottom ofthe screen saying something like, “Press Del to enter setup.” Pressing the indicated keylaunches a program stored on the ROM BIOS microchip to change the contents of CMOS RAM.This BIOS setup program provides windows like those in Figures 2-12 and 2-13.

What an Operating System Does 55

2

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 16: Chapter 2

Award BIOS Setup Utility

Advanced Power Boot ExitMain

System TimeSystem DateLegacy Diskette ALegacy Diskette BFloppy 3 Mode Support

Primary MasterPrimary SlaveSecondary MasterSecondary SlaveKeyboard Features

LanguageSupervisor PasswordUser PasswordHalt OnInstalled Memory

Item Specific Help

<Enter> to select field;<+>, <–> to change value

F1ESC

–/+Enter

F5F10

HelpExit

Select ItemSelect Menu

Change ValuesSelect Sub Menu

[11:42:09][04/04/2000][1.44M, 3.5 in.][None][Disabled]

[Auto][Auto][Auto][Auto]

[English][Disabled][Disabled][All Errors]128MB

Setup DefaultsSave and Exit

Figure 2-12 Use the BIOS setup main menu for Award BIOS to configure some of the devicescontrolled by system BIOS

Recall that the system BIOS is stored in ROM. Because access to RAM is fasterthan access to ROM, at startup a system might copy the system BIOS from ROM toRAM in order to improve performance. This practice is called shadowing ROM, orjust shadow RAM. Because the system BIOS is not used often, if CMOS setup givesyou the option, you might want to disable shadow RAM in order to conserve RAM.

Sometimes a system becomes unstable (crashes at unexpected times). If your CMOS setup givesyou the option, one thing you can try to stabilize the system is to disable shadow RAM.

An OS uses BIOS or device drivers to manage hardware devices. The BIOS ordriver communicates with a device by way of system resources on the motherboard.We next look at these resources and how they work.

56 CHAPTER 2 How Hardware and Software Work Together

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 17: Chapter 2

Award BIOS Setup Utility

Onboard FDC Swap A & BFloppy Disk Access Control

Onboard Serial Port 1:Onboard Serial Port 2:UART2 Use Infrared

Onboard Parallel Port:Parallel Port Mode:ECP DMA Select:

Item Specific Help

<Enter> to select ifswitch drive letterassignments or not.

F1ESC

–/+Enter

F5F10

HelpExit

Select ItemSelect Menu

Change ValuesSelect Sub Menu

Advanced

[No Swap][R/W]

[3F8H/IRQ4][2F8H/IRQ3][Disabled]

[378H/IRQ7][ECP + EPP][3]

I/O Device Configuration

Setup DefaultsSave and Exit

Figure 2-13 Use this Award BIOS setup window to configure several I/O devices, including the serial,parallel, and infrared ports

System Resources

A system resource is a tool used by either hardware or software to communicate withthe other. When BIOS or a driver wants to send data to a device (such as when yousave a file to the hard drive), or when the device needs attention (such as when youpress a key on the keyboard), the device or software uses system resources to commu-nicate. There are four types of system resources: memory addresses, I/O addresses,interrupt request numbers (IRQs), and direct memory access (DMA) channels.Table 2-1 lists these system resources used by software and hardware, anddefines each.

As Table 2-1 explains, all four resources are used for communication betweenhardware and software. Hardware devices signal the CPU for attention using anIRQ. Software addresses a device by one of its I/O addresses. Software looks at mem-ory as a hardware device and addresses it with memory addresses, and DMAchannels pass data back and forth between a hardware device and memory.

A+CORE1.4

System Resources 57

2

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 18: Chapter 2

System Resource Definition

IRQ A line of a motherboard bus that a hardware device can use to signal theCPU that the device needs attention. Some lines have a higher priority forattention than others. Each IRQ line is assigned a number (0 to 15) toidentify it.

I/O addresses Numbers assigned to hardware devices that software uses to send acommand to a device. Each device “listens” for these numbers and respondsto the ones assigned to it. I/O addresses are communicated on the addressbus.

Memory addresses Numbers assigned to physical memory located either in RAM or ROM chips.Software can access this memory by using these addresses. Memoryaddresses are communicated on the address bus.

DMA channel A number designating a channel on which the device can pass data tomemory without involving the CPU. Think of a DMA channel as a shortcutfor data moving to and from the device and memory.

Table 2-1 System resources used by software and hardware

All four system resources depend on certain lines on a bus on the motherboard (seeFigure 2-14). A bus such as the system bus has three components: the data bus car-ries data, the address bus communicates addresses (both memory addresses and I/Oaddresses), and the control bus controls communication (IRQs and DMA channelsare controlled by this portion of the bus). Let’s turn our attention to a more detaileddescription of the four resources and how they work.

CPU

Data busData bus and address bus lines

carry bits in parallel, all linesworking together

Lines on the control buswork independently of

each other

Addressbus

Controlbus

Figure 2-14 A bus consists of a data bus, an address bus, and a control bus

58 CHAPTER 2 How Hardware and Software Work Together

A+CORE1.4

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 19: Chapter 2

Interrupt Request Number (IRQ)

When a hardware device needs the CPU to do something—for instance, when thekeyboard needs the CPU to process a keystroke after a key has been pressed—thedevice needs a way to get the CPU’s attention, and the CPU must know what to doonce it turns its attention to the device. These interruptions to the CPU are calledhardware interrupts, and the device initiates an interrupt by placing voltage on thedesignated interrupt request (IRQ) line assigned to it. This voltage on the line servesas a signal to the CPU that the device has a request that needs processing. Often, ahardware device that needs attention from the CPU is referred to as “needing servic-ing.” Interrupts initiate many processes that the CPU carries out, and these processesare said to be “interrupt-driven.”

Early motherboards had eight IRQ lines. Table 2-2 lists common uses for theseeight IRQs. IRQ 2 was reserved in the early days of PCs because it was intended tobe used as part of a link to mainframe computers, and IRQs 0 and 1 are always inuse by the system clock and keyboard. Thus, only five IRQs were available fordevices, and each device had to have its own IRQ. This made it difficult for morethan five devices to be connected to a PC at any one time.

IRQ Device

0 System timer (system clock)

1 Keyboard controller

2 Reserved (not used)

3 COM2

4 COM1

5 LPT2

6 Floppy drive controller

7 LPT1

Table 2-2 Common assignments for the first eight IRQs

In Table 2-2, notice the COM and LPT assignments. COM1 andCOM2 are preconfigured assignments that can be made to serialdevices such as modems, and LPT1 and LPT2 are preconfiguredassignments that can be made to parallel devices such as printers. Forexample, rather than being assigned an IRQ and some I/O addresses,the modem uses the assignments previously made to COM2, which

makes it easier to configure the modem and to avoid conflicts with other devices thatalso need an IRQ and some I/O addresses. You will learn more about COM and LPTassignments in Chapter 10.

A+CORE1.4

✔✔ A+ EXAM TIPThe A+ Core exam expectsyou to have Table 2-2memorized.

System Resources 59

2

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 20: Chapter 2

On motherboards, part of the chip set called the interrupt controller manages theIRQs for the CPU. The CPU actually doesn’t know which IRQ is “up” because theinterrupt controller manages that. If more than one IRQ is up at the same time, theinterrupt controller selects the IRQ that has the lowest value to process first. Forexample, if a user presses a key on the keyboard at the same time that she moves themouse configured to use COM1, the keystroke is processed before the mouse action,because the keyboard is using IRQ 1 and the mouse on COM1 is using IRQ 4. Thinkof the interrupt controller as the “inside man” with the CPU. All devices wait outsidethe door for the controller to let the CPU know what they need.

The interrupt controller on early motherboards was designed to handle only eightdifferent IRQs. In order to accommodate the need for more devices, a second groupof IRQs was later added (IRQs 8 through 15), and a second interrupt controller wasadded to manage these new IRQs.

This second controller did not have access to the CPU, so it had to communicatewith the CPU through the first controller (see Figure 2-15). To signal the first con-troller, the second controller used one of the first controller’s IRQ values (IRQ 2).These last eight IRQs plug into the system using IRQ 2. Because of this, theIRQ priority level became: 0, 1, (8, 9, 10, 11, 12, 13, 14, 15), 3, 4, 5, 6, 7.

CPU

Timer

Modem

To otherdevices

FirstIRQ

controller

Single interrupt lineto the CPU

Keyboard

Com2

Mouse

Com1

LPT2

Floppydrive

LPT1

Printer

SecondIRQ

controller

Figure 2-15 The second IRQ controller uses IRQ 2 to signal the first IRQ controller

60 CHAPTER 2 How Hardware and Software Work Together

A+CORE1.4

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 21: Chapter 2

To see how the IRQs are assigned on your computer, use MSD for DOS andDevice Manager for Windows 2000/XP and Windows 9x. (Windows NT does nothave Device Manager.) For Windows XP, click Start, right-click My Computer, andselect Properties on the shortcut menu. For Windows 2000, right-click My Computeron the desktop and select Properties on the shortcut menu. The System Propertiesdialog box appears. Click the Hardware tab and then click the Device Manager but-ton. (For Windows XP, see Figure 2-16.) On the menu, click View, and then clickResources by Type, if necessary. Click the plus sign next to Interrupt request (IRQ)to open the list of assigned IRQs. Notice in the figure that IRQs 9 and 11 are eachbeing shared by two devices.

To see current assignments in Windows 9x, click Start, point to Settings, click Con-trol Panel, and double-click System. Click the Device Manager tab, select Computer,and then click Properties. Figure 2-17 shows the Computer Properties dialog box.Notice that IRQ 2 is assigned to the programmable interrupt controller because it isbeing used to manage IRQs 8 through 15.

Figure 2-16 Use Device Manager to see how your system is using IRQs and other system resources

CORE1.4OS1.11.5

System Resources 61

A+CORE1.4OS1.11.5

2

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 22: Chapter 2

With interrupts, the hardware device or the software initiates communication bysending a signal to the CPU, but a device can be serviced in another way, calledpolling. With polling, software that is constantly running has the CPU periodicallycheck the hardware device to see if it needs service. Not very many devices usepolling as the method of communication; most hardware devices use interrupts. Ajoystick is one example of a device that does use polling. Software written to managea joystick has the CPU check the joystick periodically to see if the device has data tocommunicate, which is why a joystick does not need an IRQ to work.

Sharing IRQs is not possible with ISA devices on the ISA bus. However, newer buses are designedto allow more than one device to share an IRQ. In Chapter 5, you will see how the PCI and USBbuses do this.

IRQs 8 through 15cascade to IRQ 2

Figure 2-17 Windows 9x Device Manager shows current assignments for system resources

CORE1.4OS1.11.5

62 CHAPTER 2 How Hardware and Software Work Together

A+CORE1.4OS1.11.5

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 23: Chapter 2

Memory Addresses

An operating system relates to memory as a long list of cells that it can use to holddata and instructions, somewhat like a one-dimensional spreadsheet.Each memory location or cell is assigned a number beginning withzero. These number assignments are made when the OS is first loadedand are called memory addresses. Think of a memory address as aseat number in a theater (see Figure 2-18). Each seat is assigned anumber regardless of whether someone is sitting in it. The person sit-ting in a seat can be data or instructions, and the OS does not refer tothe person by name but only by the seat number. For example, theOS might say, “I want to print the data in memory addresses 500through 650.”

11 12 13 14Data Data

6 7 8 9 10

0 1 2 3 4 5ProgramProgram

Figure 2-18 Memory addresses are assigned to each location in memory, and these locations can storedata or instructions

Windows offers a calculator that can quickly convert numbers in binary, digital, and hexadeci-mal. Enter a number in one number system, and then click another number system to make theconversion. To access the calculator in Windows NT/2000/XP or Windows 9x, click Start,Programs, Accessories, and then Calculator.

A+CORE1.4

✔✔ A+ EXAM TIPOlder 16-bit device driversrequired a specified rangeof memory addresses, butnewer 32-bit drivers don’tcare what memory addressesthey use. When consideringthe system resources used bydevices, memory addresses are no longer considered.This is why the A+ Core examcovers only three systemresources: IRQs, I/Oaddresses, and DMA channels.

System Resources 63

2

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 24: Chapter 2

These addresses are most often displayed on the screen as hexadecimal (base 16 orhex) numbers in segment:offset form (for example, C800:5, which in hex is C8005and in decimal is 819,205). For more information on the hexadecimal number systemand how it applies to memory addresses, see Appendix C.

I/O Addresses

Another system resource made available to hardware devices is input/outputaddresses, or I/O addresses. I/O addresses, or port addresses, sometimes simply calledports, are numbers the CPU can use to access hardware devices, in much the sameway it uses memory addresses to access physical memory. The address bus on themotherboard sometimes carries memory addresses and sometimes carries I/Oaddresses. If the address bus has been set to carry I/O addresses, then each device “lis-tens” to this bus (see Figure 2-19). If the address belongs to it, then it responds; oth-erwise, it ignores the request for information. In short, the CPU “knows” a hardwaredevice as a group of I/O addresses. If it wants to know the status of a printer or afloppy drive, for example, it places a particular I/O address on the address bus onthe motherboard.

Harddrive

It’s mine!I’ll respond.

Not myaddress!

Harddrive

controller

Floppydrive

controllerNot myaddress!

Keyboardcontroller

Address lineson the bus

IOOIIO

OI

Floppy drive

Keyboard

CPU

Bus

CPU transmits anI/O address

3 The device that“owns” theaddress responds

4All I/O devicecontrollers listen fortheir addresses

2CPU turns up signal onbus that says,“I/O addresses are onthe address line”

1

Figure 2-19 I/O address lines on a bus work much like an old telephone party line; all devices “hear”the addresses, but only one responds

64 CHAPTER 2 How Hardware and Software Work Together

A+CORE1.4

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 25: Chapter 2

Table 2-3 lists a few common assignments for I/O addresses. Because theseaddresses are usually written as hex numbers, you sometimes see them written with0x first, such as 0x0040, or with the h last, like this: 0040h.

Because IBM made many address assignments when it manufac-tured the first PC in the late 1970s, common devices such as a harddrive, a floppy drive, or a keyboard use a range of predetermined I/Oaddresses that never change. Their BIOS is simply programmed to usethese standard addresses and standard IRQs. Legacy devices (devicesthat use older technologies) were designed to use more than onegroup of addresses and IRQ, depending on how jumpers or DIPswitches were set on the device. Newer devices, called Plug and Play

devices, can use any I/O addresses or IRQ assigned to them during the boot process.You will learn more about this in Chapter 10.

IRQ I/O Address Device

0 0040-005F System timer

1 0060-006F Keyboard controller

2 00A0-00AF Access to IRQs above 7

3 02F8-02FF COM2 (covered in Chapter 10)

3 02E8-02EF COM4 (covered in Chapter 10)

4 03F8-03FF COM1 (covered in Chapter 10)

4 03E8-03EF COM3 (covered in Chapter 10)

5 0278-027F Sound card or parallel port LPT2 (covered in Chapter 10)

6 03F0-03F7 Floppy drive controller

7 0378-037F Printer parallel port LPT1 (covered in Chapter 10)

8 0070-007F Real-time clock

9-10 Available

11 SCSI or available

12 0238-023F Motherboard mouse

13 00F8-00FF Math coprocessor

14 01F0-01F7 IDE hard drive (covered in Chapters 8 and 9)

15 0170-017F Secondary IDE hard drive or available (covered in Chapters 8 and 9)

Table 2-3 IRQs and I/O addresses for devices

✔✔ A+ EXAM TIPThe A+ Core exam expectsyou to memorize the firstI/O address in the I/Oaddress range for the moresignificant devices.

System Resources 65

A+CORE1.4 2

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 26: Chapter 2

DMA Channels

Another system resource used by hardware and software is a direct memory access(DMA) channel, a shortcut method that lets an I/O device send data directly to mem-ory, bypassing the CPU. A chip on the motherboard contains the DMA logic andmanages the process. Earlier computers had four channels numbered 0, 1, 2, and 3.Later, channels 5, 6, and 7 were added. DMA channel 4 is used as IRQ 2 was used,to connect to the higher IRQs. In Figure 2-20, note that DMA channel 4 cascadesinto the lower DMA channels.

8-bit data transferFaster 16-bit data transfer

but not available to 8-bit ISA devices

0 1 2 3 4 5 6 7

Figure 2-20 DMA channel 4 is not available for I/O use because it is used to cascade into the lower

Some devices, such as a printer, are designed to use DMA channels, and others,such as the mouse, are not. Those that use the channels might be able to use only acertain channel, say channel 3, and no other. Alternately, the BIOS might have theoption of changing a DMA channel number to avoid conflicts with other devices.Conflicts occur when more than one device uses the same channel. DMA channelsare not as popular as they once were, because their design makes them slower thannewer methods. However, slower devices such as floppy drives, sound cards, andtape drives might still use DMA channels.

OS Tools to Examine a System

You have learned about many hardware devices, OS components, and systemresources in this chapter. When installing new components or troubleshooting a sys-tem, it is important to know how to use OS tools to examine the system. This sectiondiscusses several of these tools.

A+CORE1.4

66 CHAPTER 2 How Hardware and Software Work Together

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 27: Chapter 2

Device Manager

Device Manager under Windows 2000/XP and Windows 9x is the primary tool usedto manage hardware devices. (Recall that Windows NT does not have a DeviceManager.)

To access Device Manager using Windows XP: Click Start, right-click MyComputer, and then select Properties on the shortcut menu. The Sys-tem Properties dialog box appears. Click the Hardware tab and thenclick Device Manager.

To access Device Manager using Windows 2000: Right-click theMy Computer icon on the desktop, select Properties on the shortcutmenu, click the Hardware tab, and then click the DeviceManager button.To access Device Manager using Windows 9x: Right-click the My

Computer icon on the desktop, select Properties on the shortcut menu, and then clickthe Device Manager tab.

The Device Manager dialog box for Windows XP is shown in Figure 2-21. Click aplus sign to expand the view of an item, and click a minus sign to collapse the view.To find out more information about a device, right-click the device and select Proper-ties on the shortcut menu. You can see the Properties dialog box for the video card inFigure 2-21.

Figure 2-21 Device Manager gives you information about devices

When a device is giving problems, check the Properties dialog box of that devicefor information. From this window you can also update the driver for a device,enable or disable a device, change a system resource assigned to a device, and unin-stall a device. The steps for performing these tasks are covered in later chapters.

A+OS1.53.2

✔✔ A+ EXAM TIPThe A+ OS exam expectsyou to be familiar with andknow how to use all threeutilities discussed in thissection.

OS Tools to Examine a System 67

2

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 28: Chapter 2

Earlier in the chapter you saw how to use Device Manager to view systemresources. You can get a printed report of system information using Device Manager,which can be useful to document the status of a system. To print the report usingWindows XP, click the printer icon on the Device Manager toolbar. There are threeoptions for the report: System summary, Selected class or device, and All devices andsystem summary.

System Information

The System Information utility gives information similar to that given by DeviceManager plus more. For example, it tells you the BIOS version you are using, thedirectory where the OS is installed, how system resources are used, informationabout drivers and their status, and much information about software installed on thesystem that is not included in Device Manager.

To run System Information using Windows 2000/XP or Windows 9x: Click Start,and then click Run. In the Run dialog box, enter Msinfo32.exe, and then click OK.The System Information dialog box appears (see Figure 2-22).

Figure 2-22 Use the Windows System Information utility to examine your system

68 CHAPTER 2 How Hardware and Software Work Together

A+OS1.53.2

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 29: Chapter 2

System Information can be useful when a system is having trouble starting. Use itto get a list of drivers that loaded successfully. If you have saved the System Informa-tion report when the system was starting successfully, comparing the two reports canhelp identify the problem device.

Microsoft Diagnostic Utility (MSD)

DOS and Windows 9x offered the Microsoft Diagnostic Utility (MSD), a utility use-ful for viewing information about the system, including information about memory,video, ports, device drivers, and system resources.

To load MSD using Windows 9x: Click Start, click Run, enter MSD.EXE in theRun dialog box, and then click OK. The MSD window appears (see Figure 2-23).You will practice using MSD in a project at the end of this chapter.

Figure 2-23 MSD opening screen

CHAPTER SUMMARY

� An operating system manages hardware, runs applications, provides an interfacefor users, and stores, retrieves, and manipulates files.

� Operating systems used for desktop computers include DOS, Windows 9x,Windows NT/2000/XP, Unix, a version of Unix called Linux, OS/2, and theMac OS.

CORE1.53.2

Chapter Summary 69

A+CORE1.53.2

2

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 30: Chapter 2

� Three types of software are BIOS (firmware) and device drivers, operating systems(OSs), and application software. Sometimes device drivers are considered part ofthe OS.

� Application software relates to the OS, which relates to BIOS and device drivers tocontrol hardware.

� A CPU can operate in real or protected mode. In real mode, a CPU processes 16bits at a time, and in protected mode, it processes 32 bits at a time.

� Device drivers are written using either 16-bit or 32-bit code. Most drivers todayare 32-bit, protected-mode drivers that Windows loads from the registry.

� Windows 95/98 loads older 16-bit device drivers from Autoexec.bat, Config.sys,or System.ini to be backward-compatible with DOS and Windows 3.x.

� From the Windows desktop, you can launch programs from the Start menu, ashortcut icon on the desktop, the Run dialog box, Windows Explorer, orMy Computer.

� Four system resources that aid the communication between hardware and soft-ware are I/O addresses, IRQs, DMA channels, and memory addresses.

� An IRQ is a line on a bus that a device needing service uses to alert the CPU.

� A DMA channel provides a shortcut for a device to send data directly to memory,bypassing the CPU.

� Memory addresses are hexadecimal numbers, often written in segment:offset form,assigned to RAM and ROM so that the CPU can access both.

� The CPU places a device’s I/O address on the address bus when it wants to initiatecommunication with the device.

� Software manages memory by means of memory addresses that point to locationsin RAM.

� COM and LPT are preconfigured assignments of system resources that a devicecan use. For example, COM1 is IRQ 4 and I/O addresses 03F8 through 03FF.

� Three Windows utilities useful for gathering information about a system areDevice Manager, System Information, and Microsoft Diagnostic Utility (MSD).

70 CHAPTER 2 How Hardware and Software Work Together

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 31: Chapter 2

KEY TERMS

For explanations of key terms, see the Glossary near the end of the book.

Autoexec.batchild directoryclusterCMOS setupConfig.sysdesktopdevice driverdirect memory access (DMA)

channeldirectory tablefile allocation table (FAT)file extensionfile systemfilenamefoldergraphical user interface (GUI)

hardware compatibility list (HCL)hardware interruptI/O addressinitialization filesinterrupt request (IRQ) linelogical drivememory addressmultitaskingNew Technology file system

(NTFS)operating system (OS)partitionpathpollingport addresspreemptive multitasking

protected modereal moderegistryroot directorysectorshadow RAM or shadowing ROMshellstartup BIOSsubdirectorysystem BIOSsystem resourceSystem.initerminate-and-stay-resident (TSR)trackvolume

REVIEWING THE BASICS

1. List four major functions of an OS.

2. List three well-known OSs.

3. Which operating system is only used on Apple Macintosh computers?

4. What is the latest Microsoft operating system for desktop computers?

5. Which operating system often used for server applications is a scaled-downversion of Unix?

6. Which file system is used by floppy disks?

7. What are two file systems used by hard drives?

8. Real mode operates using a(n) _____ -bit data path, and protected mode usesa (n) _____ -bit data path.

9. Which Microsoft operating system(s) support 16-bit device drivers or 32-bitdevice drivers?

10. Real mode allows programs direct access to _____, but protected mode does not.

11. List three text files that Windows 9x supports for loading device drivers inorder to remain backward-compatible with DOS and Windows 3.x.

Reviewing the Basics 71

2

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 32: Chapter 2

12. List three types of information that are kept in the Windows registry.

13. Device drivers loaded from Config.sys run in _____ mode.

14. Device drivers loaded from Autoexec.bat run in _____ mode.

15. List four ways to launch an application from the Windows desktop.

16. List four system resources that software uses to manage hardware.

17. What is the IRQ of the system timer?

18. What IRQ does COM2 use?

19. Which DMA channel is used to cascade into the lower four DMA channels?

20. How is a hardware interrupt initiated?

21. If memory addresses are used by the CPU to access memory, then what are I/Oaddresses used for?

22. What is the I/O address range for the keyboard?

23. Why are DMA channels not as popular as they once were withhigh-speed devices?

24. Name a device that uses polling in order to be serviced by the CPU.

25. Name one Windows 2000/XP and Windows 9x utility that allows you to seethe IRQ assignments made to devices.

THINKING CRITICALLY

1. Name one system resource that a video card most likely will not need.

2. Is a mouse more likely to be controlled by a device driver or by system BIOS?

3. Name one device that is likely to be controlled by system BIOS.

4. If your printer is giving you trouble, what is the best way to obtain an updatefor the device driver?

72 CHAPTER 2 How Hardware and Software Work Together

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 33: Chapter 2

HANDS-ON PROJECTS

PROJECT 2-1: Using the Windows 2000/XP System Information Utility

Using Windows 2000/XP, do the following to run the System Information utility andgather information about your system:

1. Click Start, click Run, and then type Msinfo32.exe in the Run dialog box. ClickOK. The System Information dialog box appears.

2. Browse through the different levels of information in this window and answerthe following questions:

a. What OS and OS version are you using?

b. What is your CPU speed?

c. What is your BIOS manufacturer and version?

d. How much RAM is installed on your video card? Explain how you gotthis information.

e. What is the name of the driver file that manages your parallel port? Yourserial port?

f. How is IRQ 10 used on your system? IRQ 4?

g. Which DMA channels are used on your system and how are they used?

PROJECT 2-2: Using a Freeware Diagnostic Utility

You can download many freeware diagnostic utilities from the Internet and use themto examine, troubleshoot, and benchmark a system. Do the following to downloadand use one utility to examine your system:

1. Go to the CNET Networks Web site at www.cnet.com and download the latestversion of Fresh Diagnose. Web sites change often, but at the time of this writ-ing, you would click Downloads, then Utilities & Drivers, and then Fresh Diag-nose 6.0. Save the utility to a folder on your hard drive named Downloads.

2. Double-click the file to execute the program and install the software. Whengiven the opportunity, choose to create a shortcut to the software onyour desktop.

3. Click the shortcut to run the Fresh Diagnose program.

4. Browse through the Fresh Diagnose menus and answer the same questionslisted in Project 2-1 for the Windows 2000/XP System Information utility.

Hands-on Projects 73

2HANDS-ON PROJECTS

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 34: Chapter 2

5. Compare the two programs, Fresh Diagnose and System Information, byanswering the following questions:

a. Which product is easier to use and why?

b. Which product gives more information about your system?

c. What is one advantage that System Information has over Fresh Diagnose?

d. What is one advantage that Fresh Diagnose has over System Information?

e. Which product do you prefer and why?

PROJECT 2-3: Using Microsoft Diagnostics with Windows 9x

DOS and Windows offer the Microsoft Diagnostics utility. This utility examines yoursystem, displaying useful information about ports, devices, memory, and the like.You can find the MSD.EXE utility in the \TOOLS\OLDMSDOS directory on yourWindows 9x installation CD. Using Windows Explorer, copy the utility to your harddrive and store it in a folder named \Tools.

For Windows 9x, boot your PC to an MS-DOS prompt in real mode. To boot intoreal mode, press Ctrl or F8 as you start the system. The Windows Startup menuappears. Select Command prompt only. From the DOS prompt, execute this com-mand: C:\TOOLS\MSD. The MSD window appears (shown earlier in Figure 2-23).

Browse carefully through all menu options of this utility and answer the followingquestions about your system:

1. List the following information or print the appropriate MSD screen that con-tains it: manufacturer; version number; and date of your system BIOS, videoBIOS, and mouse device driver.

2. What kind of video card is installed?

3. How much memory is currently installed on this PC?

4. What version of the OS is the PC running?

5. What CPU is the PC using?

Exit MSD. Save the information you noted to compare with the information thatyou will obtain from MSD in Windows 2000.

You need Windows 2000 installed on a PC to do the rest of this project:

1. Copy the MSD.exe program to a folder on your Windows 2000 PCnamed \Tools.

2. From within Windows 2000, open a command prompt. (Click Start, Programs,Accessories, and Command Prompt.)

74 CHAPTER 2 How Hardware and Software Work Together

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 35: Chapter 2

3. From the command prompt, start MSD using this command: \Tools\MSD.

4. Browse through all menu options and answer the same questions about yoursystem as you did for Windows 9x.

PROJECT 2-4: Using Device Manager

Using Device Manager under Windows 2000/XP or Windows 9x, answer the follow-ing questions about your computer. To access Device Manager using Windows2000/XP, open the System Properties dialog box, click the Hardware tab, and thenclick Device Manager. For Windows 9x, right-click the My Computer icon on thedesktop, select Properties on the shortcut menu, and click the Device Manager tab.

1. Does your computer have a network card installed? If so, what is the name ofthe card?

2. What three settings can you change under Device Manager?

3. What are all the hardware devices that Device Manager recognizes as present?

PROJECT 2-5: Examining CMOS Setup

Boot your PC and look for directions on the screen that tell you how to accessCMOS setup on your PC, such as “Press Del to enter setup.” Access CMOS setupand answer these questions:

1. What keystroke(s) did you use to access CMOS setup?

2. What BIOS does your motherboard use? (Include brand and version.)

3. List the different CMOS setup windows that you can access from the CMOSmain menu window.

4. Access the window that gives information about serial ports. What is the nameof that window?

5. What I/O addresses and IRQ does the first serial port use?

6. What I/O addresses and IRQ does the first parallel port use?

7. What are the system date and system time reported by CMOS setup?

8. What keys do you press to exit CMOS setup without saving any changes?

Exit CMOS setup without saving any changes you might have accidentally made.Your PC should then boot to the Windows desktop.

Hands-on Projects 75

2

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication

Page 36: Chapter 2

may be reproduced without prior permission in writing from Course Technology. Some of the product names and company names have beenused for identification purposes only and may be trademarks or registered trademarks of their respective manufactures and sellers.

Copyright © 2004 by Course Technology. All rights reserved.This publication is protected by federal copyright law. No part of this publication