chapter 2 how hardware and software work together

50
Chapter 2 How Hardware and Software Work Together

Upload: shyann-phemister

Post on 31-Mar-2015

236 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Chapter 2 How Hardware and Software Work Together

Chapter 2

How Hardware and Software Work

Together

Page 2: Chapter 2 How Hardware and Software Work Together

You Will Learn…

How hardware and software interact How system resources help hardware and

software communicate How an OS relates to BIOS, device drivers,

and applications Different ways an OS can launch applications

Page 3: Chapter 2 How Hardware and Software Work Together

Hardware and Software Interaction: An Overview

Page 4: Chapter 2 How Hardware and Software Work Together

Software

The intelligence of the computer Determines what hardware is present Decides how it is configured and used Uses hardware to perform tasks

Application software (Office package): does NOT control hardware directly

Page 5: Chapter 2 How Hardware and Software Work Together

Operating System (OS)

Controls hardware components that make up a computer

Provides an interface for users Stores, receives and manipulates files Runs applications

Page 6: Chapter 2 How Hardware and Software Work Together

Functions of an OS

Uses BIOS Manages secondary and primary storage Helps diagnose problems with hardware and

software Interfaces between hardware and software Performs tasks the user requests

Page 7: Chapter 2 How Hardware and Software Work Together

Available Operating Systems

DOS Windows 9x Windows NT,

Windows 2000, and Windows XP

Unix Linux OS/2 Mac OS

A computer might have several applications installed, but needs only one OS

Page 8: Chapter 2 How Hardware and Software Work Together

Categories of PC Software

BIOS and device drivers: used to interface with hardware and is installed on hard drive• ROM BIOS

• System BIOS: programs to control I/O devices• Startup BIOS: programs to control the startup of a

computer• CMOS setup: programs to change the setup info stored

in CMOS

Operating system Application software

Page 9: Chapter 2 How Hardware and Software Work Together

Categories of PC Software

Page 10: Chapter 2 How Hardware and Software Work Together

System Resourcestool used by either hardware or software to communicate with the other

READ bottom of page 45

Page 11: Chapter 2 How Hardware and Software Work Together

System Bus Components

Carries data

Communicates address (memory & I/O devices)

Controls communication

Page 12: Chapter 2 How Hardware and Software Work Together

ISA SlotsIndustry Standard Architecture

Used to be the ONLY bus on motherboard 8-bit ISA bus

• Older bus used on early PCs (1980s)• Had eight lines for data

16-bit• Provide more memory addresses, DMA channels,

and IRQs• Still used today

8 bit expansion card can use 16 bit slot—it only uses first part of the slot

Modem cards – typically 8 bit

Page 13: Chapter 2 How Hardware and Software Work Together

8-Bit ISA Bus

can carry either memory addresses or I/O address

Page 14: Chapter 2 How Hardware and Software Work Together

16-Bit ISA Bus

Read paragraph on page 48 and top of page 49

DEFINE multiplexing

Page 15: Chapter 2 How Hardware and Software Work Together

Interrupt Request Number (IRQ)

Line on a bus that a device needing service uses to alert the CPU

COM and LPT are preconfigured assignments of system resources that a device can use

DEFINE hardware interrupts

Page 16: Chapter 2 How Hardware and Software Work Together

IRQ Numbers

Read page 50

Page 17: Chapter 2 How Hardware and Software Work Together

Second Interrupt Controller Chip on 16-Bit ISA Bus

Page 18: Chapter 2 How Hardware and Software Work Together

How IRQs Are Assigned

DEMO on front machine

Page 19: Chapter 2 How Hardware and Software Work Together

Accessing Device Manager to View System Resources

DEFINE polling

Page 20: Chapter 2 How Hardware and Software Work Together

Memory Addresses

Number assignments for memory locations Hexadecimal numbers, often written in

segment:offset form, assigned to RAM and ROM so that the CPU can access both

Example: C800:5, which is 819,205 in decimal

DEFINE memory addresses

Page 21: Chapter 2 How Hardware and Software Work Together

Memory Addresses

Appendix C

Page 22: Chapter 2 How Hardware and Software Work Together

How the CPU Communicates Memory Addresses

Page 23: Chapter 2 How Hardware and Software Work Together

Division of Memory Under DOSExtended Memory

Upper Memory

Conventional/Base Memory

0

A0000

FFFFF100000

Range using Hex

0

640K

1024K

Memory addresses

DEFINE extended memory

Page 24: Chapter 2 How Hardware and Software Work Together

Assigning Memory Addresses

DEMO on front machine

Page 25: Chapter 2 How Hardware and Software Work Together

