Autumn 2026 All AIOU Solved Assignments, Key Books & 8613 Projects Live!
100% Free Online Reading • Copy & Download Disabled
AIOU LIBRARY KEY BOOK Course Code 3477 • BS Computer Science (BSCS) 🇬🇧 English Medium

AIOU Code 3477: BSCS Computing Course 3477 — Complete Helping Key Book & Exam Guide

Read chapter-by-chapter summaries, solved self-assessment exercises, past paper long questions, and solved MCQs directly on AIOU Library. Free of cost for all AIOU students.

Published Units: 9 / 9 Units
← Course Hub

AIOU LIBRARY • READ ONLY

AIOULIBRARY.COM • CODE 3477

AIOU LIBRARY • DO NOT COPY

Unit 2 of 9 • Verified Key Book Authored by AIOU Library Academic Engine • 9021 Words

Unit 2: Computer Architecture and Organization

Part 1: Comprehensive Unit Summary & Core Concepts

Easy Chapter Introduction & Learning Objectives

Welcome to Unit 2 of Course 3477 (BSCS Computing)! In this chapter, we are going to explore the fascinating world of Computer Architecture and Organization. If you have ever wondered what goes on inside your laptop, mobile phone, or university computer lab machine when you type a document, play a game, or browse the internet, this unit is for you. As distance-learning students of Allama Iqbal Open University (AIOU), you need explanations that are clear, grounded in practical reality, and easy to memorize for your exams. This study guide is designed specifically to help you master these concepts step-by-step without getting overwhelmed by heavy jargon.

To make your learning journey smooth, structured, and goal-oriented, here are the specific learning objectives you will achieve by the end of this chapter:

  • Understand the Fundamentals: Define what computer architecture and organization mean, and trace the history and working of the classic Von Neumann Model.
  • Master the CPU: Break down the internal structure and functions of the Central Processing Unit (CPU), including the Arithmetic Logic Unit (ALU), Control Unit (CU), and registers.
  • Navigate Memory Systems: Explore the memory hierarchy—from blazing-fast cache and main memory (RAM/ROM) to secondary storage devices—and understand memory management.
  • Explore I/O Mechanisms: Learn how computers communicate with the outside world through Input/Output organization, interfaces, interrupts, and Direct Memory Access (DMA).
  • Trace Instruction Execution: Understand Instruction Set Architecture (ISA) and walk through the classic instruction execution cycle (Fetch, Decode, Execute, Writeback).
  • Discover Advanced Concepts: Touch upon advanced processor designs, pipelining, and parallel processing for high-performance computing.

Detailed Explanation of Every Unit Topic (With Simple Examples)

1. Introduction to Computer Architecture and the Von Neumann Model

When studying computers, students often get confused between Computer Architecture and Computer Organization. Let us clear this up with a very simple real-life analogy: building a house.

  • Computer Architecture is like the blueprint made by an architect. It deals with the attributes of a system that are visible to a programmer—such as instruction sets, the number of bits used to represent data, addressing modes, and input/output mechanisms. It tells us what the system does.
  • Computer Organization is like the actual construction work done by laborers and engineers. It deals with the operational units and their interconnections that realize the architectural specifications—such as hardware details, control signals, memory types, and peripheral interfaces. It tells us how it is implemented.

The Von Neumann Model: Almost all modern computers follow a design proposed by mathematician John von Neumann in 1945. Before this, computers had to be physically rewired for every new task. Von Neumann introduced the Stored-Program Computer concept. In this model, both the program instructions and the data are stored in the same primary memory. The computer can fetch instructions from memory, decode them, and execute them sequentially.

Core Components of the Von Neumann Model:

  • Memory: Stores both data and instructions. Think of it as a set of numbered post office boxes, where each box has a unique address and contains a piece of information.
  • Processing Unit (CPU): Contains the ALU and Control Unit to process data and control operations.
  • Input/Output (I/O) Mechanisms: Devices that allow the computer to interact with the outside world (e.g., keyboards, monitors).
  • Control Flow: The system executes programs sequentially (one instruction after another) using a Program Counter, unless a jump or branch instruction changes the flow.

Real-Life Pakistani Example: Think of an Automated Teller Machine (ATM) at a local bank in Islamabad or Lahore. The ATM has a screen and keypad (Input), a cash dispenser and receipt printer (Output), a central computer board with a CPU to process your PIN and balance, and a memory bank storing instructions on how to dispense cash.

2. Central Processing Unit (CPU) Structure and Function

The Central Processing Unit (CPU) is often called the "brain" of the computer. Just as the human brain processes thoughts, makes decisions, and controls body movements, the CPU coordinates and controls all activities of the computer system.

Main Internal Components of the CPU:

  • Arithmetic Logic Unit (ALU): This is the calculation engine of the computer. It performs all basic arithmetic operations (addition, subtraction, multiplication, division) and logical operations (AND, OR, NOT, comparisons like greater than or equal to). If you are calculating your semester GPA in an Excel sheet, the ALU is doing the math.
  • Control Unit (CU): This is the supervisor or manager of the CPU. It does not perform calculations. Instead, it directs the entire computer system. It fetches instructions from memory, interprets them, and sends control signals to the ALU, memory, and I/O devices to ensure instructions are executed correctly.
  • Processor Registers: Registers are tiny, ultra-fast storage locations built directly inside the CPU. They hold data, instructions, or memory addresses that are actively needed by the CPU right now. Examples include:
    • Program Counter (PC): Holds the memory address of the next instruction to be fetched.
    • Accumulator (AC): Temporarily holds the result of ALU calculations.
    • Instruction Register (IR): Holds the instruction currently being executed.
    • Memory Address Register (MAR) & Memory Data Register (MDR): Help transfer data between the CPU and main memory.
  • CPU Interconnections (Internal Bus): A communication pathway that connects the registers, ALU, and Control Unit, allowing data to flow inside the processor.

3. Memory Hierarchy and Management

In computer science, there is an eternal engineering challenge: users want storage that is infinitely large, lightning-fast, and extremely cheap. However, physics and economics make this impossible. Fast memory is very expensive and small in capacity; cheap memory is very slow and large in capacity. To solve this, computers use a Memory Hierarchy.

