Beruflich Dokumente
Kultur Dokumente
CHAPTER No. 4
Operating System
and
Computer
Architecture
1
Teacher’s Name: Akhtab Hussain
Contents
4.1 Operating System........................................................................................................................ 5
4.1.1 Definition............................................................................................................................. 5
4.1.2 Functions of Operating System ........................................................................................... 5
4.1.3 Types of Operating System ................................................................................................. 6
4.1.3.1 Real-Time Operating System .......................................................................................... 6
4.1.3.2 Multi-user vs. Single user ............................................................................................... 6
4.1.3.3 Multi-tasking vs. Single-tasking........................................................................................... 6
4.1.3.4 Distributed .......................................................................................................................... 6
4.1.3.5 Embedded ....................................................................................................................... 6
4.1.4 Types of User Interface ....................................................................................................... 7
4.1.4.1 Command Line Interface (CLI) ......................................................................................... 7
4.1.4.2 Graphical User Interface (GUI) ........................................................................................ 7
4.1.4.3 Comparison of CLI and GUI ............................................................................................. 7
4.2 Booting Process....................................................................................................................... 8
4.3 Interrupts ................................................................................................................................ 8
4.3.1 Examples ......................................................................................................................... 8
4.3.2 Interrupt Handling........................................................................................................... 8
4.4 Buffers ..................................................................................................................................... 8
4.4.1 Need of Buffers ............................................................................................................... 8
4.5 Use of Interrupts and Buffers ................................................................................................. 9
VON NEUMANN ARCHITECTURE............................................................................................................. 9
4.6 Components of Von Neumann Architecture ............................................................................ 10
4.6.1 Buses ................................................................................................................................. 10
4.6.1.1 Types of Buses .............................................................................................................. 10
4.6.1.2 Bus Width .......................................................................................................................... 10
4.6.1.3 Functions of buses ............................................................................................................ 11
4.6.2 Address.............................................................................................................................. 11
4.6.3 Registers ............................................................................................................................ 11
4.6.3.1 Types of Registers ......................................................................................................... 11
4.6.4 Memory Unit ..................................................................................................................... 12
4.6.4.1 Read Operation ............................................................................................................. 12
4.6.4.2 Write Operation ............................................................................................................ 13
4.6.5 Arithmetic Logic Unit (ALU)............................................................................................... 13
2
Teacher’s Name: Akhtab Hussain
3
Teacher’s Name: Akhtab Hussain
List of Figures
4
Teacher’s Name: Akhtab Hussain
Sr Function Description
#
i) Human Computer Interface (HCI) To provide a link between computer system and user
ii) Multitasking Execute more than one program or task
simultaneously.
iii) Multiprogramming Several programs are run at the same time on a
single Processor.
5
Teacher’s Name: Akhtab Hussain
NOTE:
All Operating systems cannot perform all the above mentioned functions.
4.1.3 Types of Operating System
4.1.3.1 Real-Time Operating System
“A real-time operating system is a multitasking operating system that aims at executing
real-time applications.”
These operating systems respond to input instantly.
4.1.3.2 Multi-user vs. Single user
“A multi-user operating system allows multiple users to access a computer system
concurrently.”
Time-sharing system can be classified as multi-user systems as they enable a multiple user
access to a computer through the sharing of time.
“Single-user operating systems, as opposed to a multi-user operating system, are usable by
a single user at a time.”
4.1.3.3 Multi-tasking vs. Single-tasking
“When a single program is allowed to run at a time, the system is grouped under a single-
tasking system.”
While in case the operating system allows the execution of multiple tasks at one time, it is
classified as a multi-tasking operating system.
4.1.3.4 Distributed
“A distributed operating system manages a group of independent computers and makes
them appear to be a single computer.”
The development of networked computers that could be linked and communicate with each
other, gave rise to distributed computing.
4.1.3.5 Embedded
“Embedded operating systems are designed to be used in embedded computer systems.”
They are designed to operate on small machines like PDAs with less autonomy. They are able
to operate with a limited number of resources.
6
Teacher’s Name: Akhtab Hussain
CLI GUI
Ease Because of the memorization and Although new users may have a difficult
familiarity needed to operate a command time learning to use the mouse and all
line interface, new users have a difficult GUI features, most users pick up this
time navigating and operating a interface much easier when compared
Command line interface. to a command line interface.
Control Users have much more control of their Although a GUI offers plenty of control
file system and operating system in a of a file system and operating system,
command line interface. For example, the more advanced tasks may still need
users can copy a specific file from one a command line.
location to another with a one-line
command.
Multitasking Although many command line GUI users have windows that enable a
environments are capable of user to view, control, and manipulate
multitasking, they do not offer the same multiple things at once and are much
ease and ability to view multiple things at faster to navigate when compared with a
7
Teacher’s Name: Akhtab Hussain
4.3 Interrupts
“An INTERRUPT is a signal sent from a device or from software to the processor. This
will cause the processor to temporarily stop what it is doing and service the interrupt.”
4.3.1 Examples
Interrupts can occur when, for example:
i. A disk drive is ready to receive more data
ii. An error has occurred, such as a paper jam in a printer
iii. The user has pressed a key to interrupt the current process – an example could be
<CTRL><ALT><BREAK> keys pressed simultaneously
iv. A software error has occurred – an example of this would be if an .exe file couldn’t be found
to initiate the execution of a program.
Buffers are essentially filled from the processor or memory unit and whilst these
are emptied to the hardware device, the processor carries on with other tasks.
8
Teacher’s Name: Akhtab Hussain
9
Teacher’s Name: Akhtab Hussain
His idea was to hold programs and data in a memory. Data would then move
between the memory unit and the processor. There are many diagrams which show von
Neumann architecture.
4.6.1 Buses
“A system bus is an electrical path or set of wires, used to move data, address or
control signals from one unit to another.”
10
Teacher’s Name: Akhtab Hussain
Address Bus Carries signals relating to addresses between the processor unidirectional
and the memory (signals travel in
one direction
only)
Data Bus sends data between the processor, the bi-directional
memory unit and the input/output devices (data can travel
in both
directions)
Control Bus carries signals relating to the control and unidirectional
coordination of all activities within the computer (signals travel in
(examples include: the read and write functions) one direction
only)
Table 3: Functions of Buses
4.6.2 Address
“An address is the location of where data can be found in a computer memory. Each
address in the memory is unique.”
4.6.3 Registers
“A register is simply a high speed storage area within the computer. All data must be
represented in a register before it can be processed.”
Figure 6 shows a slightly more detailed diagram of the von Neumann architecture. It
brings to our attention another new concept in this computer model – the idea of
ADDRESSES and REGISTERS.
11
Teacher’s Name: Akhtab Hussain
12
Teacher’s Name: Akhtab Hussain
ii. A ‘read signal’ is sent to the computer memory using the control bus.
iii. The contents of memory location 1111 0001 are then put into the MDR (memory
data register):
ii. This data has to be written into the memory location with the address 1111 1101; so this
address is now written into the MAR:
iii. Finally, a ‘write signal’ is sent to the computer memory using the control bus and this value
will then be written into the correct memory location.
4.6.6.1 Functions of CU
1) The control unit reads an instruction from memory (the address of the location where the
instruction can be found is stored in the Program Counter).
2) This instruction is then interpreted.
3) Signals are generated along the control bus to tell the other components in the computer
what to do.
13
Teacher’s Name: Akhtab Hussain
14
Teacher’s Name: Akhtab Hussain
15