This page contains extra information of use to you in the Operating
Systems Course.
This was the exam given at WPI on February 5, 2007 ---- CS3013_Midterm_C07.pdf
| Topic |
Source
Code |
Comments |
| Chapter 3 - Processes | signal.c,
ManyProc.c, ManyProc.exe, RunManyProc.bat, RunManyProc.sh, CreateProcessTree.sh myForkExec.c, CanYouKillThis.c |
Program to receive
signals via a
kill command. 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 |
ProcessOrThread.c ProcessorThreadOrClone.c |
Shows simple properties of
processes and threads. Uses processes, threads, and clones to look at properties of shared memory, kernel threads, etc. |
| Performance of
Processes and Threads |
LINUX WINDOWS THREAD Creation PerformanceOfThreads.c Scheduling PerformanceOfThreads.exe PROCESS Creation ProcessCreationTime.sh ProcessCreationTime.bat Scheduling runSchedTimes.sh runSchedTimes.bat |
|
| Chapter 5 - Scheduling |
sched.c
sched.exe RunSched.bat
SchedTimes.c
SchedTimes.exe
|
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? The Linux Scheduler. In this code see: |
| Chapter 6 - Synchronization | ThreadsRunAmock.c
ThreadsPeterson.c ThreadsTamed.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 * DeadWrongXn.c * DeadRight.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 Simple.c * arch.c arch.exe |
Example of the mmap
system call. Look at how globals, stacks, and memory are virtually addressed Understand the underlying memory structure supported by an OS |
| Chapter 9 - Virtual Memory |
StackItHigher.c
StackItHigher.exe
HeapItOn.c HeapItOn.exe |
How much memory does
an OS
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 |
A Look at the FAT file
system |
Shows the result of digging
around on a FAT floppy! |
| myfork.C myexec.C |
Simple fork program. Simple fork and exec program |
|
| pcthreads.C,
prodcons.C |
Producer/Consumer
with threads Producer/Consumer with fork |
|
| mmapexample.C | Example of the mmap system call. | |