Levels of Memory Hierarchy (From Top/Fastest to Bottom/Slowest):

  • CPU Registers: Located inside the CPU. Fastest access speed (fraction of a nanosecond), smallest capacity (few bytes to kilobytes).
  • Cache Memory (L1, L2, L3): Small, ultra-fast static RAM (SRAM) placed close to or on the CPU die. It stores copies of frequently used data from main memory to speed up processing.
  • Main Memory (RAM - Random Access Memory): The primary workspace of the computer. Volatile (loses data when power turns off). Holds currently running applications (like your web browser and word processor). Typical sizes range from 8GB to 32GB in modern student laptops.
  • Secondary Storage (Hard Disk Drives [HDD] and Solid State Drives [SSD]): Non-volatile storage (keeps data safe without power). Much slower than RAM, but massive capacities (500GB to 2TB+). Used for storing your operating system, movies, assignments, and software permanently.

Memory Management Basics: The operating system manages this hierarchy automatically. When you open a heavy software like Adobe Photoshop, parts of it are loaded from the slow SSD into the fast RAM. As the CPU works, it pulls tiny chunks of code from RAM into the cache and registers so that processing is not delayed.

Real-Life Pakistani Example: Imagine you are studying for your AIOU exams at your study table. Your CPU Registers are like the open book directly in front of your eyes. Your Cache is like the important formula sheet tucked right under your notebook. Your Main Memory (RAM) is your study desk where you keep 3 or 4 textbooks open for quick reference. Your Secondary Storage (SSD/HDD) is your heavy bookshelf in the corner of the room containing all 20 of your degree books, which take longer to walk over and grab.

4. Input/Output (I/O) Organization and Interfacing

A computer without I/O devices is like a brilliant scientist locked in a soundproof room—it can think brilliantly, but it cannot communicate with the outside world. I/O organization deals with how the CPU communicates with external devices like keyboards, mice, printers, monitors, and network cards.

The Challenge of I/O: I/O devices operate at speeds vastly slower than the CPU. While a modern CPU can execute billions of instructions per second, a human typist takes milliseconds to press a key. Therefore, the computer needs special mechanisms to manage data transfer without wasting CPU time.

Key I/O Management Techniques:

  • Programmed I/O: The CPU issues a command to an I/O device and then sits in a waiting loop (polling), constantly checking if the device is ready. This is highly inefficient because the CPU wastes 100% of its time waiting.
  • Interrupt-Driven I/O: Instead of waiting idly, the CPU gives an instruction to the I/O device and continues doing other useful work (like running another program). When the I/O device finishes its task (e.g., the printer finishes printing a document), it sends an electrical signal called an Interrupt to the CPU. The CPU pauses its current work, handles the printer's request, and then goes back to what it was doing.
  • Direct Memory Access (DMA): For high-speed data transfers (like moving a massive 4GB movie file from a USB flash drive into RAM), going through the CPU for every single byte would slow everything down. Instead, a dedicated hardware chip called a DMA Controller takes over the system bus and transfers data directly between the I/O device and Main Memory without involving the CPU, freeing the processor for other computational tasks.

5. Instruction Set Architecture (ISA) and Execution Cycle

An Instruction Set Architecture (ISA) is the abstract model of a computer that defines how the software talks to the hardware. It is the vocabulary that the CPU understands. Examples of popular ISAs include x86 (used in Intel and AMD desktop processors) and ARM (used in most smartphones and modern Apple MacBooks).

The Instruction Execution Cycle (The Fetch-Decode-Execute Cycle):
The fundamental job of a CPU is to execute programs stored in memory. It does this by continuously repeating a four-step cycle:

  1. Fetch Cycle: The CPU looks at the Program Counter (PC) to find the memory address of the next instruction. It copies that instruction from Main Memory into the CPU's Instruction Register (IR), and then increments the PC so it points to the following instruction.
  2. Decode Cycle: The Control Unit takes the fetched instruction from the Instruction Register and decodes it. It figures out what operation needs to be performed (e.g., "Add", "Load", "Store", or "Jump") and which data registers are involved.
  3. Execute Cycle: The Control Unit sends the necessary control signals to the appropriate components—such as activating the ALU to perform addition or telling memory to fetch data. The actual work of the instruction happens here.
  4. Writeback Cycle: Finally, the results of the execution are written back to their destination—either saved into a CPU register or written into Main Memory. Once completed, the CPU immediately loops back to step 1 (Fetch) for the next instruction.

6. Advanced Processor Concepts and Parallel Processing

As technology advanced, single-core processors hit physical speed limits due to heat and power consumption. To make computers faster, engineers invented advanced processor architectures based on parallelism.

1. Pipelining:
Imagine an assembly line in a car manufacturing factory. Instead of waiting for one car to be completely finished, painted, and tested before starting the next one, different cars are at different stages of production simultaneously. In a CPU, Pipelining allows multiple instructions to be overlapped in execution. While Instruction 1 is being executed, Instruction 2 is being decoded, and Instruction 3 is being fetched. This drastically increases the throughput of the processor.

2. Parallel Processing & Multi-Core Processors:
Instead of relying on just one brain (single-core), modern processors have multiple independent processing units (cores) on a single silicon chip—such as Dual-Core, Quad-Core, Hexa-Core, and Octa-Core processors. * Multicore Processing: Allows a computer to execute multiple separate threads or programs simultaneously (e.g., compiling code on Core 1 while rendering a 3D animation on Core 2). * Flynn’s Taxonomy (Brief Overview): Classifies computer architectures based on instruction and data streams: SISD (Single Instruction, Single Data), SIMD (Single Instruction, Multiple Data - used in graphics processing), MISD, and MIMD (Multiple Instruction, Multiple Data - used in modern multi-core supercomputers).


Key Terms & Easy Glossary

  • 1. Computer Architecture: The blueprint and logical attributes of a computer system as seen by a programmer, including instruction sets, data formats, and addressing modes. It defines what a computer system does.
  • 2. Computer Organization: The physical realization and operational units of a computer system—such as hardware circuits, buses, and memory types—that implement the architectural specifications. It defines how the system is built.
  • 3. Von Neumann Model: A traditional computer design model featuring a processing unit, a control unit, memory for both data and programs, and input/output mechanisms, operating through sequential instruction execution.
  • 4. Central Processing Unit (CPU): The primary electronic chip inside a computer that acts as its brain, responsible for executing program instructions through its internal components including the ALU, Control Unit, and registers.
  • 5. Arithmetic Logic Unit (ALU): The part of the CPU responsible for performing all mathematical calculations (addition, subtraction) and logical comparisons (greater than, less than, AND, OR).
  • 6. Control Unit (CU): The managerial component of the CPU that directs the flow of data and instructions by fetching, decoding, and generating control signals to coordinate other hardware parts.
  • 7. Program Counter (PC): A vital CPU register that keeps track of memory addresses, holding the exact location of the next instruction waiting to be fetched and executed.
  • 8. Memory Hierarchy: The structured arrangement of computer storage systems—ranging from extremely fast, expensive, and small storage (registers and cache) down to slow, cheap, and massive storage (secondary hard drives).
  • 9. Cache Memory: A small, ultra-fast block of memory placed close to or inside the CPU that stores frequently accessed data and instructions to drastically speed up processing times.
  • 10. Direct Memory Access (DMA): A specialized hardware feature and controller that allows high-speed input/output devices to transfer data directly to and from main RAM without constantly interrupting or burdening the CPU.
  • 11. Instruction Set Architecture (ISA): The abstract interface and vocabulary of commands that a specific processor understands, serving as the boundary between software programming and computer hardware.
  • 12. Pipelining: An advanced architectural technique where multiple instructions are overlapped during execution—divided into distinct stages like fetch, decode, and execute—to maximize processor efficiency and speed.
