COMPUTER
SYSTEM ORGANIZATION
Computer system
organization has computer-system operations, Storage structure, I/O
structure
1. Computer-System Operations:
A modern general-purpose
computer system consists of one or more CPUs and a number of device controllers
connected through a common bus that provides access to shared memory. Each
device controller is in charge of a specific
type of device (for example, disk drives, audio devices, or video displays.
For a computer to start
running—for instance, when it is powered up or rebooted—it needs to have an
initial program to run. This initial program, or bootstrap program, tends to be
simple. Typically, it is stored within the computer hardware in read-only memory
(ROM) or electrically erasable programmable read-only memory (EEPROM), known by
the general term firmware.
It initializes all aspects of the system, from CPU registers to device
controllers to memory contents.
The bootstrap program must
know how to load the operating system and how to start executing that system.
To accomplish this goal, the bootstrap program must locate the operating-system
kernel and load it into memory. Once the kernel is loaded and executing, it can
start providing services to the system and its users. Some services are
provided outside of the kernel, by system programs that are loaded into memory
at boot time to become system processes, or system daemons that run the entire
time the kernel is running. Once this phase is complete, the system is fully
booted, and the system waits for some event to occur.
The occurrence of an event
is usually signaled by an interrupt from either the hardware or the software.
Hardware may trigger an interrupt at any time by sending a signal to the CPU,
usually by way of the system bus. Software may trigger an interrupt by
executing a special operation called a system call.
When the CPU is
interrupted, it stops what it is doing and immediately transfers execution to a
fixed location. The fixed location usually
contains the starting address where the service routine for the interrupt is
located. The interrupt service routine executes; on completion, the CPU resumes
the interrupted computation.
2. Storage Structure:
Memory is form of array of
bytes. The CPU can load instructions only from memory, so any programs to run
must be stored there. General-purpose computers run most of their programs from
rewritable memory, called main memory (also called random-access memory, or
RAM). Main memory commonly is implemented in a semiconductor technology called
dynamic random-access memory (DRAM). Computers use other forms of memory is
read-only memory, ROM) and electrically erasable programmable read-only memory,
EEPROM).
All forms of memory provide
an array of bytes. Each byte has its own address. Interaction is achieved
through a sequence of load or store instructions to specific memory addresses. The
load instruction moves a byte or word from main memory to an internal register
within the CPU, where as the store instruction moves the content of a register to main memory.
Aside from explicit loads and stores, the CPU automatically loads instructions
from main memory for execution.
The wide variety of storage
systems can be organized in a hierarchy according to speed and cost. The higher
levels are expensive, but they are fast. As we move down the hierarchy, the
cost per bit generally decreases, whereas the access time generally increases.
The most computer systems
provide secondary storage as an extension of main memory. The main requirement
for secondary storage is that it be able to hold large quantities of data permanently.
The most common secondary-storage device is a magnetic disk, which provides
storage for both programs and data.
In storage device hierarchy,
there is increase in space but decrease in transfer speed and as we go up the
hierarchy, increase in transfer speed but decrease in memory.
·
Registers:
These are the smaller storage devices and they store data in bits. It means 0’s
and 1’s, so they can be accessed quickly.
·
Cache:
The storage size of the cache is bigger than the register but it is slow.
·
Main
Memory: example- RAM, it has limited size but it is fast in speed.
·
Registers,
cache and main memory belongs to volatile
memory means their contents could be lost when power is removed.
·
Electronic
disk, magnetic disk, optical disk, magnetic tapes are the secondary storage
devices.
·
Electronic
disk, magnetic disk, optical disk, magnetic tapes are the non-volatile memory which does not loses the content even when the
power is removed.
3. I/O Structure:
Storage is only one of many
types of I/ O devices within a computer. A large portion of operating system
code is dedicated to managing I/ O, both because of its importance to the
reliability and performance of a system and because of the varying nature of the
devices.
A general-purpose computer
system consists of CPUs and multiple device controllers that are connected
through a common bus. Each device controller is in charge of a specific type of device. Depending
on the controller, more than one device may be attached. For instance, seven or
more devices can be attached to the small computer-systems interface (SCSI)
controller. A device controller maintains some local buffer storage and a set
of special-purpose registers. The device controller is responsible for moving
the data between the peripheral devices that it controls and its local buffer
storage. Typically, operating systems have a device driver for each device
controller. This device driver understands the device controller and provides
the rest of the operating system with a uniform interface to the device.
To
start an I/ O operation, the device driver loads the appropriate registers
within the device controller. The device controller, in turn, examines the
contents of these registers to determine what action to take (such as “read a
character from the keyboard”). The controller starts the transfer of data from
the device to its local buffer. Once the transfer of data is complete, the
device controller informs the device driver via an interrupt that it has finished its operation. The
device driver then returns control to the operating system, possibly returning
the data or a pointer to the data if the operation was a read. For other
operations, the device driver returns status in formation. This form of
interrupt-driven I/ O is fine for moving small amounts of data but can
produce high overhead when used for bulked at a movement such as disk I/ O. To
solve this problem, direct memory access (DMA) is used.
No comments:
Post a Comment