2082 12

BIT151 ยท 2082 ยท 5 marks

Write short notes on: (a) Microprogrammed Control Unit (b) Virtual Memory.

Write short notes on: (a) Microprogrammed Control Unit (b) Virtual Memory. [5]

Microprocessor and Computer ArchitectureChapter 3: Microoperations and Control Unit DesignMicroprogrammed control unit design

Quick answer

A Microprogrammed Control Unit is a control unit implementation where the control signals required to execute machine instructions are generated by a program stored in a special high-speed memory called the Control Memory (CM).

Short Notes

(a) Microprogrammed Control Unit

Key Concepts

  • Proposed by Maurice Wilkes (1951).
  • Each machine instruction is interpreted by a sequence of microinstructions stored in control memory.
  • A microinstruction specifies the control signals to be activated during one clock cycle.
  • A sequence of microinstructions for one machine instruction is called a microprogram or microcode.

Components

ComponentFunction
Control Memory (CM)Stores microprograms (ROM)
Control Address Register (CAR)Holds address of next microinstruction
Control Data Register (CDR)Holds the current microinstruction being executed
SequencerDetermines the next microinstruction address

Working

  1. Machine instruction is fetched and decoded.
  2. The opcode maps to a starting address in control memory.
  3. Microinstructions are fetched sequentially, generating control signals.
  4. Execution continues until the microprogram for that instruction completes.

Advantages

  • Easy to design and modify (change microcode instead of hardware).
  • Flexible and less error-prone than hardwired control.

Disadvantage

  • Slower than hardwired control due to memory access overhead.

(b) Virtual Memory

Virtual Memory is a memory management technique that allows a computer to use more memory than is physically available (RAM) by using a portion of secondary storage (hard disk) as an extension of main memory.

Key Concepts

  • Programs are given the illusion of a large, contiguous address space called the virtual address space.
  • Only the actively used portions of a program need to reside in physical memory at any time.
  • The rest resides on disk in a swap space or page file.

How It Works

  • The virtual address space is divided into fixed-size blocks called pages.
  • Physical memory is divided into frames of the same size.
  • A Page Table maps virtual page numbers to physical frame numbers.
  • When a referenced page is not in physical memory, a page fault occurs, and the OS loads the required page from disk.

Address Translation

Virtual Address --> [Page Table] --> Physical Address
  (Page No. + Offset)               (Frame No. + Offset)

Benefits

BenefitDescription
Larger address spacePrograms can be larger than physical RAM
MultiprogrammingMore processes can run simultaneously
Memory isolationEach process has its own virtual address space
Simplified programmingProgrammer need not manage physical memory

Disadvantage

  • Thrashing: If too many page faults occur, the system spends more time swapping than executing, severely degrading performance.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.