Part 2: Solved Self-Assessment & Short Questions

Q: Explain the components of the Von Neumann architecture and trace the instruction execution cycle.

Easy Answer: The Von Neumann architecture is a foundational computer design model introduced by John von Neumann in 1945. It uses a single storage structure (memory) to hold both instructions and data. The architecture consists of four main hardware components:

  • Central Processing Unit (CPU): The brain of the computer, containing the Arithmetic Logic Unit (ALU) for calculations, the Control Unit (CU) for managing operations, and processor registers.
  • Main Memory (RAM): A volatile storage space that holds both the operating data and the program instructions currently in execution.
  • Input/Output (I/O) Mechanisms: External devices (like keyboards, mice, and monitors) that allow human interaction with the system.
  • System Bus: A communication highway (data bus, address bus, and control bus) that connects the CPU, memory, and I/O devices.

The Instruction Execution Cycle (Fetch-Decode-Execute):

  • Fetch Phase: The Control Unit fetches the next instruction from main memory. The address of this instruction is held in the Program Counter (PC). The instruction is loaded into the Instruction Register (IR), and the PC is incremented.
  • Decode Phase: The Control Unit interprets (decodes) the bit pattern in the Instruction Register to understand what operation needs to be performed.
  • Execute Phase: The CPU executes the instruction. This may involve the ALU performing an arithmetic calculation, moving data between registers, or reading/writing data to memory/I/O devices.

Example: Consider adding two numbers. The CPU fetches the "LOAD" instruction from memory, decodes it, moves data into a register, fetches the "ADD" instruction, executes it via the ALU, and stores the final result back in memory.

Q: Compare and contrast RISC and CISC processor architectures with relevant examples.

Easy Answer: RISC (Reduced Instruction Set Computer) and CISC (Complex Instruction Set Computer) are two distinct philosophies for designing microprocessor instruction sets. They differ significantly in hardware complexity, instruction length, and execution speed.

  • CISC (Complex Instruction Set Computer): Designed to minimize the number of instructions per program. It has a large collection of complex, variable-length instructions that can directly access memory operands. Hardware decoding is intricate. Examples include Intel x86 and AMD processors used in standard desktop computers.
  • RISC (Reduced Instruction Set Computer): Focuses on a smaller, highly optimized set of simple, fixed-length instructions. Most operations are performed within CPU registers (Load-Store architecture). Pipelining is much easier to implement. Examples include ARM processors used in smartphones, Apple Silicon, and Raspberry Pi devices.

Key Differences (Comparison):

  • Instruction Complexity: CISC has many complex instructions; RISC has few simple instructions.
  • Instruction Size: CISC instructions vary in size (e.g., 1 to 15 bytes); RISC instructions are fixed in size (typically 32 bits).
  • Execution Speed: CISC instructions take multiple clock cycles; RISC instructions typically execute in a single clock cycle.
  • Register Usage: CISC relies heavily on memory; RISC relies on a large number of general-purpose registers.
  • Power Consumption: CISC consumes more power due to complex decoding; RISC is energy-efficient, making it ideal for mobile devices.

Q: Describe the role of registers in the Central Processing Unit and list five common registers.

Easy Answer: Registers are extremely fast, small storage locations built directly inside the CPU. They act as the CPU's working memory, holding data, instructions, memory addresses, and intermediate calculation results that the processor is currently manipulating. Because they reside on the processor chip, accessing registers takes zero or minimal wait states compared to accessing RAM.

Five Common CPU Registers:

  • Program Counter (PC): Holds the memory address of the next instruction to be fetched and executed by the CPU.
  • Instruction Register (IR): Temporarily stores the actual instruction that has just been fetched from memory while it is being decoded.
  • Accumulator (AC): A general-purpose register used to store intermediate results of arithmetic and logical operations performed by the ALU.
  • Memory Address Register (MAR): Holds the memory address of data that needs to be read from or written to main memory.
  • Memory Data Register (MDR) / Memory Buffer Register (MBR): Acts as a holding bin for data that has just been read from memory or data waiting to be written to memory.

Q: Explain the memory hierarchy in modern computer systems, emphasizing speed, cost, and capacity.

Easy Answer: The memory hierarchy is a pyramid-like organization of computer storage devices designed to achieve maximum performance at the lowest possible cost. It balances three competing factors: access speed, storage capacity, and cost per bit.

Levels of Memory Hierarchy (Top to Bottom):

  • Level 1: CPU Registers & Cache Memory (L1, L2, L3): Located closest to the processor. They offer ultra-fast access speeds (nanoseconds) but have very small storage capacities (kilobytes to megabytes) and extremely high costs per bit.
  • Level 2: Main Memory (RAM): Serves as the primary workspace for the CPU. It has moderate speed (tens of nanoseconds), larger capacity (8GB to 64GB+), and moderate cost.
  • Level 3: Secondary Storage (SSDs and HDDs): Non-volatile storage used for long-term file retention. Offers large capacities (terabytes), lower speeds (milliseconds), and a very low cost per bit.
  • Level 4: Tertiary Storage (Magnetic Tapes and Cloud Backup): Used for archival data. Offers massive capacities at the lowest cost, but with the slowest access speeds.

Trade-offs: As you move up the hierarchy toward the CPU, speed increases, cost increases, but capacity decreases. As you move down toward secondary storage, capacity increases, cost decreases, but speed decreases.

Q: Discuss the various I/O data transfer techniques, including programmed I/O, interrupt-driven I/O, and DMA.

