In most multiprogrammed systems,user programs access memory through virtual addresses,while the operating system uses raw physical addresses to access memory.What are the implications of this design on the initiation of I/O operations by the user program and their execution by the operating system?
The user program typically specifies a buffer for data to be transmitted to or from a device.This buffer exists in user space and is specified by a vrirtual address.The kernel needs to issue the I /O operation and needs to copy data between the user buffer and its own kernel buffer before or after the I /O operation. In order to access the user buffer, the kernel needs to translate the virtual address provided by the user program to the corresponding physical address within the context of the user program's virtual address space.This translation is typically performed in software and therefore incurs overhead.Also, if the user buffer is not currently present in physical memory,the corresponding page(s) need to obtained from the swap space.This operation might require careful handling and might delay the data copy operation.