zrasco / xv6-swapfile Goto Github PK
View Code? Open in Web Editor NEWModification of xv6 OS for independent research project at UNLV.
License: Other
Modification of xv6 OS for independent research project at UNLV.
License: Other
Extended the xv6 OS to include a Virtual Memory Manager with swapfile support and LRU cache. Supervised by Ed Jorgensen and Dr. Ajoy Datta in 2018 during my senior year at UNLV (RIP Dr. Datta :( ) Changes made: console.c --------- printaddr() method added changed %p to print address instead of integer defs.h ------- Added struct vminfo_struct; All new functions from kalloc.c procsmemorystats() and find_proc_pte() from proc.c vminfo and pgtabinfo internal functions from vm.c swapfile functions from swap.c & usermode swapfile initialization in swapuser.c exec.c ------ Removes LRU mappings from process before exec() overwrites page table Debug output & new statistics for processes initialized file.h & fs.c & fs.h ------ Support for double inode indirection added (for larger swapfile) init.c ------- init now spawns a temporary process to inititalize the swapfile before executing the shell kalloc.c --------- added statistical fields to kmem kswapmem data structure Added invoke_swapper(), kmaxprocsize(), kexistfreepages(), kfreepagecnt(), kallocatedpages(), kallocbeginning(), kgetfreelistptr() freerange() debug info printing kalloc() now invokes swapper to give a page, if none available main.c ------- Added kswapinit() step to initialize the swap space, just before userinit() Makefile -------- Now links swap.o Now links swapuser.o (ULIB args) Added 8MB SWAPFILE to fs.img UPROGS now includes zeb_test EXTRA now includes zeb_test.c, swap.c and swapuser.o memlayout.h ------------ PHYSTOP changed to various values (commented out) for testing swapping mkfs.c ------- Debugging info added to main(), currently commented out (for doubly-indirect inodes) balloc()/iappend() modified to allow doubly-indirect inodes param.h ------- FSSIZE increased from 1000 to 20985 for larger file system printf.h ------- printaddr() function added %p and %x now print addresses, not integers proc.h ------- Statistical fields related to swapping and page faults added swap.h, swap.c, swapuser.c (No modifications, files did not previously exist.) ------ Contains kernel & user swap/LRU API header & implementation syscall.c & syscall.h & sysfile.c --------- 4 system calls added: vminfo, pgtabinfo, setswapfilefd, sbrk_force_swapout sysproc.c --------- sys_sbrk() modified for lazy allocation sys_sbrk_force_swapout(), sys_vminfo(), and sys_pgtabinfo() added trap.c --------- Support for NULL reference protection, lazy allocation, swapping, and LRU added types.h --------- Added NULL constant and vminfo_struct data structure user.h ------- Added vminfo(), pgtabinfo(), setswapfilefd(), sbrk_force_swapout(), and swapinit() usermode API calls usys.S ------- Added vminfo, pgtabinfo, setswapfilefd, and sbrk_force_swapout system calls vm.c ----- Added support to copyuvm for lazy allocation, swapping, and LRU Added vminfo_internal() & pgtabinfo_internal() methods zeb_test.c ----------- Various tests of functionality added for virtual memory
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.