Easy Answer: Input/Output (I/O) data transfer techniques define how data is exchanged between the CPU, memory, and peripheral devices. Because peripherals operate much slower than the CPU, three primary methods are utilized:

  • Programmed I/O: The CPU issues a command to an I/O device and enters a continuous polling loop, repeatedly checking the device status flag until it is ready. This wastes significant CPU cycles because the processor is fully occupied doing nothing productive during the wait time.
  • Interrupt-Driven I/O: Instead of wasting CPU time polling, the processor issues an I/O command and continues executing other useful tasks. When the peripheral device finishes its data transfer task, it sends a hardware interrupt signal to the CPU. The CPU suspends its current work, handles the I/O data transfer via an Interrupt Service Routine (ISR), and then resumes its previous task.
  • Direct Memory Access (DMA): For high-speed devices (like hard drives and network cards), interrupt-driven I/O is still too slow because every single byte passes through the CPU. A specialized hardware controller called a DMA Controller takes over the system bus to transfer data directly between I/O devices and RAM without active CPU intervention, freeing the processor for complex computations.

Q: What is cache memory, and how do mapping techniques (direct, associative, set-associative) affect its performance?

Easy Answer: Cache memory is a small, high-speed Static RAM (SRAM) located close to or inside the CPU. It stores copies of frequently accessed data and instructions from the slower main memory (DRAM), drastically reducing average memory access time.

Cache Mapping Techniques:

  • Direct Mapping: Each block of main memory maps to exactly one specific line in the cache. Performance: Simple and fast to implement hardware-wise, but suffers from high "conflict misses" if two frequently used variables map to the exact same cache line.
  • Fully Associative Mapping: A memory block can be placed into any available line in the cache. Performance: Eliminates conflict misses completely, yielding high hit rates, but requires complex hardware circuitry to simultaneously search all tags, making it expensive and slow for large caches.
  • Set-Associative Mapping: A hybrid approach where the cache is divided into sets, and each set contains multiple cache lines (e.g., 2-way, 4-way). A memory block maps to a specific set, but can reside in any line within that set. Performance: Strikes an ideal balance between hardware cost, search speed, and conflict miss reduction. It is the most widely used mapping technique in modern CPUs.

Q: Define Computer Architecture.

Easy Answer: Computer architecture refers to the conceptual design and fundamental operational structure of a computer system as seen by the programmer. It encompasses the instruction set architecture (ISA), data formats, addressing modes, registers, and techniques for memory and I/O management. It bridges the gap between hardware components and software applications.

Q: What is the function of the Program Counter (PC)?

Easy Answer: The Program Counter (PC) is a vital register inside the CPU whose primary function is to store the memory address of the next instruction that needs to be fetched and executed. Automatically, after every instruction fetch cycle, the PC increments its value to point to the subsequent instruction in sequence.

Q: State the purpose of the Arithmetic Logic Unit (ALU).

Easy Answer: The Arithmetic Logic Unit (ALU) is the core calculation engine of the CPU. Its primary purpose is to perform fundamental mathematical calculations (such as addition, subtraction, multiplication, and division) and logical operations (such as AND, OR, NOT, and comparison checks) on binary data.

Q: What does DMA stand for and what is its primary function?

Easy Answer: DMA stands for Direct Memory Access. Its primary function is to allow high-speed peripheral devices (like disk drives, graphics cards, and sound cards) to transfer data directly to and from the computer's main memory (RAM) without constant involvement or supervision from the CPU.

Q: Differentiate between RAM and ROM.

Easy Answer: RAM (Random Access Memory) is volatile storage used to hold active programs and data while the computer is powered on; its contents are lost when power is turned off. ROM (Read-Only Memory) is non-volatile storage that permanently stores critical boot instructions (like the BIOS/UEFI) and cannot be easily modified or erased.

Q: What is an Instruction Set Architecture (ISA)?

Easy Answer: An Instruction Set Architecture (ISA) is the abstract model of a computer that defines the interface between software and hardware. It specifies the native instructions (machine code) that the processor understands, data types, register set, memory addressing modes, and input/output behavior, allowing software to communicate with the physical CPU.

Q: Define bus contention and how it is resolved.

Easy Answer: Bus contention occurs when two or more devices attempt to use the same computer system bus simultaneously to transmit data, resulting in signal corruption. It is resolved using bus arbitration techniques, where a hardware arbiter grants control of the bus to only one master device at a time based on priority.

Q: What is pipelining in CPU design?

Easy Answer: Pipelining is an implementation technique where multiple instructions are overlapped in execution. Similar to an assembly line in a factory, the CPU breaks instruction processing into sequential stages (Fetch, Decode, Execute, Writeback), allowing different instructions to be processed simultaneously at various stages to boost throughput.

Q: Briefly explain the concept of virtual memory.

Easy Answer: Virtual memory is a memory management technique that uses secondary storage (like an SSD or HDD) to act as an extension of physical RAM. It allows the operating system to run programs larger than available physical memory by temporarily moving inactive blocks of data (pages) between RAM and disk storage.

Q: What is the significance of the System Bus?

Easy Answer: The system bus is the central communication backbone of a computer system. Its significance lies in connecting major hardware components—specifically the CPU, main memory, and I/O devices—allowing data, memory addresses, and control signals to travel efficiently between them.

Part 3: Detailed Exam Long Questions (20-Marks Standard)

Long Question: Provide a detailed analysis of the Von Neumann architecture, illustrating its bottlenecks and how modern architectures mitigate them.

Welcome to Unit 2 of Course 3477 (BSCS). In computer science, understanding how hardware components interact forms the bedrock of system design. The Von Neumann architecture, proposed by the brilliant mathematician John von Neumann in 1945, revolutionized computing by introducing the "stored-program" concept. Before this breakthrough, computers had to be physically rewired for every new task. This comprehensive guide breaks down the architecture, its inherent limitations, and modern engineering workarounds in simple, student-friendly terms.

1. Introduction to the Stored-Program Concept

The core idea of the Von Neumann architecture is that data and program instructions share the same memory space. Historically, calculators and early computers kept data separate from the instructions that manipulated them. Von Neumann proposed storing both binary data and program instructions together in read-write memory. This design made computers general-purpose machines, meaning they could switch from playing a game to running a word processor simply by loading a different program into memory.

2. Core Components of Von Neumann Architecture

The classic Von Neumann model consists of three primary hardware subsystems:

  • Central Processing Unit (CPU): The brain of the computer containing the Arithmetic Logic Unit (ALU) and Control Unit (CU).
  • Memory Unit: A linear array of storage locations holding both instructions and data.
  • Input/Output (I/O) Mechanisms: External devices allowing communication with the human user or other systems.
