linux - MMU related to physical memory address handling -


what happens when physical memory occupied process , new process(similar priority) introduced. how memory management unit handle pages(resource) requested new , old processes(same priority tasks).

so mean ask how swapping of memory done similar priority process , physical memory full on other side. please explain example?

you should not care happenning in case, , on current linux deskops & laptops improbable case (because kernel steals page filesystem cache).

when new program started execve(2) syscalls, new memory mappings set (as if done mmap(2)), possibly copy-on-write mechanism. once program accessing them, kernel page-fault , load page in physical ram. may have choose pages should stealed. if dirty, has write them swap zone (or mmap-ed file if mapping map_shared). otherwise, reuses them (and reassign physical pages).

if memory resources used, memory overcommit may happen

the mmu used linux kernel virtual memory management. applications see on virtual address space (look /proc/ e.g. cat /proc/self/maps understand it).

the mmu doing virtual physical address translation , giving page faults. kernel responsible configuring mmu (i.e. setting virtual address space translation mechanism) , handling page faults (which invisible application -e.g. because kernel fetch page disk, filesystem or swap area-, except sigsegv signal occurs when "non-existent" page accessed).

please take time read links given here.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -