I know that linux uses three level page tables in memory management.
I got confused on the content of the page table.Does page table
contains next level page tables base address or it contains page frame
number?If it contains page frame number then how base address for that
particular page table is got?Where is it stored?
Would be greatful if someone clarified this to me.
If you’re talking about x86(/64), then every page table entry (except the terminal one) contains the physical address of the next page table, and the terminal PTE contains the physical address of the actual code/data page.
Since page tables are organized as pages themselves, their physical addresses are naturally multiples of the page size.
It makes little sense to store full physical addresses in PTEs with the 12 least significant bits being always zero (in case the page size is 4KB), and so they aren’t stored in the PTEs (and the recovered space in the PTEs is used for control flags such as kernel/user, read-only/writable, executable, present, dirty, accessed, etc). Addresses truncated like that are commonly called page frame numbers because they are nothing else but page numbers (if you count all pages from 0 for the page at address 0, 1 for the page at address 4096 and so on).
The ultimate answer to your question with all the gory details is in the relevant CPU manual.