Every piece of data flows through these core units during execution.

3. The Role of the Arithmetic Logic Unit (ALU)

The ALU is the calculation engine inside the CPU. It performs all mathematical operations (addition, subtraction, multiplication, division) and logical comparisons (AND, OR, NOT, greater than, less than). Think of the ALU like an electronic calculator built right into the processor, waiting for the control unit to feed it numbers and tell it what operation to run.

4. The Control Unit (CU) and Program Counter (PC)

The Control Unit acts as the traffic cop of the computer. It fetches instructions from memory, interprets what needs to be done, and coordinates the flow of data between the CPU, memory, and I/O devices. The Program Counter (PC) is a special register inside the CU that holds the memory address of the *next* instruction to be executed, ensuring the program runs in the correct sequence.

5. Registers: The CPU's Scratchpad

Registers are tiny, ultra-fast storage locations inside the CPU. Unlike main memory (RAM), which takes multiple clock cycles to access, registers can be read or written to almost instantaneously. Common registers include the Accumulator (stores intermediate calculation results), the Memory Address Register (MAR), and the Memory Data Register (MDR).

6. The Von Neumann Bottleneck Explained

Despite its brilliance, the traditional architecture suffers from a fundamental design flaw known as the Von Neumann Bottleneck. Because instructions and data share a single common bus (pathway) to memory, the CPU can only access *one* thing at a time. It cannot read an instruction *and* read/write data simultaneously. This creates a traffic jam where a blazing-fast processor sits idle, waiting for data to crawl across the single shared bus.

7. Impact of the Bottleneck on System Performance

As CPU clock speeds increased over the decades, memory speeds did not keep pace. This created a massive performance gap, often called the "Processor-Memory Performance Gap." While a modern CPU can execute billions of instructions per second, fetching data from main RAM feels like retrieving an item from a warehouse miles away. Consequently, the CPU spends significant amounts of time waiting, wasting precious processing power.

8. Harvard Architecture: The Primary Alternative

To overcome the Von Neumann bottleneck, engineers developed the Harvard Architecture. Unlike its predecessor, the Harvard architecture uses physically separate memory spaces and separate signal pathways (buses) for instructions and data. This allows the CPU to fetch an instruction and read/write data at the very same clock cycle. Most modern microcontrollers and DSPs (Digital Signal Processors) use modified Harvard principles inside the chip.

9. Modern Mitigations: Cache Memory Hierarchies

Redesigning the entire motherboard to use pure Harvard architecture is expensive and complex. Instead, modern computer systems (like Intel Core or AMD Ryzen processors) use a hybrid approach. Inside the CPU chip, instruction cache (L1i) and data cache (L1d) are separated (Harvard style), while main memory (RAM) remains unified (Von Neumann style). This drastically reduces bus contention.

10. Pipelining and Out-of-Order Execution

To keep the CPU busy despite memory delays, modern processors employ pipelining (overlapping instruction execution steps) and out-of-order execution. If instruction #2 is waiting for data from slow RAM, the CPU doesn't freeze entirely; instead, it looks ahead and executes independent instructions (#3, #4) that are already available in fast local registers.

11. Everyday Analogy: The Single-Lane Highway

Imagine a kitchen chef (the CPU) cooking a meal using a recipe book. The ingredients and the recipe book are stored in a single pantry room down a long, narrow single-lane hallway (the Von Neumann bus). The chef can either walk to get an ingredient OR walk to read the next step in the book, but they cannot do both at the same time. Modern architecture fixes this by keeping ingredients on the chef's countertop (cache memory).

12. Exam Conclusion and Summary

In summary, the Von Neumann architecture laid the groundwork for all modern general-purpose computing by unifying programs and data in a single memory space. However, its single shared bus creates a severe traffic bottleneck limiting processing speed. Modern computer architects overcome this limitation by integrating high-speed multi-level cache hierarchies, instruction pipelining, and split L1 caches inside the CPU, successfully bridging the speed gap between fast processors and slower main memory.

Long Question: Explain the complete instruction execution cycle with the help of a well-labeled diagram, describing the fetch, decode, execute, and writeback phases.

Welcome to the mechanics of computer execution. At the heart of every computer system lies a continuous, relentless heartbeat: the Instruction Execution Cycle, also known as the Fetch-Decode-Execute cycle (or CPU cycle). Every program you run—whether it is a web browser, video game, or calculator—is broken down by the operating system into millions of individual machine instructions. This detailed tutorial explores how the CPU processes each instruction from start to finish.

1. Introduction to the Machine Instruction Cycle

The instruction cycle is the fundamental operational process of a computer. It represents the exact sequence of steps the CPU goes through to read an instruction from memory and carry out the commands specified. The speed at which a computer completes these cycles is measured in Hertz (Hz)—for example, a 3.0 GHz processor completes 3 billion cycles every single second. Let us break down the four main phases.

2. Phase 1: The Fetch Stage

The cycle always begins with the Fetch phase.

  • The Control Unit looks at the Program Counter (PC) to find the memory address of the next instruction.
  • This address is copied into the Memory Address Register (MAR).
  • A read command is sent across the system bus to main memory (RAM).
  • The instruction residing at that address is sent back along the data bus and stored in the Memory Data Register (MDR).
  • Finally, the instruction is transferred from the MDR to the Current Instruction Register (CIR), and the Program Counter is automatically incremented by 1.

3. Phase 2: The Decode Stage

Once the instruction is safely inside the CPU's Current Instruction Register, the Decode phase begins.

  • The Control Unit takes the binary machine instruction and translates it.
  • It splits the instruction into its core components: the Opcode (Operation Code, which specifies *what* action to take, like ADD or LOAD) and the Operand (specifying *where* the data is located).
  • If the instruction requires additional data from memory, the Control Unit calculates the effective memory address during this phase.

4. Phase 3: The Execute Stage

The Execute phase is where the actual work gets done. Depending on what the opcode decoded to, the Control Unit sends electrical control signals to the appropriate hardware component:

  • If it is a mathematical instruction (like `ADD`), the Control Unit routes the numbers to the ALU, which performs the calculation.
  • If it is a data movement instruction (like `MOV` or `STORE`), the CPU moves data between registers.
  • If it is a jump/branch instruction, the Program Counter is updated directly to point to a completely different part of the program.

5. Phase 4: The Writeback Stage

