0% found this document useful (0 votes)
86 views21 pages

BIT 2102 Computer Systems and Organization

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 21

JKUAT

BIT 2102: COMPUTER HARDWARE AND ORGANIZATION


COURSE SCHEDULE

WEEK TOPIC CONTENTS


1/2 Generations and classes of • Generations
computers • Classes
• Types
3 Components of computer system • Hardware
• Software
4/5 Use of computers/ Hardware • Uses
• Input/output devices and their characteristics
6 CAT1 • CAT 1/ASS1
6/7 Memory: types and classifications • Random, ROM, Virtual etc
8 Files • Types
• Organization
• Access methods
9 Fault diagnosis • Faults
• Remedies
• Techniques for diagnosing faults
10 Upgrades • Procedures for upgrades
• Configuration of drivers
11/12 Operating systems • Purpose
• Operation etc
13 CAT 2/ASS2 • CAT2/ASS2
14 Preventive maintenance • Techniques
• Viruses
• Recovery etc
15 & 16 Exams • Exams
PART 1: INTRODUCTION

From a top level perspective, computers enable us to e.g.

- work from where we are


- use enabling technologies e.g. road maps (helping us navigate the world)
- use presentation tools
- Communicate e.t.c.

Some definitions to consider may include:

- The origin of information which is something that can be collected, sorted, summarized, exchanged and
processed is ‘data’ – which is the raw material from which information is derived.
- Information – is data collected and processed into a meaningful form.
- Computer – device that works under the control of stored programs, automatically accepting, storing and
processing data to produce information.
- The forms in which data is accepted/produced by the computer vary enormously from simple
words/numbers, to signals sent from/received by the other items of technology. So during processing the
following occur.
o Input – computer accepts data from outside for processing.
o Storage – computer holds data internally before, during and after processing.
o Processing – computer performs operations on the data it holds.
o Output – computer produces data from within for external use.

The above four items form the basic functions of a computer.

- Hardware – describes all the electronics and mechanical elements of the computers, together with those
devices used with it.
- Software – describes all the various programs that may be used in a computer together with their
associated documentation.
- Program – a set of instructions written in the language of the computer. It allows computers to perform
desired functions.
- Computer Networks – are the vehicles for coordination of the international logistics and
communication needed to make a multinational automobile.
- The Internet – a worldwide network of computers that has emerged as the enabling technology in our
migration to a “global village”.

2nd definition: Computer – an electronic device that can interpret and execute programmed commands for
input, output, computation and logic operations.

A computer system has four fundamental components namely:-

- Processing
- Output
- Storage
- Input
Processing
Input Data Output

Data storage can either be temporary or permanent. RAM provides temporary storage but disks provide
permanent storage of data and programs.

Computer systems
Computers vary in size, a reference not to its physical size but its computing capacity. They can be categorized
as PCs, workstations, mainframes and super computers (we also have minicomputers) with computing power
increasing in that order. The various types of computers differ mostly in the manner in which they are used. A
discussion of them follows:

(i) Microcomputers: Usually used by one user at a time. The PC family includes pockets, laptops and
towers. The pocket and laptops can operate without external power source. Pocket PC is also
referred to as palmtop PC while laptop is referred to as notebook.
Pen-based PCs use an electronic pen instead of keyboards.

Personal Digital Assistant (PDAs) are handheld PCs e.g. palmtop and penbased computers. They are
mostly pen-based and may include a cellular phone to enable wireless sending/receiving of faxes,
email e.t.c.

(ii) Workstations: Are more powerful than PCs basically used for tasks requiring high power e.g. CAD
programs, programs for doctors e.t.c. The high end caliber can withstand up to 2000 terminals,
almost like mainframes. There is no clear cut boundary between high-end PCs and low-end
workstations.
(iii) Mainframes: Are usually associated with enterprise-wide systems i.e. computer-based systems that
serve entities throughout the company e.g. human resource management, accounting, inventory
management tasks e.t.c. The size can range from a dozen people to 10000 people. Before 1960’s
they could cost as much as $1.5m, but now only $1000 and much more powerful. (Minicomputers
were slightly less of mainframes, in late 1960’s).

Mainframes are specifically designed for multi-user environment. They are oriented to I/O bound
applications i.e. computer often waits for data input or for an output device to complete its current
task.

(iv) Supercomputers: Primarily address applications that are processor – based. i.e. require little I/O e.g.
for engineers and scientists. They work on complex mathematical models requiring lots of
operations. They are in the range of 10 – times faster than mainframes. Areas of use include:
• Simulation of airflows around airplanes
• Meteorological studies e.g. for tornadoes
• Study results of explosions of nuclear weapons e.t.c.

Such studies may be impractical, if not impossible for mainframes.


A computer’s strength include – fast, accurate, consistent and reliable. They are fast in that they work in terms
of fractions of seconds. They are accurate in that they produce zero errors. Consistent in that they will always
do what they are programmed to do. Reliable in that they have no down time i.e. anything less that 99.9%
uptime is unacceptable. Memory capability is virtually unlimited.

