You are on page 1of 58

Chapter 1 Part I: Computer System

Overview
Basic Elements of a
Computer

I/O
Processor Modules

Main System
Memory Bus
Processor

Controls the Performs the data


operation of the processing
computer functions

Referred to as the
Central
Processing Unit
(CPU)
Main Memory

 Stores data and programs


 Typically, volatile
 Contentsof the memory is lost when
the computer is shut down
 Referred
to as real memory or
primary memory
I/O Modules

Secondary
memory devices
(e.g., disks)
Move data
between the
Communications
computer and equipment
its external
environment
Terminals
(Monitors)
System Bus

 Provides for communication among


processors, main memory, and I/O
modules
System Bus
AGP - Accelerated Graphics Port

PCI - Peripheral Component


Interconnect

Serial ATA - Serial Advanced


Technology Attachment

HDD vs. SSD


Solid-State Drive (SSD)
Hard Disk Drive (HDD)
CPU Main Memory
0
System 1
2
PC MAR Bus
Instruction
Instruction
Instruction
IR MBR

I/O AR
Data
Execution
unit Data
I/O BR
Data
Data

I/O Module n-2


n-1

PC = Program counter
Buffers IR = Instruction register
MAR = Memory address register
MBR = Memory buffer register
I/O AR = Input/output address register
I/O BR = Input/output buffer register

Figure 1.1 Computer Components: Top-Level View


Microprocessor

 Invention that brought about desktop and handheld


computing
 Contains a processor on a single chip
 Fastest general-purpose processors
 Multiprocessors
 Each chip (socket) contains multiple processors (cores)
Computer Hardware (Video)
Graphical Processing
Units (GPU’s)
 Provideefficient computation on arrays of data
using Single-Instruction Multiple Data (SIMD)
techniques pioneered in supercomputers
 Nolonger used just for rendering advanced
graphics
 Also used for general numerical processing
 Physics simulations for games
 Computations on large spreadsheets
Digital Signal Processors
(DSPs)
 Deal with streaming signals such as audio or
video
 Used to be embedded in I/O devices like
modems
 Arenow becoming first-class computational devices,
especially in handhelds
 Encoding/decoding speech and video (codecs)
 Provide support for encryption and security
System on a Chip (SoC)

 Tosatisfy the requirements of handheld devices,


the classic microprocessor is giving way to the
SoC
 Other components of the system, such as DSPs,
GPUs, I/O devices (such as codecs and radios) and
main memory, in addition to the CPUs
and caches, are on the same chip
Instruction Execution

 A program consists of a set of instructions


stored in memory

Processor reads
Processor executes
(fetches) instructions
each instruction
from memory

Two steps
Fetch Stage Execute Stage

Fetch Next Execute


START HALT
Instruction Instruction

Figure 1.2 Basic Instruction Cycle


Instruction Fetch
and Execute

 Theprocessor fetches an instruction from


memory
 Typically,the program counter (PC) holds the
address of the next instruction to be fetched
 PC is incremented after each fetch
Instruction Register (IR)

Fetched instruction is
 Processor interprets the
loaded into Instruction instruction and performs
Register (IR) required action:
 Processor-memory
 Processor-I/O
 Data processing
 Control
Interrupts

 Interrupts are signals sent to the CPU by external devices,


normally I/O devices. They tell the CPU to stop its current
activities and execute the appropriate part of the operating system.
 Mechanism by which other modules may interrupt the normal
sequencing of the processor
 Provided to improve processor utilization
 Most I/O devices are slower than the processor
 Processor must pause to wait for device
 Wasteful use of the processor
Classes of Interrupts
 
Program Generated by some condition that occurs as a result of an
instruction execution, such as arithmetic overflow, division by zero, attempt to
execute an illegal machine instruction, and reference outside a user's allowed
memory space.
 
Timer Generated by a timer within the processor. This allows the
operating system to perform certain functions on a regular basis.
 
