Title: Computer System Basics
1Computer System Basics
2The 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
3Computer Architecture
4Flow of Information
- The parts are connected to one another by a
collection of wires called a bus
5Memory
- 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.
6Information 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
7Types of Memory
- Types of memory chips
- RAM
- ROM
- CMOS
- Flash
8Types of Memory
- RAM - Random Access Memory, used to temporarily
hold software instructions and data - ROM - Read-Only Memory, which cannot be written
on or erased by the computer user. Contains
fixed start-up instructions - CMOS - Complementary metal-oxide semiconductor
powered by a battery and thus doesnt lose its
contents when the power is off - Flash - can be erased and reprogrammed more than
once
9Cache 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
10Secondary 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
11Magnetic 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.
12Magnetic 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
13Compact 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
- DVDRW
14Ports Cables
- Types of ports
- Serial port
- Parallel port
- SCSI port
- USB port
- Dedicated ports
- Infrared port
15Ports 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
16Expandability 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
17The 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
18Structure 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
kernel - program which remains in main memory
while the computer is running, and directs other
nonresident programs to perform tasks that
support application programs
19What 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
20Main 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
21Task 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).
22Memory 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.
23Memory 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).
24Memory 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.
25File 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
26File Management Concepts
File Types
- 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
File Operations
- Create a file
- Delete a file
- Open a file
- Close a file
- Read data from a file
- Write data to a file
- Rename a file
- Copy a file
- Move a file
27File Management Concepts
- File Protection
- In multi-user systems, file protection is of
primary importance - We dont want one user to be able to access
another users files unless the access is
specifically allowed - A file protection mechanism determines who can
use a file and for what general purpose - A files protection settings in the Unix
operating system is divided into three
categories Owner, Group, World (all users)
28File Management Concepts
Directory Trees
- 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
29Example Directory Tree in Windows
30Path Names
- A particular file is identified by specifying
that files 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.exe
- C\My Documents\letters\applications\vaTech.doc
- C\Windows\System\QuickTime
- Suppose the current working directory is
- C\My Documents\letters
- Then the following relative path name
- applications\depaul.doc
- Corresponds to the absolute path
- C\My Documents\letters\applications\depaul.doc
31System 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 computers 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
32System 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
33Development 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.
34Development Software
The Compilation Process