This page contains extra information of use to you in the Operating
This was the exam given at WPI on February 5, 2007 ---- CS3013_Midterm_C07.pdf
|Chapter 2 - Overview||SystemCallExample.s||An example of a real program calling the OS|
|Chapter 3 - Processes||signal.c,
RunManyProc.bat, RunManyProc.sh, CreateProcessTree.sh
|Program to receive
signals via a
Creates hundreds of processes - how many does your machine support?
Creates Child, Grandchild, etc. where will it end?
Simple fork and exec program.
A system manager's nightmare - can you make this program terminate???
|Chapter 4 - Threads||
|Shows simple properties of
processes and threads.
Uses processes, threads, and clones to look at properties
of shared memory, kernel threads, etc.
Processes and Threads
THREAD Creation PerformanceOfThreads.c
PROCESS Creation ProcessCreationTime.sh ProcessCreationTime.bat
Scheduling runSchedTimes.sh runSchedTimes.bat
|Chapter 5 - Scheduling
|Do identical processes get their "fair share" of CPU?
What is "fair"?
How long does it take a process to reschedule? Or the equivalent question - how many reschedules per second can an OS/processor accomplish?This represents a serious analysis of queueing theory. See the Scheduling chapter for details on how to run this program.
The Linux Scheduler. In this code see:
|Chapter 6 - Synchronization|| ThreadsRunAmock.c
|An adder and
subtractor each operate on a number.
Shows code from the Peterson algorithm used in class
ThreadsRunAmock --- but now using synchronization
|Chapter 7 - Deadlocks|| DeadWrong.c *
|Two threads each
call mutexes - but in the wrong order.
N threads form a circular wait via mutexes
A solution that recovers from an unsafe situation
|Chapter 8 - Memory Management||mmapExample.c
|Example of the mmap
Look at how globals, stacks, and memory are virtually addressed
Understand the underlying memory structure supported by an OS
|Chapter 9 - Virtual Memory
|How much memory does
allocate to stacks - try it!
How much memory can you get from the heap? Try it!
Record of what happens when we run the previous two programs
on various hardware and software platforms.
|Chapter 10 - FileSystems/IO||
The FAT file system
|Digging around on a FAT floppy!
How many files in a directory?
What is the maximum depth of directories?
How long to write to a file>
|Simple fork program.
Simple fork and exec program
Producer/Consumer with fork
|mmapexample.C||Example of the mmap system call.|