How computers are used: A few uses include (although limitless)

(i) Information systems – includes all uses that support administrative aspects of an organization e.g.
airline reservation, student registration, hospital patient billing systems e.t.c. It includes hardware,
software, people, procedures and data. Provides an organization with ‘data processing’ capabilities
and the knowledge workers in the organizations with the ‘information’ they need to make better,
more informed decisions.
(ii) Personal computing - an environment in which one person controls the PC. Includes domestic and
business applications e.g. Word processing (for entering and editing text including graphics), desk
top publishing, spreadsheet, database, graphics and communications.
(iii) Communication – They enable us to communicate electronically e.g. email
(iv) Science, Research and Engineering – used as a tool in experimentation, design and development.
(v) Education & Reference – can interact with students to enhance the learning process.
(vi) Computer-Aided Design (CAD) – use of computers in the design process. Objects, i.e. 3-D, can be
flopped, rotated, resized, viewed in detail, examined both internally and externally e.t.c.
(vii) Entertainment & edutainment – applications for entertainment e.g. playing games. Edutainment is
software that combines education and entertainment

Computer generations
(i) 1st Generations: (1940’s) – were the earliest electronic computers using electronic valves e.g.
EDSAC, EDVAC, LEO and UNIVAC 1 (1951-1959).
(ii) 2nd Generations (1950’s) – more reliable computers using transistors e.g. LEO mark III, ATLAS
and IBM 7000 series. (1959-1964). More powerful, less expensive and cooler to operate.
(iii) 3rd Generation – (1960 – early 1970’s) – more powerful, reliable and compact, using ICs e.g. ICL
1900 and IBM 360 series. They made all previous computers obsolete and brought about upward
compatibility e.g. no need to convert data.
(iv) 4th generation – computers in use today having more sophisticated microelectronic devices e.g.
complex ICS which may be classified as LSI and VLSSI. (1971). (10,000 – 100,000s transistors).
(v) 5th Generation – are those being developed to mimic human behaviour. They should be able to
communicate in natural language etc.

Computer types: Computers can be classified variously e.g.

(a) By type:
(i) Analog computers - are those that function like measuring instruments e.g. thermometers or
voltmeters with pointers. Their output is in the form of smooth graphs.

(ii) Digital computers – process data represented in discrete values e.g. digital watches

(iii) Hybrid computers – combine features of (i) and (ii) above.

(b) By purpose:
(i) Special-purpose computers- are designed for a particular job only, solving problems of
restricted nature e.g. petrol pumps, weapons guidance systems e.t.c.

(ii) General purpose computers – Solve a wide variety of problems. They can be adapted to
perform particular tasks or solve problems by means of specially written programs. These
may include e.g. word processing, laptop, workstations, embedded computers e.t.c.

PART 2: INSIDE THE COMPUTER

Electronic signals can be transmitted in two main forms – analog and digital. The computer, however can only
work in digital form hence all data it handles have to be in the form of Os and 1s. For example, audio cassette
tapes store data and transmit analog signals, whereas compact disks store and transmit music in digital form i.e.
Os and 1s. Again, it’s easier to reproduce digital data than analog data without much distortion. Examples of
digitizing processes are use of a scanner or digital camera.

Binary Digits (BITS): “On” is ‘1’ and “Off” is ‘O’. In RAM, this is achieved by the presence/absence of
electrical signal, on disk, it is via magnetic arrangements on the surface, on CDs, they are in the form of
microscopic pits while pulses of light are used in the case of fiber optic.

Computer Data Storage: RAM which is the primary storage, stores data temporarily during processing. Others
like tape and disk which are secondary store data permanently.

BITs, combined into an encoding system, are used to represent characters. 8 bits make a byte , the basic unit of
character representation.

ASCII and ANSI: The 7-bit ASCII encoding system is the most popular encoding system for PCs and data
communication. (ANSI- American National Standards Institute). 7-bit represents 128 characters, 8-bit byte
represent 256 characters, hence the extra 128 bits do represent extra characters to help contain other languages
and graphic representations. An example is Microsoft Windows that uses 8 –bit ANSI encoding system to
enable sharing of text between Windows applications.

Unicode: 65,536 possibilities: is 16-bit system taking up 2 bytes for a character, is a standard being developed
by giant computer industry companies (Microsoft, IBM, Sun Microsystems) to bring uniformity in computer
industry e.g. information interchange, more representation of various languages e.t.c. but it takes up more RAM.

Closer Analysis: RAM ( DRAM & SRAM) – is read and write memory, no moving parts, data is accessed at
electronic speeds (speed of light). Such memory chips are installed in SIMMs (single in line memory modules)
– which are circuit boards which links directly to the processor.

Two common RAM technologies are DRAM and SRAM. SRAM is more expensive and faster as it does not
require refreshing. It also requires more space and power. It is none the less volatile.

