answersLogoWhite

0


Best Answer

When the program is compiled and linked different parts of the program is organised in separate segments. That is our code will be in one segment code means the instructions to be executed this is called as code segment or program memory this is usually readonly. Then there are data which on which the code operates,these data get stored in a segment called data segment. Stack memory is a part of programs memory which will be used as stack in case of function calls to store the IP and parameters variables of the current function. The three types of memory specified above are owned by the corresponding process or program the linker will give info abt where to store which data to the loader, based on these infos loader will load the corresponding image i.e executable in the memory.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between program and data memory?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between main and auxiliary memory?

The major difference between main memory and auxiliary memory is that main memory is directly accessed by CPU but the auxiliary memory is not accessed by the CPU directly.For this the data is first transferred to main memory from auxiliary memory and then from main memory the data is transferred to the CPU for further processing. Answered By: Richa Singh


How does the CPU differentiate between command and data?

In general the only difference between commands, or instructions, and data is the context in which each appears. If the CPU is fetching the contents of memory to get the next instruction, then it assumes that the Program Counter register points to commands. If the CPU is executing an instruction that needs to fetch data from memory, the data at the address specified by the instruction are fetched, assuming that the address points to data. This is what allows a program to be loaded into memory in the first place; the part of the operation system responsible for this operation treats the program as data, loading it into memory as instructed in the file. Then the OS branches to a specified place within that memory and begins fetching instructions there. This blurring between instructions and data has also been used in the past to allow a program to modify itself as it executes. This is usually considered poor practice; some operating systems, such as HP's OpenVMS, even set up memory page protections to keep this from happening.


What is data adapter?

you can get data from dababase to your program memory by data adapter.


Which device can understand difference between data and program?

Devices do not care with this difference. Humans do.


Difference between spooling and buffering?

Spooling is an acronym for Simultaneous Peripheral Operation On-Line and involves placement of data in temporary working area for another program to process. Buffering on the hand, is preloading data into a reserved area of memory which is called the buffer.


What is the difference between data and and program?

A program is a type of data.A program in a computer is group of computer instructions or commands that, when loaded into memory, can be run by the computer processor to accomplish a task. Data is information that can be used by a computer program. It can be data in memory as part of the "workings" of a program, it can be stored in an area called a file or database from where it can be read and written.In modern computers, both data and program can exist in the same memory areas and on the same storage media. Programs are first made in a human readable text form and treated as data while it is being created and modified/edited. Another program (or programs) will convert this data into another form of data which can serve as a computer program.On most computer systems, program and data are stored as files. Usually a program is distinguished from other data by its name (its name will end with ".EXE") or by a special information designating the file as "executable". This is different on the IBM i platform (and its predecessors) where a program is maintained as a program object (*PGM) and data is stored as various types of data and file objects (*FILE).


What is the difference between data and program?

A program is a type of data.A program in a computer is group of computer instructions or commands that, when loaded into memory, can be run by the computer processor to accomplish a task. Data is information that can be used by a computer program. It can be data in memory as part of the "workings" of a program, it can be stored in an area called a file or database from where it can be read and written.In modern computers, both data and program can exist in the same memory areas and on the same storage media. Programs are first made in a human readable text form and treated as data while it is being created and modified/edited. Another program (or programs) will convert this data into another form of data which can serve as a computer program.On most computer systems, program and data are stored as files. Usually a program is distinguished from other data by its name (its name will end with ".EXE") or by a special information designating the file as "executable". This is different on the IBM i platform (and its predecessors) where a program is maintained as a program object (*PGM) and data is stored as various types of data and file objects (*FILE).


Difference between static memory devices and dynamic memory devices?

static memory devices are those which stores data permanently as long as power is applied. and dynamic memory devices are those in which data is not permanently stored even with power applied,unless data is periodically rewritten into memory.


Who is Von Neumann?

Von Neumann was the first person to suggest to concept of the stored program. This concept states that there is no difference between computer instructions and data. More importantly, he suggested that it was not necessary to have separate storage location for a computer program and data -- hence today, computer instructions are stored in primary memory for execution, along with other data.


What is the difference between labels and addresses?

Labels are symbolic representations used to identify memory locations in a program, while addresses are the physical locations in memory where data or instructions are stored. Labels are used by programmers for easier reference and readability, while addresses are the actual numerical values representing the locations in memory.


What is the purpose of storing a program in memory?

Anything stored in memory can be accessed much faster than items stored on the harddrive. This is basically because of the physical composition of memory chips which allows for much faster data-transfer. The tradeoff is the amount of space that memory provides, and the number of programs that end up sharing the memory. So, when a program is stored in memory, its execution is much faster. However, if a program exists ONLY in the memory, and does not store any data on the primary disk, then when you exit a program, all your data will also be destroyed due to active memory management that takes place. Data will not persist when program exists. Hence, you will need to write the data to a file on the hardisk which can be accessed later and loaded into the memory next time when the program runs.


What is the difference between linking and loading process?

Linking is a process of combining various pieces of code and data together to form a single executable file. Loading is the process of copying the program from hard disk to main memory in order to put the program in executable state