0% found this document useful (0 votes)
21 views28 pages

1 Chapter One

Uploaded by

Bonsa Adugna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views28 pages

1 Chapter One

Uploaded by

Bonsa Adugna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

Computer System Overview

At a top level, a computer consists of processor,


memory, and I/O components, with one or more
modules of each type.
These components are interconnected in some
fashion to achieve the main function of the
computer, which is to execute programs.
Computer System…
Thus, there are four main structural elements:
Processor: Controls the operation of the
computer and performs its data processing
functions.
Main memory: Stores data and programs. This
memory is typically volatile; that is, when the
computer is shut down, the contents of the
memory are lost.
Computer System…
I/O modules: Move data between the computer
and its external environment. The external
environment consists of a variety of devices,
including secondary memory devices (e. g.,
disks), communications equipment, and terminals.
System bus: Provides for communication
among processors, main memory, and I/O
modules.
Computer System…
One of the processor’s functions is to exchange
data with memory.
For this purpose, it typically makes use of two
internal (to the processor) registers:
memory address register (MAR), which
specifies the address in memory for the next read
or write; and a memory buffer register (MBR),
which contains the data to be written into memory
or which receives the data read from memory
Computer System…
Similarly, an I/O address register (I/OAR) specifies a
particular I/O device.
An I/O buffer register (I/OBR) is used for the exchange
of data between an I/O module and the processor.
Computer System…
A processor includes a set of registers that
provide memory that is faster and smaller than
main memory.
Processor registers serve two functions:
User-visible registers: Enable the machine or
assembly language programmer to minimize main
memory references by optimizing register use.
E.g.: Data registers, Address registers(Index
register, Segment pointer, Stack pointer)
Computer System…
Control and Status Registers
Program counter (PC): Contains the address of
the next instruction to be fetched
Instruction register (IR): Contains the
instruction most recently fetched
INSTRUCTION EXECUTION
 A program to be executed by a processor
consists of a set of instructions stored in memory.
Instruction processing consists of two steps
(Instruction cycle):
The processor reads (fetches) instructions from
memory one at a time and executes each
instruction.
INTERRUPTS
Virtually all computers provide a mechanism by
which other modules (I/O, memory) may
interrupt the normal sequencing of the processor.
Interrupts are provided primarily as a way to
improve processor utilization.
For example, most I/O devices are much slower
than the processor.
Handling Interrupts
common 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 failure Generated by a failure, such as power failure or memory parity error.
Interrupt and Instruction cycle
THE MEMORY HIERARCHY
THE MEMORY HIERARCHY
As might be expected, there is a tradeoff among
the three key characteristics of memory: namely,
capacity, access time, and cost.
A variety of technologies are used to implement
memory systems, and across this spectrum of
technologies, the following relationships hold:
• Faster access time, greater cost per bit
• Greater capacity, smaller cost per bit
• Greater capacity, slower access speed
THE MEMORY HIERARCHY
The dilemma facing the designer is clear.
The designer would like to use memory technologies
that provide for large capacity memory, because the
capacity is needed and because the cost per bit is low.
 However, to meet performance requirements, the
designer needs to use expensive, relatively lower
capacity memories with fast access times.
The way out of this dilemma is to not rely on a
single memory component or technology, but to
employ a memory hierarchy.
THE MEMORY HIERARCHY
As one goes down the hierarchy, the following
occur:
a. Decreasing cost per bit
b. Increasing capacity
c. Increasing access time
d. Decreasing frequency of access to the
memory by the processor
CACHE MEMORY
Cache memory is intended to provide memory access
time approaching that of the fastest memories available and
at the same time support a large memory size that has the
price of less expensive types of semiconductor memories.
There is a relatively large and slow main memory
together with a smaller, faster cache memory.
The cache contains a copy of a portion of main memory.
When the processor attempts to read a byte or word of
memory, a check is made to determine if the byte or word
is in the cache. If so, the byte or word is delivered to the
processor.
CACHE MEMORY
OPERATING SYSTEM
OPERATING SYSTEM….
Operating systems perform two basically
unrelated functions, extending the machine and
managing resources.
The program that hides the truth about the
hardware from the programmer and presents a
nice, simple view of named files that can be read
and written is, of course, the operating system.
OPERATING SYSTEM…
The function of the operating system is to
present the user with the equivalent of an
extended machine or virtual machine that is
easier to program than the underlying hardware.
The operating system provides a variety of
services that programs can obtain using special
instructions called system calls.
OPERATING SYSTEM…
OPERATING SYSTEM…
Modern computers consist of processors,
memories, timers, disks, mice, network
interfaces, printers, and a wide variety of other
devices.
In other way, the job of the operating system is
to provide for an orderly and controlled allocation
of the processors, memories, and I/O devices
among the various programs competing for them.
OPERATING SYSTEM…
Operating system holds that its primary task is
to keep track of who is using which resource, to
grant resource requests, to account for usage,
and to mediate conflicting requests from different
programs and users.
Resource management includes multiplexing
(sharing) resources in two ways: in time and in space.
When a resource is time multiplexed, different
programs or users take turns using it.
OPERATING SYSTEM…
The other kind of multiplexing is space
multiplexing. Instead of the customers taking
turns, each one gets part of the resource.
For example, main memory is normally divided
up among several running programs, so each one
can be resident at the same time (for example, in
order to take turns using the CPU).
OPERATING SYSTEM…
A process is basically a program in execution.
The operating system decides to stop running
one process and start running another.
When a process is suspended temporarily like
this, it must later be restarted in exactly the same
state it had when it was stopped.
All the information about each process, other
than the contents of its own address space, is
stored in an operating system table called the
process table.
OPERATING SYSTEM…
System calls are obviously needed to create files,
remove files, read files, and write files.
Before a file can be read, it must be opened, and
after it has been read it should be closed, so calls
are provided to do these things.
An operating system is similar to a government.
Like a government, it performs no useful function
by itself.
 It simply provides an environment within which
other programs can do useful work.

You might also like