Commit Graph

  • ad4eda5385 Merge branch 'vm/syscall-mmap/styling' into 'master' master Task_3_-_Virtual_Memory Saleh Bubshait 2024-12-06 18:37:18 +00:00
  • 8d1b4c4994 Refactor page to follow pintos styling for indentation and add spacing for readability sBubshait 2024-12-06 18:36:54 +00:00
  • 07c0219058 Merge branch 'vm/syscall-mmap/styling' into 'master' Saleh Bubshait 2024-12-06 18:28:39 +00:00
  • 5fbabdcec9 Refactor frame to add spacing and exception for indentation to follow pintos styling sBubshait 2024-12-06 18:27:50 +00:00
  • ce89d3577f fix: synchronise pagedir which now may be accessed by other threads, with a lock vm/pagedir-spt-synch Gleb Koval 2024-12-06 18:22:00 +00:00
  • 5e8bdc68e7 Merge branch 'vm/syscall-mmap/styling' into 'master' Saleh Bubshait 2024-12-06 18:15:47 +00:00
  • d039b59b7c Refactor mmap system call code to follow pintos style in indentation sBubshait 2024-12-06 18:14:47 +00:00
  • 29c0b93711 Merge branch 'vm/pagedir-spt-synch' into 'master' Saleh Bubshait 2024-12-06 17:44:33 +00:00
  • 77fedd6666 fix: synchronise threads' SPTs with locks Gleb Koval 2024-12-06 17:31:33 +00:00
  • 0084d12fb1 fix: synchronise destruction of page directories with frame table bad-synch Themis Demetriades 2024-12-06 17:30:46 +00:00
  • 6943c77630 fix: re-enable shareable pages Themis Demetriades 2024-12-06 17:25:50 +00:00
  • eba8c1ffa8 Merge branch 'vm/merged/pinning-synch' into 'master' Dias Alberto, Ethan 2024-12-06 17:13:02 +00:00
  • be696ec528 fix: re-enable shareable read only executable logic vm/merged/pinning-synch EDiasAlberto 2024-12-06 17:07:17 +00:00
  • 7611090253 Merge branch 'vm/merged/pinning-synch' into 'master' Saleh Bubshait 2024-12-06 16:31:37 +00:00
  • 7f058ffc90 Refactor page_type to rename PAGE_FILE to PAGE_EXECUTABLE as mmap and executables are now separate sBubshait 2024-12-06 16:22:26 +00:00
  • c1bc70adad ci: do not ignore an VM tests since it is fully implemented now Gleb Koval 2024-12-06 15:55:23 +00:00
  • 22f3b0950f Fix: Insert pages in mmap as PAGE_MMAP instead of PAGE_FILE sBubshait 2024-12-06 15:54:46 +00:00
  • f64b92bbfa refactor: document shared_file_page Gleb Koval 2024-12-06 15:35:23 +00:00
  • 3d6e30119b refactor: rename lru_lock to ftable_lock for greater clarity, and update comments to reflect this Themis Demetriades 2024-12-06 15:31:27 +00:00
  • 4104d2c852 fix: always add to frame owners when installing existing shared page. Gleb Koval 2024-12-06 15:23:41 +00:00
  • 9ffcde6089 fix: implement ptable_lock for synchronising the SPT structure for insertions/accesses vm/merged/themis-fix Themis Demetriades 2024-12-06 14:12:28 +00:00
  • d389c15828 fix: acquire lru_lock before pinning frames to avoid race condition with eviction EDiasAlberto 2024-12-06 13:20:43 +00:00
  • 8ac34063d7 fix: disable 'shareable' flag to probe race conditions Themis Demetriades 2024-12-06 10:56:38 +00:00
  • 7965c007c8 feat: add general SPT lock for operations across threads vm/merged/ethan-spt-synch EDiasAlberto 2024-12-06 06:03:22 +00:00
  • c68fea5249 Merge branch 'vm/merged/themis' into 'master' Demetriades, Themis 2024-12-06 05:07:14 +00:00
  • 65da1659e5 feat: merged shared-read-only-executables with the rest of VM vm/merged/themis Themis Demetriades 2024-12-06 04:15:13 +00:00
  • e047e7aa45 Maintain a reference to the frame allocated in the SPT vm/virtual-memory/saleh-synch sBubshait 2024-12-06 02:15:51 +00:00
  • 3897e83963 fix: use correct page_get function within page eviction Themis Demetriades 2024-12-06 01:43:41 +00:00
  • 96b350d623 Merge branch 'vm/mmap-write-back-on-eviction' into 'vm/virtual-memory/themis-synch' vm/virtual-memory/themis-synch Demetriades, Themis 2024-12-06 01:01:50 +00:00
  • 31403ac7cb fix: obtain correct page table entry when performing eviction Themis Demetriades 2024-12-06 00:56:03 +00:00
  • 1da0c7d48c fix: properly assign frame owners and deallocate in all required places vm/shared-ro-executables/gleb Gleb Koval 2024-12-06 00:29:57 +00:00
  • 8220b931a9 Merge branch 'vm/virtual-memory/frame-synch/saleh' into 'vm/virtual-memory/themis-synch' Demetriades, Themis 2024-12-06 00:21:02 +00:00
  • 1efa1fef9a Merge frame pinning into themis-synch vm/virtual-memory/frame-synch/saleh sBubshait 2024-12-05 23:56:25 +00:00
  • fc088a19ac Merge remote-tracking branch 'origin/vm/frame-pinning' into vm/virtual-memory/frame-synch/saleh sBubshait 2024-12-05 23:48:52 +00:00
  • a34bbbed08 Update frame: When evicting an mmapped file page, write it back to the file if it is dirty vm/mmap-write-back-on-eviction sBubshait 2024-12-05 22:53:48 +00:00
  • 833c1b0520 fix: only swap out shared pages once Gleb Koval 2024-12-05 22:37:14 +00:00
  • 9aa9cdb91e feat: implement proper destruction of pages, including for shared pages Gleb Koval 2024-12-05 22:23:50 +00:00
  • 2811ea0eb3 fix: SPT never removes entries until process termination or special case Themis Demetriades 2024-12-05 22:05:02 +00:00
  • b2b3f77a91 Merge branch 'vm/frame-pinning' into 'vm/virtual-memory/saleh' vm/virtual-memory/saleh Saleh Bubshait 2024-12-05 21:55:43 +00:00
  • dd46200256 feat: initial shared file page management and initialization Gleb Koval 2024-12-05 21:46:49 +00:00
  • 6da855fe47 Implement validation of pointers and strings in syscalls with pinning and unpinning to protect against eviction vm/frame-pinning sBubshait 2024-12-05 21:12:31 +00:00
  • 4dd6b6e928 fix: do not leak when inserting the same page twice, just update Gleb Koval 2024-12-05 19:38:27 +00:00
  • 0f1f7b9a6f refactor: extract init_pages Gleb Koval 2024-12-05 19:35:39 +00:00
  • e03273756d Update frame table to add a pinned flag and protect those from being evicted sBubshait 2024-12-05 17:52:01 +00:00
  • 5e2fa57212 feat: initial implementation of shared pages with proper destruction vm/shared-read-only-executables Gleb Koval 2024-12-05 17:30:03 +00:00
  • 7860f3863f fix: add check to mmap to ensure file isn't mapped over stack segment (ed1223) Themis Demetriades 2024-12-05 17:11:02 +00:00
  • d03e253046 feat: implement synchronisation to protecting access to PTEs of SPTs during eviction Themis Demetriades 2024-12-05 16:51:15 +00:00
  • 5cf79b5389 fix: add check to mmap to ensure file isn't mapped over stack segment EDiasAlberto 2024-12-05 16:05:08 +00:00
  • 675e28c3f2 refactor: make shared files table private Gleb Koval 2024-12-05 15:55:09 +00:00
  • 7c8b0fa99a fix: free frames instead of pages on pagedir_destroy Gleb Koval 2024-12-05 15:54:55 +00:00
  • 7f2e50a7d1 fix: free non-shared pages that are in swap + utility functions for frame owners. Gleb Koval 2024-12-05 15:20:20 +00:00
  • 71d91994c1 feat: allow frames to have multiple owner threads. Gleb Koval 2024-12-05 14:44:59 +00:00
  • e779e8ac7c fix: modify stack growth to use frame allocation to allow for page swapping EDiasAlberto 2024-12-05 04:39:50 +00:00
  • 16db01d3d8 Refactor: Check if page is in a swap in fetch_page instead of the page fault handler sBubshait 2024-12-05 03:17:18 +00:00
  • c12cd95093 Fix issues with merging, duplicate references and definition of VM sBubshait 2024-12-05 02:27:48 +00:00
  • f13fd435cd Merge remote-tracking branch 'origin/vm/page-swap-synch' into vm/virtual-memory/saleh sBubshait 2024-12-05 02:21:53 +00:00
  • 598189fddb Merge branch 'vm/page-swap-synch' into vm/shared-read-only-executables Gleb Koval 2024-12-05 02:12:12 +00:00
  • ac31fb1e1e feat: set accessed bit to allocated frames in page_load and get_usr_kpage vm/page-swap-synch EDiasAlberto 2024-12-05 01:41:23 +00:00
  • 1a8eb1bbe5 Merge branch 'vm/memory-mapped-files' into vm/virtual-memory/saleh sBubshait 2024-12-05 01:24:50 +00:00
  • 52ec8fe779 Fix Bug: Grow stack if necessary in case of a page fault in the kernel context sBubshait 2024-12-05 01:15:46 +00:00
  • f171a05108 Merge branch 'vm/stack-growth/saleh' into vm/virtual-memory/saleh sBubshait 2024-12-05 00:51:03 +00:00
  • f06c91cf0d ci: include linear page tests in VM test pipeline Demetriades, Themis 2024-12-05 00:29:49 +00:00
  • 5265fed288 Refactor stack growth to be helper functions in exception for easier merging vm/stack-growth/saleh sBubshait 2024-12-05 00:27:40 +00:00
  • 19d5b02341 fix: remove use of USERPROG compiler flag specific code when the flag is disabled Themis Demetriades 2024-12-04 23:48:51 +00:00
  • 0288e13206 fix: don't discriminate between user and kernel page fault contexts for stack growth, lazy loading, and swapping Themis Demetriades 2024-12-04 23:46:31 +00:00
  • 60faf995ea fix: lazy load executable files of user processes even when accessed in a kernel context Themis Demetriades 2024-12-04 22:21:31 +00:00
  • 61f6374006 Update gitlab CI to only run the tests associated with this feature (mmapped-files). vm/memory-mapped-files sBubshait 2024-12-04 22:06:09 +00:00
  • 4efc9c8e3e feat: add sanity checks to update branch of page_insert Gleb Koval 2024-12-04 22:04:27 +00:00
  • 26a2d40325 Implement implicitly unmapping all mmapped files when a process exits. Refactor to reduce duplication sBubshait 2024-12-04 22:00:59 +00:00
  • 806d6bc19e Refactor: Move destroying mmap data into process_exit instead of thread sBubshait 2024-12-04 21:59:38 +00:00
  • 723055f485 fix: only use lazy loading if VM flag is enabled Themis Demetriades 2024-12-04 21:33:21 +00:00
  • 1e236a5c47 Merge branch 'vm/lazy-loading' into vm/page-swap-synch Themis Demetriades 2024-12-04 19:11:37 +00:00
  • ecbb4e74a5 Implement the unmap system call, writing back to the file if a page is dirty before removing from SPT sBubshait 2024-12-04 19:07:28 +00:00
  • 02b79d1934 Update mmap to add temporarily page_set_swap until swap is implemented sBubshait 2024-12-04 18:13:07 +00:00
  • 857cae3578 Update mmap to add a get helper function to find a mmap entry from its mapping sBubshait 2024-12-04 18:08:05 +00:00
  • 941e1e067a Update SPT page entry to change type from EXECUTABLE to PAGE_FILE to capture mmaps in addition to executables sBubshait 2024-12-04 17:51:30 +00:00
  • ad6e4b4059 Implement syscall_mmap to validate and then map all file data into a user address in memory sBubshait 2024-12-04 17:42:53 +00:00
  • 72fa0c1bbb Fix Bug: Initialise the mmap table for the newly created thread rather than the current thread sBubshait 2024-12-04 17:41:14 +00:00
  • 4bf6914cfa feat: incorporate lazy-loading data & helpers into supplemental page table Themis Demetriades 2024-12-04 16:45:31 +00:00
  • fb73d694bf fix: frame allocation now invalidates the victim process page directory, not the caller's Themis Demetriades 2024-12-04 16:41:13 +00:00
  • 67f16cb2a6 Update syscall.c to allow mmap and unmap system calls through helper handler functions for each sBubshait 2024-12-04 15:31:53 +00:00
  • 6b0f708d8f Update mmap to add an insert helper function to allocate and add new mmap entries to the hash table sBubshait 2024-12-04 15:26:00 +00:00
  • 6e838aa06a Fix Bug in thread.c: Only initialise and destroy mmap files table if VM is defined sBubshait 2024-12-04 15:24:11 +00:00
  • a2f46f3b72 Add a mmap destroy function to cleanup all mmap hash table entries upon thread exit sBubshait 2024-12-04 15:14:02 +00:00
  • 1ce09a49a1 Add helper functions to initialise the memory-mapped files table and counter sBubshait 2024-12-04 15:08:43 +00:00
  • 1b73e415d7 fix: invalidate PTEs of evicted pages before eviction occurs to prevent modificationof pages mid-eviction vm/page-swap Themis Demetriades 2024-12-04 15:02:49 +00:00
  • b3042b5aa6 Update thread structure to add mmap files table and a counter for mappings of the thread sBubshait 2024-12-04 14:56:52 +00:00
  • 85aabd86cd Update gitlab ci file to include mmap tests in the automated testing pipeline sBubshait 2024-12-04 14:55:28 +00:00
  • acc768e177 Add mmap module in vm defining mmap_entry structure and some helper functions sBubshait 2024-12-04 13:00:16 +00:00
  • c0ff53beff feat: proper cleanup for shared pages Gleb Koval 2024-12-04 12:27:39 +00:00
  • f2aba977b4 fix: extract supplemental and shared_files initialisation Gleb Koval 2024-12-04 11:17:46 +00:00
  • 10bfffc4b0 fix: clear shared pages to avoid freeing them Gleb Koval 2024-12-04 11:03:35 +00:00
  • 47a7dfae04 refactor: add comments describing each type of page fault dealt by the page fault handler Themis Demetriades 2024-12-03 21:47:59 +00:00
  • 9a3c8a1c38 fix: grow stack upon page fault in kernel context to support syscall stack growth EDiasAlberto 2024-12-03 20:56:10 +00:00
  • 08eafcf7ef feat: implement page swapping Themis Demetriades 2024-12-03 16:53:47 +00:00
  • df7d847978 fix: remove stack fault checks for page faults outside user non-present addresses virtual-memory Themis Demetriades 2024-12-02 21:07:17 +00:00
  • fbcd3c9f19 ci: include dynamic stack growth tests in VM test pipeline Demetriades, Themis 2024-12-02 20:57:05 +00:00
  • 6190d1bee6 fix: disable dynamic stack growth when VM flag is disabled Themis Demetriades 2024-12-02 20:44:54 +00:00
  • 6adf2e743b refactor: dynamic stack growth functions to follow code style Themis Demetriades 2024-12-02 19:50:40 +00:00
  • 05a48cf9c6 refactor: page fault exception handler follows code style Themis Demetriades 2024-12-01 23:36:55 +00:00