I need to implement a page table structure that stores data in a 2D array, and can be accessed in a 3D manner. Also it needs to be a multi-level page table. I tried to look up some implementation details, but I didn't find much.
Can you please guide me to some tutorials, etc?
well, think about an image. It's a 2D array of bytes right? now you could access it two dimensionally like
or if you really think about it, no matter you store it in 2D or 1D it will always have a*b elements.
This way if you differentiate between virtual and physical memory, you could access this array by an address translator that lets you access this image, which is stored in a 1D array, in a 2D manner.
it's just a matter of mapping between the coordinates. The same way you can store data in a 2D array, or multiple 2D arrays if required (multilevel page table), and access it in a 3D manner.
Even your OS uses such an operation to perform swapping and memory management, see: http://en.wikipedia.org/wiki/Page_table