NE Patriots Super Bowl Champs

Comp 345 - Operating Systems (Fall 2015)

Resources for Linux Threads


In-Class Examples/Handouts

Linux Forks-n-Threads
  • fork1.cpp - simplest program using fork().
  • fork2.cpp - attempt at summing all odd numbers up to MAX.
  • threads1.cpp - first try at "Hello World" with threads.
  • sumodd1_hdout - adding odd values in separate threads.
  • sumodd2.cpp - version 2 of adding all odd values with threads.
  • sumodd3.cpp - final version of sum of odd integers problem with threads.
Linux Semaphores
  • sem1.cpp - first version for in-class semaphore problem.
  • sem2.cpp - working version using C++ "semaphore" capabilities.
  • semaphore.cpp - semaphore example using shared resource.

Projects


Last updated

Home | Comp 115 | Comp 345 | Research | Anti-Research