Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please answer following question: What information is held in the memory address

ID: 3572657 • Letter: P

Question

Please answer following question:

What information is held in the memory address register of a computer? Explain how a file can be moved from one directory to different directory on the same physical disk without copying the data in the file, that is, what steps must the OS take? Explain what actions are taken by the memory management unit and the operating system to handle a page fault on a computer that implements virtual memory and has been running for some time. In your answer, address what effect these have on performance.

Explanation / Answer

23.Memory Address register serves half the minimal iterface between Processor(CPU) and Memory.

Memory address register is the CPU register which contains the address for CPU from which the data is to be fetched and it also provides a address in which data is stored.

While writing, CPU fetches data from Memory data register whose address is stored in the Memory Address register.

24.Every file has a unique inode.The data of the file are stored in many different disk blocks that will be any place of the disk.The inode list contains all the address of the particular file.To move a file, the inode of the root directory is identified from where the inode of the file can be found.Now search for the directory where the file to be copied (say home) add the inode list of the file to the inode of the new directory(say home).

25.Steps taken by the Operating System,

-Hardware switches from user mode to kernel mode.

-Current program counter is noted or added to the stack and the CPU register store the current instruction state.

-General registers and other informations are stored.

-Operating system find the occurance of Page fault and find the virtual memory through which the pagefault occurs.

-validation of the virtual address is checked and it is rejected if it is not valid.and is also checked for protection fault.

- It checks for free frame if there is no free frame, page replacement algorithm is used.

-If the frame is free, page is loaded.

-the instruction that causes fault is set to intial pointer and then reset to this instruction.

-The process that causes fault is scheduled and all the information is reset by running a assembly language program by the operating system to restore the register and state information.

-Control is shifted back to user mode.

Steps involved in page fault by Memory Management

*the memory address requested is checked for validation.If the reference is invalid the page is terminated.

*A free frame is choosen from the free frame list.A disk operation is scheduled and the necessary page is choosen from the disk.

*After the completion of the I/O operation the page table is updated with new frame number.Invalid bit is changed to indicate that there is valid page refernce.

*The instruction caused the page fault is restarted from the begining.