Shadowing ROM

Process of copying programs from ROM to RAM for execution

Page 26: Chapter 2 How Hardware and Software Work Together

I/O Addresses

Numbers the CPU can use to access hardware devices (much the same way as memory)

Also called port addresses or ports

Page 27: Chapter 2 How Hardware and Software Work Together

I/O Addresses

Page 28: Chapter 2 How Hardware and Software Work Together

IRQs and I/O Addresses

continued…Handout for students

Page 29: Chapter 2 How Hardware and Software Work Together

IRQs and I/O Addressesfor Devices

Page 30: Chapter 2 How Hardware and Software Work Together

DMA Channels

Provide a shortcut for a device to send data directly to memory, bypassing the CPU

READ page 580-3 for slower data transfer5-7 8-bit ISA can’t access

Page 31: Chapter 2 How Hardware and Software Work Together

How an OS Relatesto Other Software

All interaction between software and hardware is by way of the CPU

CPU operates in two modes:• 16-bit (real mode)

• 32-bit (protected mode)

OS must use same mode the CPU uses

Itanium CPU – 64 bit mode

Page 32: Chapter 2 How Hardware and Software Work Together

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

Real mode• Single-tasking (one application running)

• 16-bit data path; 1 MB of memory addresses

Protected mode• Multitasking (more than one application running)

• 32-bit data data path; at least 4 GB of memory addresses

• OS manages access to RAM and does not allow a program direct access to it

DEFINE memory extender

Page 33: Chapter 2 How Hardware and Software Work Together

Real Mode

Page 34: Chapter 2 How Hardware and Software Work Together

Protected Mode

DEFINE virtual memorypage/swap file

Page 35: Chapter 2 How Hardware and Software Work Together

Real Mode and Protected Mode Compared

DEFINE preemptive multitaskingHandout worksheet

Page 36: Chapter 2 How Hardware and Software Work Together

How an OS Uses Real and Protected Modes

OS must be in sync with the CPU Applications must be compiled to run in either

real or protected mode Hybrid of real and protected mode used by

older software written for Windows 3.x

READ page 61

Page 37: Chapter 2 How Hardware and Software Work Together

General Types of Software That Run on PCs

16-bit DOS software• Designed to run in real mode as only program running and

expecting direct access to hardware

16-bit Windows software• Designed for Windows 3.x to run where other programs

might also be running

32-bit Windows software• Designed to run in protected mode with other software and

can be loaded into extended memory

DEFINE virtual real mode

Page 38: Chapter 2 How Hardware and Software Work Together

How an OS Uses System BIOS

Contains programming instructions to run simple hardware devices (eg, keyboard and floppy disk drive)

Can be used to access the hard drive• OS has choice of using system BIOS or device drivers

• Device driver is used most often (faster-executes from RAM)

Stored on ROM chips

Page 39: Chapter 2 How Hardware and Software Work Together

How an OS Uses System BIOS

READ paragraph on page 63

Page 40: Chapter 2 How Hardware and Software Work Together

How an OS Uses System BIOS

READ tip on page 64

Page 41: Chapter 2 How Hardware and Software Work Together

How Device Drivers Control Hardware

Stored on the hard drive Usually written for a particular OS Serve same function as BIOS programs

Page 42: Chapter 2 How Hardware and Software Work Together

Device Drivers

2 kinds:

• 16 bit real mode

• 32 bit protected mode

Win9x supports both

WinNT/2000/XP only supports 32 bit

Page 43: Chapter 2 How Hardware and Software Work Together

Device Drivers

READ bottom page 65 to page 68

Page 44: Chapter 2 How Hardware and Software Work Together

Windows 9x Device Drivers

HANDOUT worksheet

Page 45: Chapter 2 How Hardware and Software Work Together

Device Drivers underWindows 2000

Uses only 32-bit drivers

Page 46: Chapter 2 How Hardware and Software Work Together

How an OS Launches Applications

Applications depend on an OS to: • Provide access to hardware resources

• Manage its data in memory and secondary storage

• Perform many background tasks

Page 47: Chapter 2 How Hardware and Software Work Together

Loading Application Software Using the Windows Desktop

From the Start menu Shortcut icon on the desktop Run dialog box Windows Explorer or My Computer

Page 48: Chapter 2 How Hardware and Software Work Together

Using a Shortcut Icon

Page 49: Chapter 2 How Hardware and Software Work Together

Using the Run Dialog Box to Execute Software

Page 50: Chapter 2 How Hardware and Software Work Together

Chapter Summary

How operating system software controls several significant hardware devices

How an OS provides the interface that applications need to command and use hardware devices