Fco Basic Structure
Fco Basic Structure
I semester MCA
Pgm
Functional Units
There are five basic independent functional units in a computer. Each
performs different functions.
The functional units are
1. Input unit
2. Memory unit.
3. Arithmetic and Logic unit
4. Control unit.
5. Output unit.
Input Unit:
Computer accepts coded information through input units which read the
data. Input units are keyboard, mouse and joystick and touch screen monitor.
When a key is pressed on the input key the corresponding letter is automatically
translated into its binary code and transmitted over cable to either memory or
control unit. Microphones can also be used as input unit which converts audio into
digital codes.
Memory Unit:
Memory unit is used to store programs or data or both for very short period
of time or permanent as permitted by the user.
There are two types of storage; they are Primary storage and Secondary storage
.
Primary storage is a fast memory that operates at electronic speeds. When
executing the programs must be stored in the memory up to certain time till the
program gets executed.
The memory unit is made up of semiconductor storage cells each capable of
storing one bit of information. These cells are rarely read or written as individual
cells but instead are processed in groups of fixed size called words. The number of
bits in each word is often referred to as the word length of the computer.
Memory in which any location can be reached in a short and fixed amount of time
after specifying its address is called random access memory (RAM). The time
required to access one word is called the memory access time. This time is
independent of the location of the word being accessed and is fixed.
Secondary storage is used to store large amount of data. Secondary storage
devices are magnetic disks, magnetic tapes and optical disks (CD-DVD-ROMs).
Using secondary storage we can transfer large amount of data from one computer
to the other computer.
Arithmetic and Logic Unit:
2
I semester MCA
Pgm
I semester MCA
Pgm
Execution of the program starts when the PC is set to the point to the first
instruction of the program. The contents of the PC are transferred to MAR and
a read signal is sent to the memory and the contents are loaded into the MDR.
Now the contents of MDR are transferred to IR where the instruction is ready
to be decoded and executed. If this instruction involves an operation to be
performed by the ALU, its required operands are fetched by sending its address
to MAR and initiating a read cycle. Now the operand has been read from the
memory into the MDR and transferred to ALU to perform desired operation.
Now the result of this operation is sent to MDR and stored in the memory. The
address of the location where the result is to be stored is sent the MAR and a
4
I semester MCA
Pgm
write cycle is initiated. During the execution of these instructions at some point
of time the PC points to the next instruction to be executed. Thus as soon as the
current instruction is completed a new instruction fetch may be started. The
process is repeated until the program gets terminated.
Bus Structures
A group of lines that serves as a connecting path for several devices is
called a bus. When a word of data is transferred between units, all its bits are
transferred in parallel i.e. bits are transferred simultaneously over many wires
or lines, one bit per second.
The simplest interconnection between functional units is done by using single
bus.
Here all units are connected to a single bus because of which the bus can be
used for one transfer at a time i.e. only two units can actively use the bus at any
given time.
Single bus structure is vastly used because of its low cost and its flexibility for
attaching peripheral devices.
Multiple bus structure systems achieve more concurrency in operations by
allowing two or more transfers to be carried out at the same time which leads
to better performance at an increased cost.
The single bus structure is as shown above. Consider the transfer of an encoded
character from processor to a character printer.
The processor sends character over the bus to the printer buffer.
Buffer is an electronic register which holds the information during
the transfer of data.
After the buffer gets loaded the printer can start printing without
future intervention by the processor
The bus and the processor are no longer needed and can be released
for other activity.
The printer continues printing the encoded character which is in the
buffer.
The printer in not available for further transfers until the previous
task is completed.
5
I semester MCA
Pgm
During this time the processor can go for any other instruction with
other devices.
The system bus has three parts.
Data bus: This is used to carry data from input devices or memory
to the processor and vice versa to output device. Hence it is called
bi-directional.
Address bus: The processor uses this bus to access the memory or
any I/O device connected to it.
Control bus: These lines are needed to conduct various activities
like read, write, reset etc.
Software
Software is a collection of programs that are executed as needed to perform
and manage some functions such as
Receiving and interpreting user commands
Entering and editing application programs and storing them as files
in secondary storage devices.
Managing the storage and retrieval of files in secondary storage
devices.
Running standard application programs such as word processor,
spreadsheets or games, data supplied by the user.
Controlling I/O units to receive input information and produce
output results.
Translating programs from source from prepared by user into object
form consisting of machine instructions
Linking and running user-written application programs with existing
standard library routines, such as numerical computation packages.
The basic operation of an operating system is to manage time. Let us consider a
system with a processor, a disk and a printer. Now let us discuss how a document
is printed and role played by operating system in this process.
First the program is complied from a high level language into
machine level language and stored in the disk.
Now the file is transferred to primary memory.
Now the execution of the program is started which involves reading
a data file from the disk into the memory, performing some
computation on the data and print the result.
6
I semester MCA
Pgm
When the execution reaches the point where the data file is needed,
the program requests the operating system to transfer the data file
from the disk to the memory.
The OS performs this task and passes execution control back to the
application program, which then proceeds to perform the required
computation.
After the computation is completed the result is ready to be printed.
The application program sends a request to the operating system and
a OS routine is executed to cause the printer to print the results.
During the time period t0 to t1 an OS routine loading the application program from
the disk to memory is carried out. A similar activity occurs during the period t2 to
t3 and during the period t4 to t5 the result gets printed. When the result gets
printed during the time period t4 to t5, the period t0 and t1 and period t2 to t3 is
made use of the execution of other program by an OS routine. This pattern is
called multitasking or multiprogramming which is carried and managed by
operating system.
Performance
Performance is the time taken by the system to execute a program.
The parameters which affect the performance are processor clock speed, type of
instruction, memory access time, power dissipation in the system etc.
The performance is also influenced by the number and type of I/O devices
connected, data transfer capacity of the bus etc.
7
I semester MCA
Pgm
I semester MCA
Pgm
Memory Addresses
Every information we store in the computer is stored in memory unit.
Memory is organized such that a group of n-bits can be stored or retrieved in a
single operation. Hence n is called a word length and group of n-bits is referred to
as word of information. Word length can vary from 8 to 64 bits. If the word length
is 32-bits, then a memory word can store a 32-bit signed integer or four ASCII
characters.
Accessing the memory for reading or writing an item requires distinct addresses
for each location. If k is the number of address lines, then 2k addresses constitute
the address space of the computer
If k=20, we require an address space of 220 = 1M (1 mega) and if k=30, the address
space is 230 = 1G (1 giga) locations.
Representation of memory is shown below.
I semester MCA
Pgm
Byte Addressability
Memory is arranged in such a way that successive addresses refer to
successive byte locations. Each location contains one byte of information which is
called byte addressability. If the word length is 32 bits, then they are divided into 4
bytes and stored in 4 consecutive address locations. Successive words are located
at addresses 0, 4, 8. with each word having 4 bytes.
Memory Assignment
Byte addresses are arranged in two ways, 1. Big-endian assignment.
2. Little-endian assignment.
Big-endian assignment: Here the byte of data is stored at lower address and low
byte of data at higher address. This is used in Motorola and Power PC processor.
10
I semester MCA
Pgm
Little-endian assignment: Here lower addresses contain low order bytes of data.
This is used in Intel processors.
11
I semester MCA
Pgm