EEN521, Operating Systems, Autumn 2009

Documentation

Tiny example of entering, assembling, and single-stepping through a program.
Hardware Description - Instuction Formats and Specifications.
Advanced Hardware Operations - including PERI options.
Information on Using the Emulator.
Full documentation for the assembler.

Assignments

     1   due   23 Sept 2009      Design a numeric recursive function, and convert it to assembly language using all the proper frame-pointer-relative addressing methods. Make sure it uses some local variables as well as parameters, so you nkow you have got it right. Run it under the eumlator so that you really know that you have got it right. A helpful suggestion.
Write, in assembly language, a function that will print an integer correctly in decimal. Use it with your recursive function to print the result and make a complete program.
    
     2   due   7 Nov 2009      In your groups:
Make your own Autocode system. Here are some notes to remind you.
Refer also to the class notes from 7th to 17th October, below.
Design your own autocode language, there is absolutely no need to follow my examples.
    
     3   due   30 Nov 2009      Make your own file system. For the initial stages, especially while your Autocode system is still under development, you can write your code in normal C++, using this software to simulate a disc drive. Your system should be capable of formatting a new disc so that it is ready to use, and using a previously formatted disc along with its existing contents. You should be able to create and delete files, read data from them (just text or bytes is fine) and add data to them, and list directories.
Don't go too far in C++. Take careful note of what the next assignment demands. You don't want to have to re-do too much.
    
     4   due   14 Dec 2009      Extend your autocode system so that it supports all the features that a usable (but very basic) programming language requires. Implement your file system in your own autocode language, and make sure it runs properly under the emulator.     
     5   due   14 Dec 2009      Give your autocode/filesystem combination a convenient-to-use input/output system (in the form of system function calls and test programs) which allows the terminal (keyboard and monitor) and disc files to be used in a consistent way. (Think about how cin and ifstreams, or printf and fprintf, are so similar to each other).     

Class History

     Class 1    Wed 26‑8‑2009      What operating systems are all about, and introducing the big mysteries: How many programs can run at the same time, how files work, and how users and computers can be protected from themselves.     
Class 2 Mon 31‑8‑2009 Practical investigation of memory allocation methods: static, heap, and stack.
Class 3 Wed 2‑9‑2009 All about stack frames, deducing the pre- and post-call sequences.
Class 4 Wed 9‑9‑2009 Realistic assembly language programming.
The example of constructing a string and printing it.
Class 5 Mon 14‑9‑2009 The "gets" worm.
Introducing dynamic memory allocation (malloc) strategies.
Class 6 Wed 16‑9‑2009 Implementing the heap; pointer safety in programming languages; merging neighbouring chunks in the free list; first-fit, best-fit; languages where all objects are the same size; reference counts; garbage collection; multiple size-specific free lists; the buddy system.
Class 7 Mon 21‑9‑2009 Magnetic tapes, CRCs/checksums, blocks and gaps, soft errors and retries, labels, floppy discs. Hard discs, floating heads, landing zone, heads, sectors, cylinders, blocks, tracks.
a reminder about probability theory for disc drives.
A single magnetic tape unit, and a bunch of them in a typical large installation.
Class 8 Wed 23‑9‑2009 Disc speed, rotational latency, seek time, access time for a block. Block numbers, a primitive file system, file meta-data, files as linked lists of blocks, the dreadful FAT-16 system, CHS, unnecessary disc size limits, clusters, partitions.
Class 9 Mon 28‑9‑2009 Ferrite core storage (RAM) one, two, three, four, five, six, seven.
A magnetic drum storage device, and one of them opened up, 1957 specs.
A disc drive from 1965, with specs.
Mercury delay lines, and the whole storage device, and a Nickel delay line memory.
FAT-16 examples.
Structure of a disc system: master boot record (MBR), boot sector, system loader, block allocation table (one bit per block) or Free List. Header blocks for files, long files as linked lists of blocks.
Class 10 Wed 30‑9‑2009 Structs for direct disc access, the super-block, what the bios is like, formatting a disc.
File formats: 0-level and 1-level index, maximum file capacity, analysing access time for sequential and random access.
Class 11 Mon 5‑10‑2009 1-, 2-, 3-, 4-level index files: sequential access time stays the same, random access time gets worse, maximum file size gets much better. Unix-style incremental index levels, buffering pointer blocks, clusters can be beneficial, contiguous allocation for speed and simplicity, condensing a file system, background defragmentation.
Class 12 Wed 7‑10‑2009 Rational systematic translation of functions: the worked example.
Class 13 Mon 12‑10‑2009 Introducing Autocode.
The starting point,
The polish-to-assembly translator for expressions,
Some notes/reminders.
Class 14 Wed 14‑10‑2009 Designing and implementing a useful autocode system:
functions, symbol table, arrays and objects, conditionals.
Class 15 Mon 19‑10‑2009 A step-by-step trace of translating a complex if statement,
Here is a normal-to-polish converter if you want it.
Class 16 Wed 21‑10‑2009 Introducing virtual memory with the Base and Limit register model; protection through the Mode flag bit.
Class 17 Mon 26‑10‑2009 Virtual memory: the four segment model; interrupt processing and the interrupt vector; first ideas of time-sharing.
Class 18 Wed 28‑10‑2009 Modern page based virtual memory systems, page tables, TLB, etc.
A Page Translation Register, A Bunch.
Working out the structure of a process (process control block, process table, etc).
Class 19 Mon 2‑11‑2009 A big worked example showing multiple programs running concurrently under a page based virtual memory system.
Class 20 Wed 4‑11‑2009 The problems with shared resources. Semaphores (implementation and use), Deadlock and what to do about it. Introducing the Dining Philosophers.
Class 21 Mon 9‑11‑2009 CSP Communicating Sequential Processes as a model for multi-process systems (here's an electronic book about it, written by its inventor. You should find the first chapter comprehensible), and modelling the dining philosophers system. Dealing with and avoiding deadlock. Device drivers.
Class 22 Wed 11‑11‑2009 A look at some atomic instructions; The interactions between processes and device drivers; scheduling (discs and processes), priority management; The life-cycle of a process under unix.
Class 23 Mon 16‑11‑2009 Processes, scheduling, and priority from two different systems' perspectives: VMS and Unix.
Class 24 Wed 18‑11‑2009 Network structures: Token ring, Cambridge ring, Aloha net, Ethernet, collision detection, avoidance and response, CSMA/CD, Hardware MAC address, ARP address resolution protocol, coaxial vs twisted pair, LAN, bridge, hub, switch, IP addresses, subnets, DNS domain name service.
Class 25 Mon 23‑11‑2009 IP, TCP, layers, telnet, SMTP, HTTP, How to make your own internet server and client.
Class 26 Mon 30‑11‑2009 Group project presentations:
1: Abdullah Alanazi, Carlos Pinto, Erick Van Zanten.
2: Manuel Alegria, Leo Lopez.
3: Sam Drazin, Eliot Peng, Gil Shohamy.
4: Tamara Elachi, Christopher Gonzalez, Justin Stoecker.
Class 27 Wed 2‑12‑2009 Group project presentations:
5: Sulaiman Almehrezi, Kalan Dawson, Gregory Piard, Chris Van Law.
6: Justin Boyd, Michael Lopez, Justin Williams.
7: Amelia Ellison, Scott Joseph.