Skip to content

Zini1027/OSProject

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OSProject-Compressed Memory

Authors

  • Toan Luong
  • Hsiang-Yu Huang
  • Qian Huang
  • Hongyu Cui

Install Nachos

Import Eclipse project

  • File -> Import -> Existing Projects into Workspace -> root directory: OSProject/Eclipse
  • The project use jdk 1.8, so please install jdk 1.8 first.

Modified files

  • machine folder
    • added CompressMemBlock.java
    • modified Processor.java: added findVictim(int) function
  • userprog folder
    • added MemoryCompression.java
    • newly added functions in UserProcess.java
      • Processor.exceptionPageFault case in handleException()
      • getPageTableEntry()
      • readCompressMemory()
      • writeCompressMemory()
      • handlePageFault()
      • pageFaultHelper()
      • swapinIntoFreePhysMem()
      • swapinIntoVictims()
      • printPhysMemStatus()
      • printPageTable()
  • test folder
    • added recursive_sum.c
    • added quick_sort.c

Run test coff file in nachos

cd Eclipse/nachos/proj_mem_comp/
make
nachos -x echo.coff -a hello -a world [-d a]
  • '-d a' is for debugging (optional)
  • make sure nachos is in your PATH

Run & debug nachos in Eclipse

  • Create a Run configuration
  • Main class: nachos.machine.Machine
  • Program arguments: -x halt.coff -d a
  • Working directory: ${workspace_loc:Eclipse/nachos/proj_mem_comp}
  • Apply -> Run

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 87.7%
  • C 10.8%
  • Other 1.5%