FC Lecture 08
FC Lecture 08
Faculty of Computing
Fundamentals of Computing
Dr.Sanvitha Kasturiarachchi
2 Harvard Architecture
4 Memory Virtualization
The instructions and data in the system are stored in the same RAM space
and are accessed over a single shared bus. This design creates a
bottleneck because of:
Single Data Path: The CPU can either fetch an instruction from
memory or fetch/write data, but it cannot do both at the same
time because they share the same bus and memory.
Sequential Access: The control unit must fetch instructions
sequentially, execute them, and then access the necessary data. This
slows down performance, when there are large amounts of data to be
processed.
Buffer overflow occurs when a program requests input and stores that
input in a fixed-length data buffer.
If the code is not careful to check the length of the input provided by
the user, it is possible for the user to enter an input sequence longer
than the available storage space. When this happens, the additional
data overwrites memory intended for other purposes.
Advantages:
Simple design.
Easier to implement.
Flexibility due to shared memory for both code and data.
Disadvantages:
The Von Neumann bottleneck limits performance because the CPU
cannot read instructions and data simultaneously.
Slower compared to other architectures due to shared bus access.
Advantages:
Increased throughput because instruction fetch and data read/write
can happen at the same time.
No risk of instruction corruption by data errors.
More efficient use of CPU resources.
Disadvantages:
More complex hardware design because of separate buses and memory.
Difficult to optimize memory utilization since program and data
memory sizes are fixed and separate.
Advantages:
Greater flexibility than strict Harvard architecture.
Instruction and data memories can be optimized for performance
while still allowing some data to be fetched from instruction memory
when needed.
Avoids the bottlenecks of Von Neumann while not being as complex
as a full Harvard system.
Disadvantages:
More complex than the Von Neumann architecture.
Main Memory (RAM) and virtual memory (VM) are crucial concepts
in computer architecture, and they help manage how data is stored
and accessed by the CPU for efficient performance.
Main memory usually separated into two partitions:
Resident operating system, usually held in low memory with interrupt
vector
User processes then held in high memory
Each process contained in single contiguous section of memory
Separate the process into an equal sized pages and store the pages in
the virtual memory.