COA-Unit 1 (Intoduction)
COA-Unit 1 (Intoduction)
Unit 1
Computer organization is about understanding how different parts of a digital
system work together. It describes how various components interact to
process data and complete tasks. Let’s break down the parts of a typical
computer system in simple terms.
Computer Architecture
Computer architecture is a bit like the blueprint for the computer. It specifies
the instructions a computer can perform and the hardware that enables these
instructions. Think of it as the "plan" that guides the hardware design.
Computer Hardware
Hardware is the physical stuff inside a computer. It includes things like
electronic circuits, screens, memory storage (like hard drives and CDs), and
even communication parts (like network cards).
1. Input Unit
- The input unit helps a computer get data. Input devices include keyboards,
mice, microphones, and other gadgets that let us interact with a computer.
* The keyboard is the most commonly used input device. When you press a
key, the computer converts it into a code that it can understand and sends it
to the memory or processor.
3. Memory Unit
The memory unit is where the computer stores programs and data that are
in use. Memory comes in two types: primary memory and secondary memory.
Primary Memory: This includes RAM (Random Access Memory) and is the
fastest type of memory, but it's temporary (volatile), meaning it loses its data
when the computer turns off. Cache memory is also part of primary memory,
which helps the CPU access data quickly.
Secondary Memory: This is used for long-term storage and includes hard
drives, USB drives, and CDs. This memory is non-volatile, so it keeps data
even when the computer is turned off.
6. Output Unit
The output unit sends information to the user in a readable form. Output
devices include monitors, printers, and speakers, and they display or produce
the results of the computer’s work.
Each part of the computer has a specific job, and together they make it
possible for us to interact with and use digital systems in our everyday lives.
Buses :
In computer architecture, a bus is a system of electrical pathways that
connects different parts of a computer, allowing data transfer and
communication between them. It’s a crucial component for connecting the
CPU, memory, and other peripherals, as it enables these parts to
communicate efficiently.
What is a Bus?
- Bus is a communication pathway made up of wires or lines that carry signals
representing data, addresses, or control commands.
- It connects multiple devices and allows for data transfer between the main
components, such as the CPU, memory, and I/O devices.
- System Bus: A bus that connects the major components (like CPU, memory,
and I/O) is called a system bus.
Types of Buses
Buses are categorized based on the type of signals they carry. These
categories include the Data Bus, Address Bus, and Control Bus.
1. Data Bus
- Purpose: Transmits data between the CPU, memory, and I/O devices.
- Bidirectional: The data bus can send data in both directions (from CPU to
memory or from memory to CPU).
- Width: The number of lines in the data bus determines its width, which
affects how much data can be transferred simultaneously. Each line in the
data bus can carry one bit at a time.
2. Address Bus
- Purpose: Carries the address of the data location in memory where the
CPU wants to read from or write to.
- Unidirectional: The address bus is one-way, with addresses typically going
from the CPU to memory or an I/O device.
- Width: The width of the address bus determines the maximum amount of
memory a system can address. For example, a 32-bit address bus can access
up to 4 GB of memory.
3. Control Bus
- Purpose: Carries control signals that manage the use and access of the
data and address buses.
- Bidirectional: Control signals flow in both directions between the CPU and
other components.
- Signals: Control lines handle timing and command signals to ensure data
is sent, received, and processed correctly.
- Timing Signals: Indicate when data and addresses on the bus are valid.
- Command Signals: Direct specific operations like Memory Read, Memory
Write, I/O Read, and I/O Write.
2. Address Lines
Address lines are channels that carry memory addresses:
- They indicate where data should be read from or written to in memory or I/O
devices.
- The number of address lines determines the range of memory that the
computer can access.
- When the CPU needs specific data from memory, it places the data's address
on these lines so memory knows exactly where to look.
3. Control Lines
Control lines manage the flow of data and instructions across the system:
- These lines carry control signals that organize data exchanges, ensuring
components work in the right order.
- They perform tasks like memory read/write, I/O read/write, and interrupt
handling.
1. Centralized Arbitration
In centralized arbitration, a single arbiter, or bus controller, manages which
device has access to the bus. Common centralized methods include:
• Daisy Chaining: In this method, bus requests are connected in a chain,
and the arbiter grants access sequentially. The first device that requests
access blocks others from receiving a bus grant, giving priority based on
position in the chain.
• Pros: Simple and scalable.
• Cons: Slower priority for devices further along the chain; system
halts if one device fails.
• Polling (Rotating Priority): The arbiter assigns addresses to each device
and checks them in a rotating sequence. The device that matches the
address receives the bus grant.
• Pros: Fairer allocation without favoritism and maintains system
stability if one device fails.
• Cons: Adding devices increases complexity.
• Fixed Priority (Independent Request): Each device has a unique bus
request line, and the arbiter assigns priority based on the device’s
assigned priority level.
• Pros: Fast response and efficient for high-priority devices.
• Cons: Requires a large number of control lines, increasing
hardware complexity.
2. Distributed Arbitration
In distributed arbitration, all devices collectively determine which one will
control the bus. Each device has an ID number, and the priority is based on
these IDs. Devices send requests and check their priority against others in
real-time, granting the highest-priority device access.
• How it Works:
• The arbiter (or bus controller) sends a bus grant signal down the
chain.
• The first device in the chain that needs the bus will “capture” this
grant signal, effectively blocking it from passing to the next
devices in line.
• This device then becomes the bus master for the duration of the
bus transaction, during which it completes its data transfer.
• Once the transaction is complete, the device releases the bus
grant signal, allowing it to move to the next device in the chain if it
has a request.
• Advantages:
• Simple and Cost-Effective: Only one control line is required for the
bus grant signal, which makes the method relatively inexpensive
and straightforward to implement.
• Easy Expansion: Devices can be added to the chain without
complex rewiring or additional control lines.
• Disadvantages:
• Position-Based Priority: Devices closer to the bus arbiter have
higher priority, which can lead to unfair access for lower-priority
devices further down the chain.
• Propagation Delay: The signal must travel through each device in
the chain, which can create delays, especially if the chain is long.
• Single Point of Failure: If one device in the chain fails, it can
disrupt access for devices further down the chain.
Memory Transfer :
In computer systems, memory transfer operations involve moving data
between memory and registers, typically classified as read and write
operations. These operations are fundamental for data access and storage.