I/O Generated by an I/O controller, to signal normal completion of
an operation or to signal a variety of error conditions.
 
Hardware Generated by a failure, such as power failure or memory
failure parity error.
Multiple Interrupts

An interrupt occurs
Two approaches
while another interrupt is
(solution):
being processed
• e.g. receiving data from • Disable interrupts while
a communications line an interrupt is being
and printing results at processed
the same time • Use a priority scheme
Main Memory

 Primary memory holds only those data and instructions


on which the computer is currently working.
 Has a limited capacity
 NOT as fast as registers.
 The data and instruction required to be processed
resides in the main memory. It is divided into two
subcategories RAM and ROM.
Characteristics of Main
Memory

 Semiconductor memories.
 Faster than secondary memories.
 Usually volatile memory (Data is lost in case power is switched
off)
 It is the working memory of the computer.
 A computer cannot run without the primary memory.
Secondary Memory

Also referred to as
auxiliary memory
Characteristics of Secondary
Memory

 Magnetic and optical memories.


 Known as the backup memory.
 A non-volatile memory (data is permanently stored even
if power is switched off).
 Computer may run without the secondary memory.
 Slower than primary memory
Cache Memory

 Cache memory is a very high speed semiconductor memory


which can speed up the CPU.
 Acts as a buffer between the CPU and the main memory.
 Used to hold data and program which are most frequently used
by the CPU.
Cache Memory
Advantages and Disadvantages
Advantages
 Cache memory is faster than main memory.
 Consumes less access time as compared to main memory.
 Stores the program that can be executed within a short period of
time.
 Stores data for temporary use.
Disadvantages
 Limited capacity.
 Very expensive.
CPU Cache Video
PART II:
OPERATING SYSTEM
OVERVIEW
OPERATING SYSTEM
• A program that controls the execution of application
programs
• An interface between applications and hardware
• A software that manages the computer hardware, as
well as providing an environment for application
program to run.
• Provides a set of services to system users
• Manages secondary memory and I/O devices
MAIN OBJECTIVES OF AN OS
• Convenience : An OS makes a computer more
convenient to use.

• Efficiency : An OS allows the computer system


resources to be used in an efficient manner

• Ability to evolve - An OS should be constructed in


such a way as to permit the effective development,
testing, and introduction of new system functions
without interfering with service.
BASICS OF OS (I/O
STRUCTURE)
BASICS OF OS (I/O
STRUCTURE)
BASIC OF OS (I/O STRUCTURE)
DMA CON’T
COMPUTER SYSTEM
ARCHITECTURE
COMPUTER SYSTEM
ARCHITECTURE
COMPUTER SYSTEM
ARCHITECTURE

 More data can be processed

 Two or more processors sharing the same resources

 If one processor malfunction, the other processors still


can run the system
COMPUTER SYSTEM
ARCHITECTURE

Multiple same CPU execute the same Master  monitor and distribute tasks
shared processes Slave  execute specific/dedicated
process
COMPUTER SYSTEM
ARCHITECTURE
CLUSTER OF
COMPUTERS
OPERATING SYSTEM
STRUCTURE
OPERATING SYSTEM
STRUCTURE
MULTIPROGRAMMING
OPERATING SYSTEM
STRUCTURE
TIME SHARING
(MULTITASKING
)
OPERATING SYSTEM
STRUCTURE

Time Sharing (Multitasking)


OPERATING SYSTEM
SERVICES
OPERATING SYSTEM
SERVICES
1. User Interface

Mainly for interaction between


user and the OS/computer system
OPERATING SYSTEM
SERVICES
OPERATING SYSTEM
SERVICES
OPERATING SYSTEM
SERVICES
OPERATING SYSTEM
SERVICES

 Collecting information about computer  All access to system resources is controlled


resources for further improvements or  I/O devices are protected from invalid access
enhancement of the computer  Provides authentication (password)
system/software  Data confidentiality

You might also like