Giter Site home page Giter Site logo

carusogiuseppe / os161 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from j4nn0/os161

0.0 0.0 0.0 2.24 MB

The implementation of systems calls, lock, Virtual Memory and other file system implementation on OS161

Makefile 3.01% C 76.90% C++ 0.54% HTML 15.53% CSS 0.09% Python 0.78% Assembly 1.89% Shell 1.12% Objective-C 0.12%

os161's Introduction

OS161

OS/161 is a teaching operating system, that is, a simplified system used for teaching undergraduate operating systems classes. It is BSD-like in feel and has more "reality" than most other teaching OSes; while it runs on a simulator it has the structure and design of a larger system.

More info here: http://os161.eecs.harvard.edu

Modify the kernel

  1. Create a file in kern/main/yourfile.c and write a function

  2. Modify kern/main/main.c entering a call to your function

  3. In test.h:

    #include "opt-yourfile.h" //(opt-optname.h)
    Insert a prototype of your function  
    
  4. Modify kern/conf/conf.kern inserting the new file (#Startup and initialization):

     defoption yourfile
     optfile   yourfile   main/yourfile.c
    
  5. Generate in kern/conf a new file (for example YOURFILE)

     It can be a copy of DUMBVM adding a new line: "options yourfile"
    
  6. Finally do the make of the kernel:

       In kern/conf
           ./config YOURFILE
           
       In kern/compile/YOURFILE
           bmake depend
           bmake
           bmake install
    

Writing a new system call

  1. In kern/arch/mips/syscall/syscall.c there is switch case in which you can menage the system calls

  2. To menage a system call it's necessary an integer code. See:

    kern/include/kern/syscall.h
    
  3. Create your system call in kern/syscall/my_syscalls.c

  4. Modify kern/include/syscall.h adding a prototype of the syscall function

  5. Modify kern/conf/conf.kern inserting the new file (#System call layer):

    file syscall/my_syscalls.c
    
  6. Finally do the make of the kernel

     In kern/conf
       ./config DUMBVM
       
     In kern/compile/DUMBVM
         bmake depend
         bmake
         bmake install
    

os161's People

Contributors

j4nn0 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.