why do we use RAM model of computation for algorithmic analysis when it corresponds to harvard architecture?

287 Views Asked by At

As per Wikipedia , RASP model of computation corresponds to von Neumann Architecture while RAM model of computation corresponds to Harvard Architecture and von Neumann architecture is closest to computers since we have ram memory in our computers which stores data as well as instructions in it , while RAM model has different program memory and different data memory , so why do we use RAM model for algorithmic analysis ?

https://en.wikipedia.org/wiki/Random-access_stored-program_machine

1

There are 1 best solutions below

0
On

Unless your algorithm uses self-modifying code, the distinction doesn't matter, for the reasons Margaret points out.

Also, as far as real hardware is concerned, (almost?) all modern CPUs that have a cache have split instruction/data L1 caches, so the actual CPU core is more Harvard-like than von Neumann. Instruction-fetch rarely competes with data access.

Wikipedia's Modified Harvard Architecture article goes into more detail, and mentions other ways that mostly-Harvard architectures that can still be programmed by programs.