All programs/data must be moved to RAM from secondary storage for processing. Each location in RAM has
an address whose contact keeps on changing.
ROM, PROM & Flash Memory
ROM is read only memory, a special type internal memory that cannot be altered by the user (hard-wired). Its
programs automatically ready the computer system for use e.g. produce the initial display prompt. PROM is
programmable by user. Flash memory is non volatile and can easily be altered by the user.

CACHE memory – high-speed holding area for program instruction/data, holds only those instructions and
data that are likely to be needed next by the processor, is 10 times faster than RAM, and 100 times more
expensive than RAM.

The processor: is the computers nerve center. Holds the CU and ALU. The CU – is the nucleus of the
processor.

Functions of CU include:-

- Directs the operation of internal processor components


- Control flow of programs / data in/out of RAM.

It contains high speed working storage areas called registers (10 times faster than CACHE) , which facilitate
movements of data/instructions between RAM, CU and ALU.

The ALU: performs all computations and logic operations, e.g. additions, subtractions, comparisons e.t.c.

Buses: Are the common pathway through which the processor sends/receives data and commands to/from
primary/secondary storage and all I/O peripheral devices.

We communicate with computers via machine language (Os and 1s) hence C++ e.t.c statements have to be
transformed into that.

Processor design can take the form of CISC (complex instruction set computer) or RISC. Later technologies
prefer RISC because it shifts much of the computational burden from the hardware to the software.

Parallel processing – refers to the use of several processors on tasks to achieve higher throughput. The master
processor allocates jobs to the subordinates and reassembles them back.

Processor characteristics
1. Word size: 16-, 32-, 64 lane bit ways – describe the number of bits handled as a unit within a
particular computer system’s bus or during internal processing.
2. Speed: for micros, we use MHz. Workstations use MIPS and supercomputers use FLOPS.
(Millions of Instructions per second, Floating Point Operations Per Second).

RAM: is the capacity measured in bytes e.g. MB, GB e.t.c.

The above are the primary descriptors of a processor.

Microprocessor: is a small processor found in e.g. ovens, telephones e.t.c very small in size, constructed into
chips (self contained circuitry)

System board: (or motherboard) contains the following:

• Microprocessor (main processor)


• Support electronic circuitry
• Memory chips (RAM, ROM, DRAM, flash memory, cache memory e.t.c.).
• Bus
• Expansion slots – link other circuit boards and peripheral devices to the processor.

NB: The micro processor is normally manufactured by other companies’ e.g. Motorola and Intel that specialize
in the development and manufacturer and not by the manufacturers of micros.

Ports: Provide a direct link to the micro’s common electrical bus. Can be serial (9 or 25 pin male/female RS-
232c connector, transmitting a bit at a time or parallel (25 pin RS-232c connector or 36-pin centronics
connector) for high speed devices e.g. high speed printers, magnetic tape backups e.t.c.

• Dedicated keyboard port – 5 or 7 pin serial


• Dedicated mouse port – serial
• Expansion slots are meant to carry expansion cards. Some of these buses include:-

ISA buses:- (Industry Standard Architecture) but it is slow.

MCA and EISA Buses – (Micro Channel Architecture from IBM and extended ISA from a consortium)

Local Buses: PCI local bus and VL-bus _ (peripheral component Interconnect) e.t.c. link expansion boards
directly to the system’s common bus.

SCSI buses – (Small Computer System Interface) – Provides an alternative to the expansion bus i.e. devices are
connected along a single cable with multiple SCI connectors.

Adding PC capabilities:

Can be achieved by adding expansion boards.

Examples include:

• Graphics adaptor – for interfacing with videos monitors.


• Sound for capturing, storage and playing
• Fax modem – enables a PC to be like a fax
• Peripheral device interface
• Serial/parallel ports
• Network interface
• SCSI interface card
• Video capture e.t.c.

PC cards (PCMCIA) Technology Personal Computer Memory Card International Association) – is a credit-
card-sized removable module plugged into an external PCMCIA expansion slot, that offer a wide variety of
capabilities e.g. they can be expanded RAM, NICS, fax modems e.t.c
PART 3: SOFTWARE

Software is a program that tells the computer what to do. Software may be divided into Applications software
and Systems software.
a) Systems software – takes control of the PC on start up and then plays a central role in all interactions
with the computer. An example is an OS e.g. Windows, Unix etc.
b) Applications software on the other hand are designed and created to perform specific personal, business
or scientific processing tasks e.g. word processing, tax planning, games etc.

Let us now examine the operating systems which direct the actions.

OS is the nucleus of all software activity. It monitors and controls all I/O and processing activities within the
computer system. It is actually a family of “system software” programs. The “kernel” loads other OS and
applications programs into RAM as they are needed. The kernel itself is loaded into RAM on start up and stays
there until the system is turned off. The OS determines the usage of RAM, sets priorities for handling tasks and
manages the flow of information to and from the processor.

OS Objectives and Orientation

1. To facilitate communication between the system and users i.e. user interface
2. To facilitate communication among computer system components i.e. instructions/data between
peripheral devices, processor, memory etc
3. To maximize throughput
4. To optimize use of computer resources
5. To provide a sense of security to the system etc

