computer system basics

34
1 Computer System Basics

Upload: newman

Post on 07-Jan-2016

46 views

Category:

Documents


0 download

DESCRIPTION

Computer System Basics. The System Unit. Bay - a shelf or opening used for the installation of electronic equipment System unit - houses the motherboard, power supply, and storage devices Case - empty box with just power supply. Overhead view of system unit. Computer Architecture. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Computer System Basics

1

Computer System Basics

Page 2: Computer System Basics

2

The System Unit

• Bay - a shelf or opening used for the installation of electronic equipment

• System unit - houses the motherboard, power supply, and storage devices

• Case - empty box with just power supply

Overhead view of system unit

Page 3: Computer System Basics

3

Computer Architecture

Page 4: Computer System Basics

4

Flow of Information

• The parts are connected to one another by a collection of wires called a bus

Page 5: Computer System Basics

Memory

• Memory is a collection of cells, each with a unique physical address for random (direct) access

• memory is divided into fixed-length units or words

• Information that is stored in memory cells is in binary coded format:– Instructions that make

up programs– Data: text symbols,

numbers, images, etc.

Page 6: Computer System Basics

6

Information Storage

• Kilobyte approx. 1000 bytes (actually 210 = 1024 bytes)

• Megabyte approx. 1,000,000 bytes (one million)

• Gigabyte approx. 1,000,000,000 bytes (one billion)

• Terabyte approx. 1 trillion bytes

• Petabyte approx. 1 quadrillion bytes

Page 7: Computer System Basics

7

Types of Memory

• Types of memory chips:

1 RAM2 ROM3 CMOS4 Flash

Page 8: Computer System Basics

8

Types of Memory

1 RAM - Random Access Memory, used to temporarily hold software instructions and data

2 ROM - Read-Only Memory, which cannot be written on or erased by the computer user. Contains fixed start-up instructions

3 CMOS - Complementary metal-oxide semiconductor; powered by a battery and thus doesn’t lose its contents when the power is off

4 Flash - can be erased and reprogrammed more than once

Page 9: Computer System Basics

9

Cache and Virtual Memory

• Cache - temporary storage for instructions and data that the processor is likely to use frequently, thus speeding up processing

• Level 1 (L1) cache - built into the microprocessor

• Level 2 (L2) cache - consists of RAM chips outside microprocessor

• Virtual memory - free hard-disk space used to extend the capacity of RAM

Page 10: Computer System Basics

10

Secondary Storage Devices

• Because most of main memory is volatile and limited, it is essential that there be other types of storage devices where programs and data can be stored when they are no longer being processed

• Secondary storage devices can be installed within the computer box at the factory or added later as needed

• Examples of secondary storage media:– Magnetic tape– Magnetic disk (hard disk or floppy disk)– Optical disk (such as CD ROM or DVD ROM)– Zip disks (a type of magnetic media)– External flash memory

Page 11: Computer System Basics

Magnetic Tape

• The first truly mass auxiliary storage device was the magnetic tape drive

• A magnetic tape drive is an example of sequential storage device– Tape must be rewound

or fast-forwarded to get to get the correct block under the read/write head (similar to tapes used to record music)

• In contrast, magnetic disk drives are direct access devices.

Page 12: Computer System Basics

Magnetic Disks

• A read/write head travels across a spinning magnetic disk, retrieving or recording data

• Each disk surface is divided into sectors and tracks

• Example of disk addressing scheme: surface 3, sector 5, track 4

Page 13: Computer System Basics

13

Compact Disks and DVD

• A CD drive uses a laser to read information stored optically on a plastic disk

• CD-ROM is Read-Only Memory

• DVD stands for Digital Versatile Disk– DVD-ROM - for reading only– DVD-R - for recording on once– For rewriting many times:

DVD-RW DVD-RAM DVD+RW

Page 14: Computer System Basics

14

Ports & Cables

