FAQ Database Discussion Community


Driver mmap operation Page table creation

linux-kernel,linux-device-driver,mmap,virtual-memory,page-tables
I am trying to understand mmap operation in a driver. I know why we are doing mmap. I am confused with the following 2 implementations of mmap: int my_mmap(struct file *filp, struct vm_area_struct *vma) { vma->vm_ops = &mmap_vm_ops; vma->vm_flags |= VM_RESERVED; /* assign the file private data to the vm...

How to get the page table content of a process in Linux?

linux,unix,memory,module,page-tables
I'm trying to display top-level page table of a process that I created. How can I get the page table content of a process inside a module I write in Linux? I'm using Ubuntu 14.04 LTS virtual machine on a Windows 8 host with 64-bit Intel architecture. ...

Calculating the size of a 2-level page table

memory,operating-system,paging,page-tables
So I have page sizes of 4kb, 32 bit address CPU and an implemented 2-level page table. I want to store 1081 pages, so I need: 1024 entries in the 2-nd level page-table 57 entries in another 2-nd level page table A top level page table holding 2 entries. Now,...

How to Calculate Effective Access Time

operating-system,paging,tlb,page-tables
Assume TLB hit ratio is 90%, physical memory access takes 100ns, TLB access takes 20 ns, compute the effective access time for a processor that uses two level page tables, and parallel TLB and page table indexing. This was my formula: (H)(TLB access time + mem access time) + (1-H)(TLB...

Why is the adressspace increased from 32 to 36 bits with PAE

paging,computer-architecture,ia-32,page-tables
The IA-32 architecture implements PAE to increase it's address space from 32 bits to 36 bits, this is done by dividing the page table in a three-level scheme. Page directory table -> page directory -> page table -> 4-kb page How is the increase from 32 to 36 bit address...

Do multi-level page table store the entire page-table if only half is used?

memory,memory-management,paging,page-tables
Imagine I have a 2-level page table with 1024 entries. Consider that only 3 2-level page tables are used, of which one is half empty, so I have a top-level page-table with three entries. Now, how much memory does my page table system occupies in my RAM? Do I have...

Determine addresses and page table size

operating-system,size,memory-address,virtual-address-space,page-tables
I know that this question has been asked many times but I still feel I struggle with it. Given: physical memory: 2^20 32-bit system page size: 2^10 I need to determine what a physical and virtual addresses would look like as well as calculate the page table size. I am...

Flush TLB on a context swtich

operating-system,virtual-memory,context-switch,tlb,page-tables
This may depends on the OS, but in general as I understand that when there a page fault (the desired page is not in main memory) occurs OS will instruct CPU to read the page from disk, and I am wondering does OS dispatch to another process while the disk...