Computer Fundamentals: I P I T
Computer Fundamentals: I P I T
I
P
Computer Fundamentals
Kernel
Kernel
System Calls
Interface Programs
Operating System
Hardware
Evolution of O/S
Uniprogramming
Multiprogramming O/S
Time Multiplexing
tn
t1
t2
tn-1
Different allocation schemes possible assign CPU to the first program and
when it has run for sufficiently long time
allocate CPU to the second program
and so on (time slotting).
Space Multiplexing
Instead of a user getting the whole resource, allocate part of
a resource.
Divide main
memory space to
hold a number of
programs at a time.
Makes the system
more effective
Fig: Schematic memory
map of a microcomputer.
Process
Virtual Memory
Paging
Example of paging
UNIX
Shell
Components of the C compiler
32
UNIX Kernel
33
34
CU and ALU
CU is responsible for moving data from
one storage to another. Instruction set
of CPU is built into the CU.
When CU encounters an arithmetic or
logical operation, it passes it on to the
ALU.
ALU consists of a no. of high speed
registers. The operands should be in
the ALU registers.
Machine Cycle
These series of steps to execute an
instruction is called a machine cycle.
Machine Cycle
Instruction Cycle
Execution Cycle
(performed by CU)
(performed by ALU)
Fetch
Decode
Execute
Store
Instruction Cycle
Fetch: Retrieve instruction from memory.
Decode: Interpret the instruction.
Main
Memory
(C=A+B)
Execution Cycle
Execute: Perform the desired operation
by converting the instruction into
microcode.
Writeback: Store the result to memory
but not always necessary.
Instruction
Typical Instruction : Add the operands
stored in address A and B; store the
result in C; Address of next instruction is
in N.
Add
Size of Instructions
Size of instructions can vary
Some instructions need only one
address, example INC P (Increment the
operand stored in address P by 1).
Making size of all instructions uniform
will make the processor design simple.
Solution: Make size of instruction one
address
Address
of
Operand
Task Performed
CLA A
ADD B
STO C
RISC Processors
RISC processors use simple
instructions.
More lines of code, more memory and
compiler needs to perform more work.
Adv: Require less CPU registers. Since
all instructions execute in uniform time
pipelining is possible.
CISC Processors
Complex Instruction Set Computers
(CISC) goal is to complete a task with
as few lines of instruction as possible.
Example ADD A,B: Loads the two
values into two separate registers, adds
the value in the ALU and then stores the
sum in appropriate register.
Requires less memory and compiler
needs to do less work.
Performance Equation
RISC tries to
reduce this
parameter
CISC tries to
reduce this
parameter