This document goes over the UbixOS VMM


1. Memory Layout -

   Each application has its own private 4gb memory area the first 1mb is mapped 1:1 against the systems memory and is shared between all of the proccess
   on the system it include bios information video buffers and the kernel code.

   From 0x100000 - 3gb this memory region is available for the task itself for its code data and anything else it may need it for

  The top 1gb is reserved and shared across every application this is the os memory region not readable by the application unless it is in a syscall

  at 0x100000 the applications page directory is stored and page 0x768 is all the pagetable listed in the page dir specified at 0x100000

2. Functions -

   vmmInit: 
     This function initializes our memory map and paging system if either fail this returns a failure.

   vmmMemMapInit: 
     This initializes our memory map, it is a linked list of available pages it keeps track of COW (copy on write) as well as ownership and status
  
   vmmPagingInit:
     This initializes our paging system sets up default memory area for kernel and remaps the memory map into the top 1GB this builds the memory foundation
     for each application to follow

   vmmCreateVirtualSpace:
      This creates a new virtual space for a process it takes on arg pidType pid and returns the base address of the new page directory
        This has the shared lower 1 mb and top 1GB everything inbetween is available for the process

   vmmCopyVirtualSpace:
     This copies the current virtual space for the process specified by the arg pidType pid passed in. This copy sets all the pages for 2mb -3gb COW and no
     memory is physically copied when the program attempts to write to this region a page fault happens then the memory is physically copied