• Types of ports:

1 Serial port 2 Parallel port3 SCSI port4 USB port5 Dedicated ports6 Infrared port

Page 15: Computer System Basics

15

Ports & Cables

• Serial port - sends bits one at a time, one after another– Used to connect a variety of “serial” devices– Sometimes used to connect mouse or keyboard

• Parallel port - transmits 8 bits simultaneously– Used most commonly for printers– Also used for other “parallel” devices such as external

hard drives, external CD drives, etc.– Being practically replaced with faster technologies such as

USB.• USB port– can theoretically connect up to 127 peripheral

devices daisy-chained to one general-purpose port

Page 16: Computer System Basics

16

Expandability: Buses & Cards

• Expansion slots- sockets on the motherboard into which you can plug expansion cards

• Expansion cards - circuit boards that provide more memory or that control peripheral devices

• Examples:– Graphics (video) cards– Network cards– Internal modems

Page 17: Computer System Basics

17

The Components of System Software

Operating system - the principal component of system software

Device drivers - help the computer control peripheral devices

Utility programs - support, enhance, or expand existing programs

Page 18: Computer System Basics

18

Structure of the OS

• The operating system shell includes the user interface (UI).

• Users only interact with the OS through the UI.

• The UI can be – Command/character-

based (e.g., DOS or UNIX)

– Graphical user interface (GUI), involving windows, menus, icons, etc.

kernel - program which remains in main memory while the computer is running, and directs other “nonresident” programs to perform tasks that support application programs

kernel

Page 19: Computer System Basics

19

What Is an Operating System?

• The operating system:– A collection of programs that help you use the computer.– Acts as a smart assistant that moves controls the flow of

information to various components and other programs.– Manages the usage, storage, and access of programs, data, and

processes.

Common Tasks Performed by the OS

Page 20: Computer System Basics

20

Main Operating System Functions

• Task management– preparing, scheduling, and monitoring of tasks for continuous

processing by the CPU• Memory management

– allocation of memory for various tasks; transfer of data and programs from external storage to memory and back; virtual memory management; cache management

• Device management– controlling flow of data to an from input/output devices, and

management of device drivers• File and data management

– controlling how files are created, accessed, organized, copied, and modified; controlling and managing the storage of data in external storage devices

• System monitoring– monitoring of system resources and devices; error detection and

recovery

Page 21: Computer System Basics

21

Task Management Concepts

• Multi-tasking: – Running more than one task (or process) simultaneously.– Each process “stealing” or sharing CPU time.– Such as playing a game while a large document is being

printed.– Each process is allocated a CPU time slice; at the end of

the time slice the process in “interrupted” and its “state” is saved until the CPU can come back to the process; CPU is then allocated to the next process on the queue.

• Context Switching: – Switching from one process or one user to another.– Such as from a word processor to a spreadsheet and back

again (both reside in RAM).

Page 22: Computer System Basics

22

Memory Management Concepts

• At any point in time memory is divided into a set of partitions, some empty and some allocated to running processes.

• A portion of the memory is always reserved for the operating system and other system processes.

• When a process is activated, its memory address (location of the first instruction in the program) and the total space (length) for the process are stored the CPU registers.

• This way, the CPU will know how to get back to the process as it switches among different running processes.

Page 23: Computer System Basics

23

Memory Management Concepts

• Cache memory– If the primary memory were as large as ever needed, the

following ideas would not be necessary.– Cache memory: Addresses the concerns of speed and

efficiency (two types). 1. Disk cache - saves the most frequently used parts of the

program being run or executed in the RAM memory - it will be there ready to go (very fast).

2. RAM disk - fools the program into thinking it is accessing the disk, but instead the needed information has been transferred to RAM (RAM is much faster than disk access).

Page 24: Computer System Basics

24

Memory Management Concepts

• Virtual Memory

