Giter Club home page Giter Club logo

os's Introduction

os

Repository to accompany me along my OS journey. This repo consists primarily of C code that ranges from the creation of basic kernel modules to code that utilizes POSIX system calls.

Random things learned:

  • A good way to view the default include path for gcc is echo | gcc -E -Wp,-v -x c -
    • -E only runs the C preprocessor
    • -Wp,option flag passes option directly to the preprocessor, bypassing the compiler driver. Here -v indicates verbose
    • - indicates the input will be coming from stdin
    • -x c indicates the "C" language; this is good to do since we're accepting input from stdin
  • Finding the full path of some included header can be done with echo "#include <someHeader.h>" | gcc -E -x c -| grep /someHeader.h
  • System calls are found in the second section of the man pages, and therefore can be accessed via man 2 <systemCallhere>
  • Wow I finally learned the UNIX filesystem permission model!
  • Makefile rule/target stuff: !^@=target
  • CTRL+v in insert mode in vim inserts a literal copy of the next character (https://stackoverflow.com/a/4781099/3947332)

os's People

Contributors

domfarolino avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

os's Issues

Add signal examples

We want examples demonstrating/do the following:

  • That the process mask changes temporarily in signal handlers
  • Check the pending signals for a process in a signal handler via sigpending
  • Show the coalescence of pending signals of the same type (this can be done by letting signals accumulate either in a slow handler (that lets the sigs accumulate) or by explicitly blocking signals of a certain type (letting sigs accumulate), and then unblocking the signals and showing how many times the handler is run (prob 1).
  • sigprocmask vs pthread_sigmask
    • Demonstrate how setting a thread's signal mask doesn't change the containing process's signal mask, thus allowing threads to selectively choose which signals they can and cannot handle.

Make (unsafe) producer-consumer

Make (unsafe) producer-consumer shared memory example with bounded buffer and two variables. An example can be found in the OS book, and the code should end up in the 04-IPC folder.

Add vfork example and analysis

We need an example, explanation, and analysis on the vfork system call in this repository. The analysis can consist of creating a ton of processes in the

  • Traditional manner (fork)
  • Efficient manner (vfork)

...and loading a new process into their address space via exec. Doing this a lot and then providing the differences in time-of-execution for each version will demonstrate the benefits of using vfork when you can, and the general description of vfork should explain when you should/can use it (since the two processes share the same address space it isn't wise when one is modifying a lot of global data the other needs etc).

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.