In what conditions a process gets swapped out from core memory.I understand it occurs when timer interrupt comes and I/O request.correct ? Also,I want to know the different addresses.Does an instruction get the address (If so,where it will be stored),where the variable addresses will be stored ? I am confused between the addresses.I hope everything will be stored in a page only.can you give me a clarification on this ?
Thanks,
Rakesh
Swapping is done IF AND ONLY IF enough free memory space is not available for either a new process to be created or a process has requested additional memory. Just an I/O request OR timer interrupt does not need swapping.
Secondly, note that addresses of datas and instructions are NOT actually stored anywhere. It is the work of the compiler to generate the (logical) addresses as part of all instructions it generates for a program. All MMU does is to map the logical address of memory ( OR logical page number ) to a physical location ( OR page ).
You will learn about the compilation process in detail in sessions 18 – 22.
Keep listening to the lectures. Most of your doubts and questions will be answered as part of the audio itself in later sessions.
Hi,
Process gets swapped out if UNIX runs out of memory and needs more memory for new process / expansion of old processes.
However, even if there is no swapping, MMU would still be required to locate executable programs to correct addresses to which they are loaded. The compiler / linker has to generate absolute addresses for instructions that are going to be known only at the time of loading the process into memory.
MLS Shastry
Please login first to submit.