1 Chapter One
1 Chapter One
Timer Generated by a timer within the processor. This allows the operating
system to perform certain functions on a regular basis.
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.