memory-managementcomputer-sciencevon-neumann

introduction to CS - stored-program concept - can't understand concept


I really do tried to understand the Von Neumann architecture, but there is one thing I can't understand, how can the user know the number in the computer's memory if this command or if it is a data ?

I know there is a 'stored-program concept', but I understood nothing...

Can someone explain it to me in a two sentences ?

thnx !


Solution

  • Put simply, the user cannot look at a memory address and determine if it is a command or data. It can be both.

    Its all in the interpretation; if the program counter points to a memory address, it will be interpreted as a command. If it is referenced by a read instruction, it is data.

    The point of this is flexibility. A program can write (or re-write) programs into memory, that can then be executed by setting the program counter to the start address.

    Modern operating systems limit this behaviour by data execution prevention, keeping parts of the memory from being interpreted as commands.