After the execution phase completes, the results need to be saved. This is the Writeback phase.

  • The final result generated by the ALU or retrieved from memory is written back to its destination.
  • This destination is typically a CPU register (like the Accumulator) or, in some cases, written back out across the bus to main RAM.
  • Once writeback is complete, status flags (such as Zero, Negative, or Overflow flags) are updated in the processor status register, and the CPU immediately loops back to the Fetch stage for the next instruction.

6. Visualizing the Cycle (Text-Based Diagram)

Imagine a continuous circular pipeline flowing in this exact order:

  [ START ] 
      │
      ▼
┌───────────┐      ┌───────────┐
│   FETCH   │ ───► │  DECODE   │
│ (PC to CIR)│      │(Opcode/Arg)│
└───────────┘      └───────────┘
      ▲                  │
      │                  ▼
┌───────────┐      ┌───────────┐
│ WRITEBACK │ ◄─── │  EXECUTE  │
│(Save Data)│      │(ALU / CU) │
└───────────┘      └───────────┘
This cycle repeats continuously until the computer is shut down or a special halt instruction is encountered.

7. Interrupt Checking Between Cycles

At the very end of the writeback stage—before the CPU loops back to fetch the next instruction—the Control Unit checks an important line called the Interrupt Request (IRQ) line. If an external hardware device (like a keyboard, mouse, or network card) needs immediate attention, the CPU temporarily suspends the current program, saves its state, and jumps to an interrupt service routine (ISR).

8. Clock Cycles and Instruction Timing

Not all instructions take the same amount of time. Simple register-to-register additions might execute in a single clock cycle. Complex floating-point arithmetic or memory read operations might require multiple clock cycles. Modern processors use internal multipliers and complex scheduling to ensure that the CPU never wastes a clock tick if it can avoid it.

9. Instruction Pipelining: Speeding Up the Cycle

If a CPU had to finish Fetch, Decode, Execute, and Writeback for Instruction 1 *before* starting Instruction 2, computers would be sluggish. To solve this, pipelining is used. While Instruction 1 is in the Execute phase, Instruction 2 can be in the Decode phase, and Instruction 3 can be fetched. This assembly-line approach multiplies overall throughput dramatically.

10. Hazards in Instruction Pipelining

Pipelining is fantastic, but it introduces hazards:

  • Data Hazards: An instruction depends on the result of a previous instruction that hasn't finished writing back yet.
  • Control Hazards: A conditional branch instruction changes the Program Counter, meaning the instructions already fetched down the pipeline must be discarded.
Modern CPUs use branch prediction algorithms to guess which way a branch will go and keep the pipeline full.

11. Everyday Analogy: Baking a Custom Cake

Think of the instruction cycle like an assembly line in a bakery:

  • Fetch: Grabbing the recipe card from the binder.
  • Decode: Reading the card and realizing it says "mix 2 cups of flour."
  • Execute: Pouring and mixing the flour into the bowl.
  • Writeback: Placing the mixed bowl onto the counter and marking step 1 as complete.

12. Exam Conclusion and Summary

In conclusion, the instruction execution cycle is the fundamental heartbeat of digital computing. By systematically moving through the Fetch, Decode, Execute, and Writeback phases, the CPU transforms raw binary data into meaningful computations. Understanding this four-stage process, along with modern enhancements like pipelining and hazard management, is essential for any computer science professional analyzing system performance.

Long Question: Discuss the memory hierarchy in detail. Compare cache memory management policies and explain how locality of reference improves system performance.

Welcome to Unit 2's deep dive into memory systems. Designing a computer memory system involves a brutal engineering trade-off: users want storage that is infinitely large, lightning-fast, non-volatile, and extremely cheap. Unfortunately, physics does not allow this combination. Fast memory (like CPU registers) is extremely expensive and small; cheap memory (like hard drives) is enormous and slow. To solve this paradox, computer scientists organized memory into a hierarchical pyramid based on speed, cost, and capacity.

1. Introduction to the Memory Hierarchy Pyramid

The memory hierarchy is structured like a pyramid. At the very peak sits the smallest, fastest, and most expensive storage (CPU Registers), while the massive, slow, and inexpensive storage (Magnetic Hard Drives and Cloud Storage) rests at the broad base. The fundamental goal of this hierarchy is to provide the user with the illusion of a massive, ultra-fast memory pool while keeping overall hardware manufacturing costs manageable.

2. Levels of the Memory Hierarchy

A standard modern computer memory hierarchy consists of the following distinct tiers:

  • Level 0: CPU Registers: Access time in fractions of a nanosecond; capacity measured in bytes or kilobytes.
  • Level 1 (L1) & L2 Cache: Built directly onto the CPU chip; access in 1-5 nanoseconds; capacity in kilobytes to megabytes.
  • Level 3 (L3) Cache: Shared across CPU cores; access in 10-20 nanoseconds; capacity in tens of megabytes.
  • Main Memory (RAM): Volatile semiconductor storage; access in 50-100 nanoseconds; capacity in gigabytes (e.g., 8GB - 64GB).
  • Secondary Storage: Non-volatile SSDs and HDDs; access in microseconds to milliseconds; capacity in terabytes.

3. The Principle of Locality of Reference

How does a memory hierarchy work so efficiently if main RAM is hundreds of times slower than the CPU? The magic relies on a psychological and mathematical phenomenon called Locality of Reference. Programs do not access memory randomly; instead, their memory access patterns are highly predictable. There are two primary types of locality:

  • Temporal Locality: If a piece of data is accessed once, it is very likely to be accessed again in the near future (e.g., variables inside a looping statement).
  • Spatial Locality: If a memory location is accessed, data items stored nearby in memory are likely to be accessed soon (e.g., reading sequential elements of an array).

4. How Locality Drives Cache Performance

Because of spatial and temporal locality, cache controllers can anticipate what the CPU will need next. When the CPU asks for data from RAM, the cache doesn't just copy that single byte; it copies an entire cache line (typically 64 bytes) of neighboring memory into the high-speed cache. When the CPU inevitably asks for the next piece of data, it is already sitting waiting in the ultra-fast L1 cache, resulting in a "cache hit."

5. Cache Hit vs. Cache Miss

Performance is measured by how often the CPU finds data in the cache rather than having to fetch it from slow main memory:

  • Cache Hit: The required data is found in the cache. Access is instantaneous.
  • Cache Miss: The data is not in the cache. The system must stall, access slow main memory, and copy the block into the cache. This creates a performance penalty.
Cache hit ratios in modern systems often exceed 95% due to locality.

6. Cache Mapping Techniques