– addresses the problem of a program (or multiple programs) being too big to fit into the available RAM. The operating system divides the program into pieces. The pieces are stored on the hard disk. The pieces are retrieved into RAM as needed.

– Disadvantage: This slows the system down, because retrieval of information from the disk is time consuming.

Page 25: Computer System Basics

25

File Management Concepts

• A file is a named collection of related data• A file system is the logical view that an operating

system provides so that users can manage information as a collection of files

• A file system is often organized by grouping files into directories (Folders)

• Most files, whether they are in text or binary format, contain a specific type of information– For example, a file may contain a Java program, a JPEG

image, or an MP3 audio clip

• The kind of information contained in a document is called the file type– Most operating systems recognize a list of specific file

types

Page 26: Computer System Basics

26

File Management Concepts

• File names are often separated, usually by a period, into two parts– Main name– File extension

• The file extension indicates the type of the file

Some common file types and their extensions

• Create a file• Delete a file• Open a file• Close a file

File Types

File Operations• Read data from a file• Write data to a file• Rename a file• Copy a file• Move a file

Page 27: Computer System Basics

27

File Management Concepts

• File Protection– In multi-user systems, file protection is of primary importance– We don’t want one user to be able to access another user’s files

unless the access is specifically allowed– A file protection mechanism determines who can use a file and

for what general purpose

• A file’s protection settings in the Unix operating system is divided into three categories: Owner, Group, World (all users)

Page 28: Computer System Basics

28

File Management Concepts

• A directory of files can be contained within another directory– The directory containing another is usually called the parent

directory, and the one inside is called a subdirectory– The directory at the highest level is called the root directory

• A file system is often viewed as a directory tree• At any point in time, you can be thought of as working

in a particular location (that is, a particular subdirectory)– This subdirectory is referred to as the current working

directory

Directory Trees

Page 29: Computer System Basics

29

Example: Directory Tree in Windows

Page 30: Computer System Basics

30

Path Names

• A particular file is identified by specifying that file’s path, which is the series of directories through which you must go to find the file– An absolute path name begins at the root and specifies each step

down the tree until it reaches the desired file or directory– A relative path name begins from the current working directory

• Examples of absolute paths:C:\Program Files\MS Office\WinWord.exeC:\My Documents\letters\applications\vaTech.docC:\Windows\System\QuickTime

• Suppose the current working directory is C:\My Documents\letters

Then the following relative path nameapplications\depaul.doc

Corresponds to the absolute path:C:\My Documents\letters\applications\depaul.doc

Page 31: Computer System Basics

31

System Software - Utility Programs

• Backup utility– program which makes a duplicate copy of the information on

your hard disk• Data-recovery utility

– program which restores data that has been physically damaged or corrupted

• Antivirus software– program that scans hard disks, floppy disks, and memory to

detect viruses• Data compression utility

– program which removes redundant elements, gaps, and unnecessary data from a computer’s storage space so that less space (fewer bits) is required to store or transmit data

• Disk cleanup utilities– Detect & remove unnecessary files– Detect & correct disk problems

Page 32: Computer System Basics

32

System Software - Utility Programs

• Fragmentation - the scattering of portions of files about the disk in nonadjacent areas, thus greatly slowing access to the files

• Defragmenter utility - program that finds all the scattered files on your hard disk and reorganizes them as contiguous files

Page 33: Computer System Basics

33

Development Software

• Computers can only understand instructions that are in machine language– Machine language instructions are binary encoded operations

that make up a program– Programmers, however write programs in a high-level language,

not in binary– A special program, called a “translator” needs to be used to

convert the high-level language source code into binary machine code that the computer understands. The machine code program is called the “object” program.

• Two types of translators:– Compilers: translate the whole source code into machine code

in one step. After the translation, the machine code can be executed as a single program.

– Interpreters: translate and execute the source code one statement at a time. The processing is done interactively.

Page 34: Computer System Basics

34

Development Software

The “Compilation” Process