Why is it said that hardware support is needed for practical virtual memory implementation? And what kind of support are we talking about?
Recall that in virtual memory systems, programs use logical addresses, which are mapped to physical addresses by the virtual memory subsystem. This mapping takes place for each memory access. If this were to be done entirely in software, it would be extremely inefficient and also vulnerable to security loopholes, and therefore impractical.Thus, the primary hardware support needed is an architecture which is designed for virtual memory, in the sense that there is a provision for addresses generated by the CPU to be automatically and efficiently translated, with the use of registers, caches and tables designated for the purpose. In this case, the OS just has to set up and manage these registers and tables appropriately. Apart from this provision of page table registers and cache (TLB) in the architecture, the hardware support includes provision of usage bits for implementing page replacement and protection policies.