When the CPU requests data from main RAM, the cache controller must decide *where* inside the cache that block of data will live. There are three primary mapping techniques:

  • Direct Mapped Cache: Each block of main memory maps to exactly one specific line in the cache. It is simple and fast, but prone to "thrashing" if two frequently used variables map to the exact same cache line.
  • Fully Associative Cache: A memory block can be placed into *any* free line in the cache. This eliminates conflict misses completely, but requires complex and power-hungry hardware circuitry to search every cache line simultaneously.
  • Set-Associative Cache: A hybrid compromise. The cache is divided into sets, and a memory block can map to any line within a specific set. This balances hardware cost with high hit rates and is what modern CPUs use.

7. Cache Replacement Policies

When the cache is completely full and a new block of data needs to be brought in from RAM, the cache controller must evict an existing block. It does this using replacement policies:

  • FIFO (First-In, First-Out): Evicts the oldest block in the cache, regardless of how often it is being used.
  • LRU (Least Recently Used): Evicts the block that has not been referenced for the longest period of time. This aligns closely with temporal locality and is very popular.
  • LFU (Least Frequently Used): Evicts the block with the lowest reference count over time.
  • Random Replacement: Picks a block completely at random; surprisingly effective in high-speed hardware due to low overhead.

8. Write Policies: Write-Through vs. Write-Back

When the CPU modifies data stored in the cache, that data eventually needs to be updated in main RAM as well. There are two main strategies:

  • Write-Through: Every time data in the cache is modified, it is immediately written to both the cache and main RAM. This ensures data consistency, but creates heavy bus traffic.
  • Write-Back (Copy-Back): Changes are made *only* to the cache block. A "dirty bit" is set to indicate the data has been modified. The main RAM is updated only when that specific cache block is evicted. This dramatically reduces memory traffic.

9. Multilevel Cache Inclusion and Exclusion

In systems with L1, L2, and L3 caches, designers must choose how data is shared between levels:

  • Inclusive Cache: All data in L1 is guaranteed to be present in L2 and L3. This simplifies cache coherence checks in multi-core processors.
  • {Exclusive Cache}: Data can only exist in *one* cache level at a time. If it moves to L1, it is removed from L2, maximizing total effective storage capacity.

10. Impact on Virtual Memory and Page Faults

The memory hierarchy concept extends beyond hardware caches into operating systems via Virtual Memory. When physical RAM fills up, the OS uses a portion of the secondary SSD storage as "swap space" or page file. Just like cache misses, when data requested by the CPU is missing from physical RAM, a page fault occurs, forcing the OS to retrieve the memory page from the SSD—a much slower process.

11. Everyday Analogy: The Office Desk vs. Warehouse

Imagine your workspace:

  • Registers/L1 Cache: The sticky notes stuck directly onto your computer monitor (instant access, very small space).
  • RAM: The top surface of your office desk (holds files you are currently working on today).
  • Hard Drive / SSD: The massive filing cabinets in the basement archive room (holds thousands of files, but takes minutes to walk down and retrieve).

12. Exam Conclusion and Summary

In conclusion, the memory hierarchy solves the physical paradox of computing by organizing storage into tiered levels balancing speed, cost, and capacity. By exploiting the principle of locality of reference (temporal and spatial locality), hardware caches achieve remarkable hit rates. Combined with intelligent cache mapping, replacement algorithms (like LRU), and write policies, the memory hierarchy ensures that processors spend maximum time calculating and minimum time waiting for data.

Long Question: Examine the input/output organization of a computer system. Contrast Interrupt-Driven I/O with Direct Memory Access (DMA) in terms of efficiency and CPU overhead.

Welcome to Unit 2's exploration of Input/Output (I/O) organization. A computer processor, no matter how lightning-fast its arithmetic units or how large its cache, is completely useless if it cannot communicate with the outside world. Keyboards, mice, monitors, network cards, and solid-state drives all need to transfer data into and out of the computer system. Managing these external devices efficiently without wasting processor time is one of the greatest challenges in computer architecture.

1. Introduction to I/O Organization

I/O organization refers to the hardware and software mechanisms that allow the CPU to exchange data with peripheral devices. Because peripheral devices operate electromechanically or electronically at speeds vastly slower than the CPU, a coordination problem arises. If a CPU had to wait for a hard drive to spin up or a keyboard user to press a key, the system would freeze. Therefore, computer systems use different I/O control mechanisms: Programmed I/O, Interrupt-Driven I/O, and Direct Memory Access (DMA).

2. Programmed I/O: The Inefficient Baseline

In Programmed I/O, the CPU issues a command to an I/O device and then enters a tight software loop, constantly polling (checking) a status register to see if the device has finished the task.

  • How it works: The CPU asks the keyboard, "Did the user press a key yet?" -> "No." -> "Did the user press a key yet?" -> "No." (repeating millions of times).
  • Efficiency: Abysmal. The CPU wastes 100% of its processing power on busy-waiting, unable to execute other useful user programs. It is only acceptable today for extremely simple microcontrollers handling trivial tasks.

3. Introduction to Interrupt-Driven I/O

To eliminate the waste of polling, engineers developed Interrupt-Driven I/O. Instead of the CPU constantly asking the device if it is ready, the peripheral device alerts the CPU *only when it needs attention*.

  • How it works: The CPU issues a read command to the network card and then goes off to run other user programs (like playing music or rendering graphics). When a data packet arrives at the network card, the card sends an electrical pulse across a hardware line called an Interrupt Request (IRQ) line directly to the CPU.
  • Efficiency: Far superior to Programmed I/O because the CPU is freed up to do actual productive work while waiting for slow peripherals.

4. The Mechanics of Interrupt Handling

When an interrupt occurs, the CPU executes a specific sequence:

  • It finishes executing the current machine instruction it is working on.
  • It saves the current state of its registers and Program Counter onto the system stack (Context Saving).
  • It looks up the interrupt vector table to find the memory address of the Interrupt Service Routine (ISR) associated with that specific device.
  • It jumps to the ISR, handles the data transfer, restores the saved registers, and resumes the original interrupted program right where it left off.

5. Limitations of Interrupt-Driven I/O

While Interrupt-Driven I/O is a massive improvement over polling, it still has a significant bottleneck when handling bulk data transfers (such as reading a 4GB file from a hard drive or streaming network packets).

  • Every single byte or small data packet transferred triggers a hardware interrupt.
  • For each interrupt, the CPU must pause, save its context, jump to the ISR, read the byte, restore its context, and resume.
  • When transferring millions of bytes per second, the CPU spends more time context-switching and servicing interrupts than executing actual application code—a phenomenon known as thrashing or interrupt storm.

