Forked from Kernel_Innovators / project2608132
Up to date with the upstream repository.

OptimizedPintOS

OS原理赛道_模块实验设计_OptimizedPintOS

Introduction

OptimizedPintOS is a project developed for the OS Principle Track competition, building upon Stanford University's educational operating system, PintOS. This project enhances the original PintOS by completing and optimizing its four main modules: Threads, User Programs, Virtual Memory, and File Systems. Our team has successfully passed all the test points for each project module, demonstrating the reliability and efficiency of our improvements.

Project Structure

  • Project 1: Threads

    • Implements priority scheduling, advanced scheduler (multi-level feedback queue), and synchronization primitives.
  • Project 2: User Programs

    • Handles user process execution, system calls, process control, and file operations.
  • Project 3: Virtual Memory

    • Features paging, page replacement algorithms, and memory-mapped files.
  • Project 4: File Systems

    • Extends filesystem functionality, including directory operations, file growth, and caching.

Each module has been thoroughly tested and optimized to meet the rigorous requirements set out by the course and competition guidelines.

Installation and Usage

To install and run PintOS_all_killed:

  1. Clone the repository:

    bash
    git clone https://gitlab.eduxiji.net/T202414423994885/OSKernel2024-T202414423994885.git
  2. Navigate to the project directory:

    cd OSKernel2024-T202414423994885/src
  3. Navigate to a specific project to be tested (choose one from threads, userprog, vm, filesys), e.g.:

    cd src_proj1/threads/

    For 'userprog':

    cd userprog

    Annotate the code following in the Makefile.build:

    vm_SRC  = vm/frame.c			# Frame table file.
    vm_SRC += vm/swap.c         # Swap handle file.
    vm_SRC += vm/page.c         # Supplemental page table handle file. 
  4. Compile the source code:

    make
  5. Run the tests for the chosen project:

    make check

Authors and Acknowledgment

Authored by Feng Di, Li Xiang from ShanghaiTech University.

Some of the implementation ideas and illustrations in the technical documentation are derived from Prof. Youjip Won (ywon@kaist.ac.kr) in EE415: Introduction to Operating System, KAIST.

License

Pintos, including its documentation, is subject to the following license:

Copyright © 2004, 2005, 2006 Board of Trustees, Leland Stanford Jr. University. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

A few individual files in Pintos were originally derived from other projects, but they have been extensively modified for use in Pintos. The original code falls under the original license, and modifications for Pintos are additionally covered by the Pintos license above.

In particular, code derived from Nachos is subject to the following license:

Copyright © 1992-1996 The Regents of the University of California. All rights reserved. Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without written agreement is hereby granted, provided that the above copyright notice and the following two paragraphs appear in all copies of this software.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.