Programming Languages
Each language sets out
• I/O instructions directing the computer to read/write
• Computation instructions e.g. add etc
• Control instructions
• Assignment instructions
• Format instructions - used in conjunction with I/O instructions e.g. where to place data on a page.

Types of Programming Languages


• Machine language – this is the computer’s native language
• Procedure-oriented language – e.g. COBOL, FORTRAN are written in the exact sequence in which a
problem has to be solved.
• Object Oriented Languages – and OOP e.g. C++, JAVA – emphasize on the object
• 4th GLs use high-level English like instructions to retrieve and format data for inquiries and reporting
• visual languages (icons for words) e.g. Visual Basic – they replace text-based instructions with symbolic
icons each of which represents an object or a common programming function.
• Natural languages – should enable computer systems to accept, interpret and execute instructions in the
natural language.

Platforms

Define a standard for which software packages are developed and a software is created to run under a specific
platform. Platform can be defined by:
• The processor e.g. Intel, PowerPC
• The OS e.g. Windows95, Unix
Choosing a platform depends on the
• Availability of appropriate commercial applications s/ware
• Platform compatibility with existing h/w, s/w and expertise.

NB: briefly mention the process of installing s/w, input and control devices e.g. K/board, mouse etc.

PART 4: STORING AND RETRIEVING INFORMATION

There are mainly two types of storage; primary and secondary. Primary is the main memory while secondary is
external e.g. HD, tape etc. programs and information are retrieved from secondary storage and stored
temporarily in high-speed primary storage (RAM) for processing. Some of these external storage devices
include magnetic e.g. disk and optical laser discs.

File types:
i. ASCII file – is a text-only file that can be read or created by any word processing program or text editor.
ii. Data file – contains data organized into records
iii. Document file – e.g. word processing or desktop publishing document containing integrated text and
images
iv. Spreadsheet file – contains rows and columns of data
v. Source program file – contains high-level instructions to a computer
vi. Executable program file – contains executable machine language
vii. Graphics file – contains digitized images
viii. Other include audio and video files

Files can be accessed sequentially or randomly.

Two fundamental types of magnetic disks are


• Interchangeable – can be stored offline and loaded to drives as needed
• Fixed – e.g. HD, are permanently installed

Diskettes for example existed in 5.25” size (capacity of 360KB DS/DD) and 3.5” of 1.44 MB DS/HD. Zip disks
use both optical and magnetic technologies to read/write data (3.5” 120MB diskettes).

The HD are 1” to 5.25” with storage upwards of 40MB. A small percentage of PCs is configured to accept
interchangeable HD. Data are stored in concentric tracks. Sector organization is used to store and retrieve data.
A cylinder refers to every track with the same number on all recording surfaces.

Disks have to be formatted in order to


• Create tracks and sectors into which data are stored.
• Set up File Allocation Table (FAT) that tells the system where to find the files and folders.

Disk Access Time – is the time between the computer request for data transfer from storage device to RAM and
when the operation is completed.

Task: discuss disk care

Computer virus – is a program that literally infects other programs on contact. Sources could be electronic
bulletin boards, diskettes and networks. Use antivirus program to clean it.
Magnetic tapes – are used for three important functions
• Protection against valuable files i.e. backup medium
• Archiving files – important files no longer needed for active processing
• File portability between computers – transfer of large files from source to destination.

Optical Laser Disks – read/write operations are performed by two lasers. During recording, microscopic pits are
created on disc, and during writing, a laser reads the data from the light-sensitive recording surface. Variants
include CD-ROM, WORM disks are rewritable optical disks. CD-ROMs have very large capacities, in the range
of 680MB.

Task: outline some applications of CD.

Re-writable optical disks use MO technology and others to read/write. MO technology is very durable, able to
withstand shock, magnetic fields and a wide range of temperatures.

PART 5: INPUT/OUTPUT

I/O Devices
Input devices translate data into a form that the computer can understand. Output devices translate processed
data back into a form that we can understand. They therefore enable us to communicate with computers.

Traditional input devices include key, point and draw devices. e.g.
• K/board
• Mouse
• Joystick, trackball, mouse pen, digitizer tablet and pen
• Scanners read and interpret information on printed matter and concert it accordingly. Examples include
OCR and bar codes. Variants include hand-held, stationary label and document scanners. We also have
image scanners. We also have magnetic stripes and smart cards. Also we have speech recognition
systems for entering certain kinds and quantities of data.
• microphones

There are also vision-input systems that use a camera for digitization purposes. They are best suited to very
specialized tasks in which only a few images will be encountered e.g. in inspection. Look at the use of digital
cameras etc.

Output devices include

Monitors and graphic adapters. A graphics adapter is the device controller for the monitor (look at resolution,
color, size, display quality etc of a monitor). Monitors can be graded as CGA (color graphics adapter), EGA,
VGA, SVGA (16 million colors, 800 X 600, 1280 X 1024).

We also have touch screen monitors that permit input and output i.e. you simply touch the desired icon/option.