6. Direct Memory Access (DMA): The Ultimate Solution

To solve the high CPU overhead of bulk data transfers, computer architects introduced Direct Memory Access (DMA). A DMA controller is a specialized hardware processor chip installed on the motherboard specifically designed to manage data transfers between I/O devices and main memory independently of the CPU.

7. How DMA Operates

The step-by-step workflow of a DMA transfer demonstrates its power:

  • The CPU initializes the DMA controller by sending it configuration parameters: the source address, the destination address in RAM, the number of bytes to transfer, and the direction of transfer (read/write).
  • Once configured, the CPU goes back to running heavy computational tasks for user applications.
  • The DMA controller takes control of the system bus and begins moving blocks of data directly between the I/O device and main RAM at blazing hardware speeds.
  • When the entire block transfer is fully complete, the DMA controller sends a *single* hardware interrupt to the CPU to announce completion.

8. Bus Arbitration: Stealing Cycles

Since both the CPU and the DMA controller share the same system bus to access main memory, conflicts arise. This is resolved by Bus Arbitration techniques:

  • Burst Mode: The DMA controller takes over the bus completely and transfers the entire block of data in one continuous stream, forcing the CPU to pause temporarily.
  • Cycle Stealing: The DMA controller steals individual, isolated bus cycles when the CPU is busy inside its internal cache and not using the external memory bus, causing zero noticeable CPU slowdown.

9. Detailed Comparison: Interrupt-Driven I/O vs. DMA

Let's contrast both methods directly across key performance metrics:

  • CPU Overhead: Interrupt-driven requires CPU involvement for *every single data unit* transferred. DMA requires CPU involvement only at the start and end of the entire block transfer.
  • Throughput Speed: Interrupt-driven is slow for large files due to constant context-switching overhead. DMA achieves maximum possible hardware bus speeds.
  • Hardware Complexity: Interrupt-driven requires minimal extra hardware (just an interrupt controller). DMA requires a dedicated, complex DMA controller chip on the motherboard.
  • Best Use Case: Interrupt-driven is ideal for slow, sporadic input devices like keyboards and mice. DMA is essential for high-speed devices like SSDs, network interface cards, and graphics cards.

10. Modern I/O Advancements: PCIe and IOMMU

In modern computer systems, traditional DMA has evolved into advanced architectures. PCI Express (PCIe) serial point-to-point interconnects allow lightning-fast DMA transfers directly between GPUs, NVMe SSDs, and system RAM. Furthermore, modern CPUs include an Input-Output Memory Management Unit (IOMMU) to translate virtual I/O addresses and provide hardware security protection against rogue DMA attacks.

11. Everyday Analogy: Restaurant Waitstaff vs. Delivery Truck

  • Programmed I/O: A waiter stands at the kitchen counter staring at the chef, asking every second, "Is the burger ready yet?" (100% wasted time).
  • Interrupt-Driven I/O: The chef rings a bell every time *one* French fry is ready. The waiter runs into the kitchen, picks up one fry, brings it to the table, and repeats for every single fry.
  • DMA: The restaurant hires a dedicated delivery cart (the DMA controller) that loads all 50 plates of food at once, wheels them to the dining room table in one trip, and only notifies the manager when the entire table is fully served.

12. Exam Conclusion and Summary

In conclusion, input/output organization is critical for balancing system efficiency. While Programmed I/O wastes processing power through busy-waiting and Interrupt-Driven I/O frees the CPU for sporadic events, both become inefficient when handling high-volume data transfers. Direct Memory Access (DMA) solves this by delegating bulk data movement to a dedicated controller, reducing CPU overhead to a bare minimum and enabling the high-performance computing standards we rely on today.

Part 4: Solved Multiple Choice Questions (MCQs)

MCQ #1 Which of the following models forms the fundamental basis of modern computer architecture?

Harvard Model
Von Neumann Model
Turing Model
Babbage Model

MCQ #2 Which component of the CPU is responsible for performing arithmetic and logical operations?

Control Unit
Registers
Arithmetic Logic Unit (ALU)
Cache Memory

MCQ #3 What is the primary function of the Control Unit (CU) in a CPU?

Storing program data
Executing arithmetic operations
Directing the operation of the processor
Managing peripheral devices directly

MCQ #4 Which memory type is situated at the top of the memory hierarchy in terms of speed?

Main Memory
Magnetic Disk
CPU Registers
Cache Memory

MCQ #5 What is the main purpose of utilizing cache memory in a computer system?

To increase permanent storage capacity
To bridge the speed gap between CPU and main memory
To replace the hard disk drive
To manage input and output devices

MCQ #6 During the instruction execution cycle, what is the first step performed by the processor?

Execute
Decode
Fetch
Store

MCQ #7 What does ISA stand for in computer architecture?

Information System Architecture
Instruction Set Architecture
Internal System Algorithm
Integrated Software Application

MCQ #8 Which of the following registers keeps track of the memory address of the next instruction to be fetched?

Accumulator
Instruction Register
Program Counter
Memory Data Register

MCQ #9 How does Input/Output Organization handle the speed mismatch between the CPU and I/O devices?

Using direct memory access and buffers
By increasing CPU clock speed
By removing the ALU
Using secondary storage only

MCQ #10 What is Flynn's taxonomy classification for a traditional single processor executing a single instruction stream on a single data stream?

SIMD
MIMD
SISD
MISD

MCQ #11 Which advanced processor concept involves overlapping the execution of multiple instructions?

Pipelining
Caching
Polling
Virtual Memory

MCQ #12 In a memory hierarchy, as we move from CPU registers down to secondary storage, what happens to the access time?

It decreases
It increases
It remains constant
It drops to zero

MCQ #13 Which bus carries the actual data being transferred between the CPU, memory, and I/O devices?

Control Bus
Address Bus
Data Bus
System Clock

MCQ #14 What is the primary characteristic of a Symmetric Multiprocessing (SMP) system?

Multiple identical processors share access to a single common main memory
Processors operate independently with separate operating systems
Only one processor executes instructions at a time
Processors do not share any resources

MCQ #15 Which component holds the instruction that is currently being decoded and executed by the CPU?

Program Counter
Instruction Register
Memory Address Register
Stack Pointer

Manage Cookie Preferences

Strictly Necessary Cookies

Required for consent storage and site security.

Always Active

View full details in our Cookies Policy & Privacy Policy.