This page contains lots of extra information used in the Operating
Systems Course.
This was the exam given February 5, 2007 ---- CS3013_Midterm_C07.pdf
This is a solution for this exam
----
CS3013_Midterm_C07_Soln.pdf
And these are statistics for the exam
---- CS3013_Midterm_C07_Stats.jpg
Topic |
Source
Code |
Comments |
Processes | signal.C,
ManyProc.c, ManyProc.exe, RunManyProc.bat, RunManyProc.sh, myfork.C, myexec.C |
Program to receive
signals via a
kill command. Creates hundreds of processes - how many does your machine support? Simple fork program. Simple fork and exec program |
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. |
Scheduling |
sched.c sched.exe RunSched.bat | Do identical
processes get their
"fair share" of CPU?
How long does it take a process to reschedule? |
Synchronization | ThreadsRunAmock.c ThreadsRunAmockResults mutexthr.C ThreadsTamed.c |
An adder and
subtractor each
operate on a number. What will result? Uses synchronization in multithreaded program. ThreadsRunAmock --- but now using synchronization |
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 |
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 |
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
various hardware and software platforms. |
FileSystems/IO | fileio.C,
pipe.C |
Simple programs
using files and
pipes. |
Project 1 |
myfork.C myexec.C |
Simple fork program. Simple fork and exec program |
Project 4 |
pcthreads.C,
prodcons.C |
Producer/Consumer
with threads Producer/Consumer with fork |
Project 5 |
mmapexample.C | Example of the mmap system call. |