Printer is another output unit. There are various types e.g. dot matrix, inkjet, laser etc (examine how they
operate).

Three are also voice response systems. Examine also others such as ATMs, PoS etc.
PART 6: MEMORY ORGANIZATION AND CACHE PRINCIPLES
Internal Memory:

Computer memory exhibits a wide range of type, technology, organization, performance and cost. A typical
computer system is equipped with a hierarchy of memory subsystems, some internal to the system (i.e. directly
accessed by the processor) and some external (accessed by the processor via an I/O module).

Characteristics of Memory Systems

i. Location – refers to whether the memory is internal or external to the computer e.g. main memory is
internal while disk and tape are external.
ii. Capacity – expressed in bytes or words e.g. 8, 16, 36 bits.
iii. Unit of transfer – is the number of bits read out of or written into memory at a time.

Memory may be accessed in the following methods

• Sequential access – accesses records in a specific linear sequence, as on tape units.


• Direct access – access is accomplished by direct access to reach a general vicinity plus sequential
searching, counting or waiting to reach the final location (i.e. individual records or blocks have a
unique address based on physical location.
• Random access – any location can be selected at random and directly addressed and accessed
since each addressable location in memory has a unique, physically wired-in addressing
mechanism (i.e. time of access is constant).

iv. Performance – is a characteristic that can be measured by three parameters:


• Access time – time taken to perform a read-write operation
• Memory cycle time – the access time plus the time required before a second access can commence
• Transfer rate – rate at which data can be transferred into or out of memory

Memory exists in a variety of forms such as semiconductor, magnetic, optical and magneto optical.

The memory hierarchy

Design constraints on memory focus on how much (capacity), how fast and how expensive. Tradeoffs exists
e.g. the faster the memory the greater is the cost.

Memory is therefore built in a hierarchy to optimize the three constraints. Downwards, the following occur:

• Decreasing cost per bit


• Increasing capacity
• Increasing access time
• Decreasing frequency of access of the memory by the processor

See figure below – “the memory hierarchy”.


Inboard memory Registers, cache, main memory

Outboard storage Mag disks, cds, dvd-rw, dvd-ram etc

Offline storage Mag tape, mo, worm


Semiconductor Main Memory

Types of random access semiconductor memory


The most common is RAM where you can read and write data easily and rapidly by electrical signals. It is also
volatile and so temporary storage. May be static or dynamic types.

There is also ROM which contains a permanent pattern of data that cannot be changed. It can only be read and
not written to. Its major application is in microprogramming . Others include library subroutines for frequently
wanted functions, system programs and function tables.

The main advantage of ROM is that the data/program is permanently if main memory and need never be loaded
from a secondary storage device since its data is actually wired into the chip. However this poses two main
problems:
• The data insertion step includes a relatively large fixed cost
• There is no room for error i.e. if one bit is wrong the whole batch of ROMs must be discarded.

PROM – programmable memory is less expensive, non-volatile and may be written into only once either by the
supplier or customer. It requires special equipment. Required only when a small number of ROMs with
particular memory content is needed.

Read mostly memories – e.g. EPROM, EEPROM and flash memory are useful for applications in which there
are more read operations than write operations but for which non-volatile storage is required.

Flash memory is intermediate between EPROM and EEPROM in both cost and functionality and uses
semiconductor technology.

Cache Memory Principles

Word Block

Cache
CPU Main memory

Cache memory is intended to give memory speeds approaching that of the fastest memories available and at
the same time provide a large memory size at the price of less expensive types of semiconductor memories. The
cache contains a copy of the portions of main memory and so when the processor attempts to read a word of
memory, a check is made to determine if the word is in the cache first then delivered to the processor. The
principles of locality of reference apply:
i. It is likely to talk more to its neighbours
ii. Repeated talks are more likely with those already talked to
iii. Uses the principles of e.g. LFU, LRU etc

Elements of cache design

i. Cache size – should be small enough so that the average cost per bit is close to that of main memory
alone and large enough so that the overall average access time is close to that of cache alone. Large
caches tend to be slower than smaller ones.

Other motivations to minimize cache size include:


• The larger the cache the larger the number of gates involved in addressing the cache resulting in
slower caches
• Limitations by the available chip and board area.

Typical cache sizes are between 1k and 512k word.

ii. Mapping function – because there are fewer cache lines than main memory blocks, an algorithm is
needed for mapping main memory blocks into cache lines. Three techniques can be used namely
direct, associative and set associative, each with its advantages and disadvantages.

Here is the explanation.

a. Direct mapping – maps each block of memory into only one possible cache line.
b. Associative mapping – overcomes the disadvantage of direct mapping by permitting each memory block
to be loaded into any line of the cache. Therefore, there is flexibility as to which block to replace when
anew block is read into the cache. Its disadvantage is the complex circuitry required to examine the tags
of all the cache lines in parallel (tag field uniquely identifies a block of main memory so that they can be
realigned appropriately.
c. Set associative mapping – exhibits the strengths of both the direct and associative approaches while
reducing their disadvantages.

Replacement algorithms

When a new block is brought into the cache, one of the existing blocks must be replaced. In the case of direct
mapping, replacement takes only one possible line for any particular block i.e. no choice is possible. For
associative and set associative, a replacement algorithm is needed, the algorithm being implemented in
hardware. The main four are:

i. LRU – is the most effective and replaces the block in the set that has been in the cache longest with
no reference to it.
ii. FIFO – easily implemented as a round-robin or circular buffer technique and replaces on a FIFO
basis.
iii. LFU – replaces that block in the set that has experienced the fewest references. In this case, each line
may be associated with a counter.
iv. Pick a line at random from among the candidate lines.

Write policy

Before a block in the cache can be replaced, it is necessary to consider whether it has been altered in the cache
but not in the main memory. If it has not then the old block in the cache may be overwritten otherwise main
memory must be updated.

Since more than one device may have access to main memory, or the existence of many processors attaching to
the same bus and each having its own local cache, an alteration in one cache invalidates a word in the other
caches.
A technique called write through is used which ensures that all write operations are made to main memory as
well as to the cache to maintain validity. The disadvantage here is that it generates substantial memory traffic
thus may create a bottleneck.

Another technique is write back where updates are made only in the cache thus minimizing memory writes. The
disadvantage is that parts of main memory are invalid and so accesses by I/O modules are allowed only through
the cache.

Number of caches

More recently the use of multiple caches has become the norm. There is the on-chip (on same chip as processor)
and external chip caches. The on-chip cache reduces the processor’s external bus activity and so speeds up
execution times and increases overall system performance. Also more recently, it has become common practice
to split the cache into two – one dedicated to instructions and the other to data.

EXTERNAL MEMORY

Magnetic disks – use magnetic technology. The disk is a circular platter of metal/plastic base coated with
magnetizable material. A read/write operation occurs when the platter rotates below it. During write operation,
magnetic patterns are recorded on the surface and during read operation, current is generated of the same
polarity as the one already recorded.

Data are written on tracks, about 500 – 2000 tracks per surface.

Data are transferred to and from the disk in blocks. Data are stored in block size regions known as sectors, about
10 – 100 sectors per track.

Redundant Array of Independent Disks

The rate of improvement in secondary storage performance has been considerably less than the rate for
processors and main memory. This mismatch has made the disk storage system perhaps the main focus of
concern in improving overall computer system performance. With the use of multiple disks, there is a wide
variety of ways in which the data can be organized and in which redundancy can be added to improve
reliability. The RAID scheme thus consists of seven levels, zero to six, which designate different design
architectures that share three common characteristics:

iv. RAID is a set of physical disk drives viewed by the operating system as a single logical drive.
v. Data are distributed across the physical disk drives of an array.
vi. Redundant disk capacity is used to store parity information which guarantees data recoverability
in case of a disk failure.

The RAID strategy replaces large-capacity disk drives with multiple smaller-capacity drives and distributes data
in such away as to enable simultaneous access to data from multiple drives, thereby improving I/O performance
and allowing easier incremental increases in capacity. The RAID proposal is effectively to increase redundancy.
Although the use of multiple heads simultaneously achieves higher I/O and transfer rates, the use of multiple
devices also increases probability of failure, but this is compensated for by RAID making use of stored parity
information enabling the recovery of data lost due to a disk failure.

Task: Research on the various levels of RAID.

Optical memory
The Compact Disk (CD) digital audio system was covered in 1983. It is non-erasable and can store more than
60 minutes of audio information on one side. A variety of them have now been produced as below.

i. CD: - A non-erasable disk that stores digital audio information. The standard systems use 12cm
disks and records more than 60 minutes of uninterrupted playing time.
ii. CD-ROM:- Non-erasable disk used for storing computer data. Uses 12 cm disks storing more than
600 m bytes.
iii. DVD:- Digital Video Disk. A technology for producing digitized, compressed representation of
video information as well as large volumes of other digital data.
iv. WORM: Write once read many. Is more easily written than CD-ROM. Size is 5 ¼”, holding
between 200-800 m bytes of data.
v. Erasable Optical Disk:- Uses optical technology but can be easily erased and rewritten. Both 3.25”
and 5.25” disks are in use with typical capacity of 650MB.
vi. Magneto-Optical Disk:- Uses technology for read and magnetic recording techniques assisted by
optical focusing. Both 3.25” and 5.25” disks are in use, capacities being above 1GB.
vii. Magnetic Tapes:- Use similar recording and reading techniques as disk systems. The tape is coated
with magnetic oxide. (Similar to home tape recorder system. Blocks of data on tape are separated by
gaps called “inter-record” gaps. It is a serial access medium, unlike disks that are direct access.
Magnetic tapes were the first kind of secondary memory and are still widely used as the low-cost, slowest
speed member of the memory hierarchy.
PART 7 (A): OPERATING SYSTEMS

Why OS were developed


Problems encountered on early generations included:

• Setup time – was required as each job was put into the machine and during which time the computer
was idle e.g. changing stationery on a printer or tape reels on tape.
• Manual intervention – was necessary to investigate error conditions and to initiate corrective measures
(machine idle)
• Imbalance between processor and peripherals – meant that the CPU lying idle for long periods of
time during the operations of the peripherals.

A super controller was therefore needed. This could only occur by the use of an internally stored program called
OS.

Defn: OS is a suite of programs that has taken over many of the functions once performed by human operators.
Its role is that of resource management and such resources may include processors, I/O devices, programs,
storage and data.

Functions of OS:

• Scheduling and loading of programs in order to provide a continuous sequence of processing or to


provide appropriate responses to events.
• Control over hardware resources
• Protecting hardware, software and data from improper use
• Calling into main storage programs and subroutines as and when required
• Passing of control from one job to another under a system of priority
• Provision of error correction routines
• Furnishing a complete record of all that happens
• Communication with the computer operator.

Types of Operating Systems:

• Single-program systems i.e. are single-user, single-program on small microcomputer-based systems e.g.
MS-DOS
• Simple batch systems – provide multiprogramming of batch programs but have few facilities for
interaction of multi-access
• Multi-access and Time-sharing – majority of OS fall into this category
• Real-time systems – examples include process control systems.

Methods of operation and modes of access

a. Multiprocessing – where two or more processors are present in a computer and are sharing some or all
of the computer memory.
b. Multiprogramming – when more than one program in main memory are being processed apparently at
the same time
c. Batch processing – the job is not processed until fully put
d. Remote job entry – batch processing where jobs are entered at a terminal remote from the computer and
transmitted into the computer
e. Interactive computing – if the computer and terminal user can communicate with each other
f. Conversational mode – where the response to the user message is immediate
g. Multi-access – if the computer allows interactive facilities to more than one user at a time
h. Timesharing – processor time is divide into small units and shared in turn between users
i. Real time system – capable of processing data quickly such that the results are available to influence the
activity currently taking place.

PART 7 (B): OPERATING SYSTEMS


(another view of operating systems)

CHAPTER 1: INTRODUCTION TO OPERATING SYSTEMS

All modern computers are collections of different pieces of circuit board, silicon chips and other devices all interconnected. These
pieces are called the computer’s hardware. All these pieces of hardware together cannot do anything by themselves. Something has
to tell the hardware what to do and how to communicate between the parts. The something that does this is the Operating system
(ie creates a virtual interface, performs scheduling, multitasking/multiprogramming, memory management, I/O
interaction/management, resource management, processor management, taking logs etc.

Definition: The Operating System acts as an interface (or translator) between the application s/ware (e.g. word processor) and
the h/ware (i.e. tells the h/w what to and how to communicate between the parts).

User
Fig. 1.1

Application s/w Application s/w Application s/w

Operating system

Hardware
When the application wants to accomplish something such as to save, rename, format, obtain directory listings etc, the OS takes
over and tells the h/w what to do and then relays the results back to the application when it finishes.

The primary purpose of an OS is to insulate the user and their application programs from the underlying details of the machine. The
second reason is to allow the resources of the computer to be shared. The various types of OS are outlined here below.

Types of Operating Systems


1. Single User Systems:- Here, the OS can only undertake one operation at a time for a single user (i.e. single user single
tasking) DOS is a good example of such an OS. These may also provide multitasking i.e. undertake several jobs (seemingly
simultaneously) for a single user (single user multitasking) Windows 3.0, 3.11, 95, 98 or 2000 is a good example of these –
the user can have many windows open, work is carried out in the background while user uses the foreground.
2. Process Control: - Generally implies the control by computer of an industrial process such as the refining of oil, the
manufacture of machine tools or even the monitoring of a patient’s condition in a hospital. The common feature of all these
applications is feedback i.e. the computer receives input from the controlled process, computes a response which will
maintain its stability, and initiates the mechanism for giving it. For example, if the input specifies a dangerous rise in temp,
then the response may be to open a valve in order to raise the flow of coolant. The main function of the OS in process
control is to provide maximum reliability (i.e. avoid faults, tolerate faults and detect and recover from faults) with the
minimum of operator intervention, and to “fail safe” in the event of any h/w malfunctions.
3. File Interrogation Systems: - Are used by large-scale database applications, which can be interrogated for information. The
response to information requests must occur within a short time, and the database must be capable of being modified as
information is updated. Examples are MIS, where the database consists of information on company performance, and
Medical Information Systems in which the database is a set of patients’ records. The user expects to access information
without any knowledge of how the database is organized. The OS must therefore make interrogation facilities available
without involving the user with the details of implementation.
4. Transaction Processing: - are used to support business s/w applications such as airline seat reservations and banking. They
must allow multiple simultaneous accesses to data, allow updates and operate within strict response times.
5. General Purpose Systems: - are systems that support multiple users and multitasking (e.g. one user could be analyzing
survey data, another calculating the monthly payroll etc). The system must be able to handle the wide variety of
peripherals, which may be required (e.g. terminal, bar code reader etc). The provision and control of these facilities,
together with the organization of the flow of work are the broad functions of a general-purpose OS. The systems may
support batch processing i.e. once a job enters the computer; the user has no further contact with the job until it has been
completed. They must be fully interactive and remain responsive to users (e.g. the user may supply data which are
dependant on the results so far received). Each user has the impression that he/she has the entire machine to him/herself.
CHAPTER 2: FUNCTIONS AND CHARACTERISTICS OF OPERATING SYSTEMS

i. Job sequencing: - the OS carries out the sequence of steps necessary to read in, compile, load and execute one or more
programs.
ii. Job control or command language interpretation: - since all jobs do not necessarily require the same sequencing
operations (some jobs for example may not need compilation), the OS needs to infer precisely which operations are to be
performed in any particular case. The OS must therefore be capable of interpreting a job control language.
iii. Error handling: - the OS must not allow the errors which inevitably occur in some jobs to affect jobs later in the sequence.
iv. I/O handling: The OS handles the conversion of input (from e.g. keyboard) to output (e.g. printed output.
v. Interrupt handling: - the OS implements multiprogramming through a system of interrupts. An interrupt is a signal which
transfers control of the central processor (CPU) to some fixed location, while at the same time storing the previous value of
the program counter. Thus the program execution is temporarily abandoned, but can be resumed later at the point where it
was interrupted.
vi. Scheduling: - This is a method of organizing the jobs stored on disk so as to decide which one is to be run next. This is a
method of organizing the sharing of the CPU to the several jobs stored on disk so that each is given a fair chance to run.
vii. Resource Control (mgt): - resources are allocated by an OS according to user needs and system capabilities under the usual
constraints of efficient and reliable operations. Examples of resources to be allocated include – processor time, peripheral
devices e.g. printer, backing store, files etc.
viii. Protection: - in a multiprogramming environment, the OS protects one job from the activities of another.
ix. Multi-access: - the OS shares the computing resources among the various users so that it appears as if each user has
exclusive use of the entire machine.
x. Allow programs to store and retrieve information.
xi. Establish a user interface: - the OS should be easy to run from the users’ point of view.
xii. Accounting of computing resources: - the OS should be easy to control from the system manager’s point of view i.e. taking
logs.

Operating System Characteristics


i. Concurrency:- is the existence of several simultaneous or parallel activities such as the coexistence n memory of several
user programs. Problems associated with concurrency include:
• Switching from one activity to another.
• Protecting one activity from the effects of another.
• Synchronizing activities which depend on each other.

ii. Sharing: - concurrent activities may be required to share resources (e.g. printer) or information (e.g. in memory). The
advantages of sharing resources include:
• Cost – it is wasteful to provide resources for all users separately.
• Building on the work of others – it is useful to use other people’s programs or routines.
• Sharing data – it may be necessary to use the same data for several different programs or users.
• Removing redundancy – it is economical to share a single copy of a program (e.g. an editor or compiler) among
several users rather than provide a separate copy for each user or process.

Problems associated with sharing include:

• Resource allocation
• Simultaneous access to data
• Simultaneous execution of programs
• Protection against corruption

iii. Long-term storage – the need for sharing programs and data implies the need for long term storage of information in the
computer. Long term storage also allows users the convenience of keeping their programs or data in the computer rather
than on some external medium. The problems associated with long term storage include:
• Providing easy access
• Protection against interference (malicious or otherwise)
• Protection against system failure

iv. Non-determinacy – the OS must be determinate in that the same program, run today or tomorrow with the same data,
should provide the same results. On the other hand it is indeterminate in that it must respond to events which will occur in
unpredictable order. Examples of such events are resource requests, run-time errors in programs, and interrupts from
peripheral devices. It is unreasonable to expect to write the OS to cater for all individual contingencies that can arise.
Instead the system must be written to handle any sequence of events.

Desirable features
The following are the desirable features for an OS to display:

i. Efficient – the OS should be efficient i.e.


• Minimize CPU idle time
• Minimize response time ( in interactive systems)
• Minimize turn-around times for batch jobs.
• Minimize mean time between batch jobs where applicable.
• Maximize throughput (batch jobs per hour, rate at which work can be done interactively).
• Maximize resource utilization.

ii. Reliable – the OS should be completely or almost free of errors and able to handle all contingencies (i.e. possible
events).
iii. Easy to maintain – it should be possible to enhance an OS or correct errors without involving an army of systems
programmers. The system should therefore be modular in construction with clearly defined interfaces between the
modules and be well documented.
iv. Small size – the space to hold the OS (e.g. in memory) should be small so that enough space is available for productive
computing. Additionally, a large system is more prone to error and takes longer to develop than a small one.
v. Platform independent – it should be possible to run it in different h/w and s/w combination that comprise the basic
functionality of a computer.

Features of Windows

This is a task for your practical undertaking.

Examine the features MS-DOS, MS-WINDOWS (various versions) etc.

You might also like