EEN521 T, Operating Systems, Spring 2012
Tues, Thurs at 5:00 p.m. in MM206

The Book

Examinations

Documentation

Assignments

email to grader521 at rabbit.eng.miami.edu, include typescript/screenshot.
     1   due   Tue 21st Feb.      Design your own disc file system, and plan the implementation. Details here.     
2   due 5pm Tues 7th Feb. Work out ways of having files more than 51,200 bytes long.
3   due 5pm Tues 6th Mar. Compose and run a very simple assembly language program just to make sure you can.
4   due end of semester Exploit the gets() vulnerability, Details here.
5   due end of semester complete your file-system implementation.
6   due end of semester in small groups, implement a protocol layer on top of (fake) IP that provides reliable communication even when packets are randomly lost.

Class History

Class 1  Tue 17‑1‑2012   Exploring a couple of the mysteries that operating systems provide.
Magnetic tapes as an introduction to disc technology:
A single magnetic tape unit, and a bunch of them in a typical large installation.
A reminder about probability theory for disc drives.
Class 2  Thur 19‑1‑2012   Blocks, checksums, the inter-block gap, hard disc geometry.
Magnetic drums, and one of them opened up, 1957 specs.
A disc drive from 1965, with specs.
Class 3  Tue 24‑1‑2012   Practical reliability.
An emulated disc drive.
Today's sample program code, tidied up a little.
Class 4  Thur 26‑1‑2012   Making real files and a directory.
Today's sample program code, tidied up a little.
Class 5  Tue 31‑1‑2012   The need for a "super block", and in-memory copies of essential information that must be saved before the system shuts down. A few more reminders of nasty C++ "features" to beware of.
Here's a list of all the signals.
Contiguous Allocation file systems: fast reading and creating files, but disc space rapidly gets fragmented so only tiny files can be created, "condense" operation is very slow.
Class 6  Thur 2‑2‑2012   (files for compatibility: compat.txt, unicompat.txt, wincompat.txt)
Formats for files. First, a very bad idea.
Structures for file header blocks.
Class 7  Tue 7‑2‑2012   Different file formats, their maximum supported sizes and speed performance for both sequential and random accesses. Linked list of blocks (terrible), linked list of header blocks (not good), 1-level, 2-level, 3-level indexes etc etc. i-node-like multiple index levels, variable-level indexes with dynamic reformatting, and NTFS's runs.
What a design and implementation of a file system looks like: a library of functions like open, close, read, write, lseek, delete, and some carefully designed structs for file information and buffers.
Class 8  Thur 9‑2‑2012   Clusters can waste a lot of space, but can dramatically improve performance.
Careful defragmentation of files gives the benefits of contiguous allocation without its disadvantages.
Strategies for implementing the free list. Don't use a bitmap or a linked list.
Class 9  Tue 14‑2‑2012   All about i-nodes: fsck to recover from disc trouble, directories containing things that aren't files, mount points, /dev, /proc, etc.
The basic operation of interrupts.
A primitive version of virtual memory.
Class 10  Thur 16‑2‑2012   Protection through the mode=system/user bit. Cache implementation and usefulness.
Page based virtual memory: single segment for the fortran model of programming, one continuous page table per process; four segments - user statics, user stack, system statics, system stack - four page tables, but trouble when they are too big to fit in a single page.
The intel model 4K pages, one big page directory per process and up to 1024 page tables.
Class 11  Tue 21‑2‑2012   The complete details of modern virtual memory systems: page table directories, page tables, page protections, valid/resident, dirty, and copy-on write COW bits.
Class 12  Thur 23‑2‑2012   Dynamic linking, the memory map file. What is required to support an independent process? what is in a process control block.
Class 13  Tue 28‑2‑2012   Process creation, why fork and exec are as they are, the true usefulness of the COW bit.
Process states: the life-cycle of unixish processes.
Class 14  Thur 1‑3‑2012   Demand-paging, taking pages away from processes as necessary, not loading them from disc (executable or library file) until needed. Swapping, whole processes being swapped out when memory is tight. Page files, Swap files, why the vaild bit is often called the resident bit. RSS Resident Set Size.
Class 15  Tue 6‑3‑2012   examples from thursday.
Stack Frames and Local Variables: all the gory details.
Class 16  Thur 8‑3‑2012   Do you recongise this function?
Worminess: a little program using the infamous gets() function, and being vulnerable to worms and virusses.
Spring Break
Class 17  Tue 20‑3‑2012   Problems with shared resources: deadlock with the card reader and printer, loss of information using shared variables. Semaphores with P(S) and V(S) would be a solution if only we could work out how to implement them.
Class 18  Thur 22‑3‑2012   Atomic test-and-set instructions, memory interlock to implement semaphores. vax.
The dining philosophers, attempts to prevent deadlock or deal with it when it happens; ordered allocation of resources.
Class 19  Tue 27‑3‑2012   Test Day.
Class 20  Thur 29‑3‑2012   Complicated "extensions" to the idea of a semaphore. Java's synchronised methods are Monitors.
Reminder: Microsoft thing 7 pm in MCA 202 and here too.
Class 21  Tue 3‑4‑2012   Memory technology: mercury delay lines, and a whole assembly; a nickel delay line.
magnetic core memory: one, two, three, four, five, six, seven.
dynamic and static ram.
The good old ASR-33 teletype, DTE and DCE equipment, modems and RS-232; the serial-line ring network. (irrelevant: a non-transparent Digico Micro 16V).
Class 22  Thur 5‑4‑2012   Packet switched networks vs Circuit switched networks, general packet formats. Cambridge ring, token rings, Aloha-net, ethernet, IP gateways. The protocol formats.
Class 23  Tue 10‑4‑2012   ARP, DNS, UDP, and everything about internet communications except TCP.
Class 24  Thur 12‑4‑2012   IP simulator: documentation, fakeip.h, fakeip.cpp, main.cpp.
Exploring the high-level protocols: sending fake emails with SMTP, discovering HTTP by writing a server what we've got so far.
Class 25  Tue 17‑4‑2012   Making an internet client is even easier than making a server. Further investigation of the HTTP protocol. The FTP server/client style. The basics of the TCP protocol, ensuring that data is delivered correctly or the sender knows about it.
Class 26  Thur 19‑4‑2012   Continued technological advancement requires more processors, not just ever-faster and bigger single processors. Tightly coupled arrays of very small processors, Inmos transputer, constant time sorting, a futuristic graphics display.
Class 27  Tue 24‑4‑2012   Dynamic memory: heap management.
The "buddy" system, demonstration and code.
More commonly used systems with lists of chunks of various sizes.
Class 28  Thur 26‑4‑2012   A common heap organisation.
Garbage collection: never having to say delete/free. Reference counts don't work. Mark and Sweep / Copying between two heaps. How do you know whether a value is a pointer or not?