1 | due: Sun 29th January. | A simple program in BCPL. | |
2 | due: Sat 18th February. | A level-1 index filesystem - Just what you've got so far. | |
3 | due: Sat 25th February. | A level-1 index filesystem - Final polished working version. | |
4 | due: Tue 21st March. | Using the heap, a linked list program. | |
5 | due: Wed 5th April. | Making your own heap to support your linked list program. | |
6 | due: Mon 17th April. | A special research assignment. | |
7 | due: Fri 5th May. | Make everything work together. Be sure to follow the rules, there won't be much time for corrections. | |
8 | due: Fri 12th May. | Extra credit extension to assignment 7. | |
Friday 12th May is the absolute drop-dead deadline for everything. |
Quick introductions. A few mysteries to motivate the course. Introducing BCPL, we got up to just before the inbin function (in section 7). | ||||||
Nearly done with BCPL, we reached the defective definitions of newvec and freevec in section 33. | ||||||
(what Luis said, the OS's usual responsibilities with memory) Finished learning BCPL. (remember there is a shorter version of the docs if you just need a cheat-sheet). 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 and tape drives. Blocks, checksums, the inter-block gap. Magnetic drums, and one of them opened up, 1957 specs. A disc drive from 1965, with specs. A picture and some out-of-date calculations. | ||||||
Writing output to a "magnetic tape" in BCPL. Reading from a tape too, the program we made. A better-designed input/output library. | ||||||
Exchangeable Disc Drive. (TTY = teletype = user's terminal); A TTY port. Disc operations available for us to use. Single block files and directories, with a very poor block allocation scheme, Where we had got by the end of the class. | ||||||
Completing the single block file system, here it is. A quick examination of a real unix directory. Small or large directory entries? Microsoft's original design (bottom of 3rd page). Header blocks and I-nodes, multi- or variable-levelled index structures, Maximum file sizes, access times, partitions and clusters. | ||||||
When a file grows, linked lists of blocks, hard and soft links. The free block list, or a bitmap. RAID. | ||||||
SSDs and discs, failure modes. B-trees, ReiserFS. A look at FAT-16: MBR, boot sector, FATs, etc. NTFS, the master file table, "header blocks", extents/runs. | ||||||
There is time to deal with problems. Allocate as needed. times, versions, unix partitions, mount points, journalling. A program illustrating memory layout, Another program illustrating how expressions are coded, How function calls work, FP, PC, SP, stack frames. | ||||||
Further explanation of the list/stack of free blocks. Instruction formats and fixes. Continue with how function calls work. | ||||||
No finish, go for proper error codes. bcpldate and ded (improved since, use the h command for details). Detailed demonstration of the file system. Worms. | ||||||
You probably want an ls and a stat,
and a potentially useful function. Malloc and free (or newvec and freevec). Linked lists, recombination, etc. A better scheme for malloc and free. | ||||||
Compiling programs that occupy multiple files. Testing a heap allocation system, run /home/www/class/een421/heap0, or 1 or 2. Garbage Collection, Fragmentation, Handles. | ||||||
The Buddy system illustrated. Mercury delay lines, again, Nickel delay line. Core Memory: C2, C3, C4, C5, C6, C7. | ||||||
Virtual Memory. A vastly simplified version first: segmented addressing. Intel's 32-bit scheme, (CR3; 10, 10, 12), Virtual addresses, physical addresses, address/page translation, page tables, page directories, data pages, system mode, interrupts. | ||||||
The whole virtual memory process. TLB in the cache, extra bits in table entries, swapping pages out, resident bit, dirty bit. | ||||||
Break | ||||||
Two little enhancements: cline.b, other.b. Relocatable code, moving the OS to the virtual addresses it belongs in. Our emulator's virtual memory scheme (PDBR; 10, 11, 11). What's in memory when virtual memory is active: Addresses in page dir are wrong, should be B000, B1FF, B200, B2FF, B300. The free page list. Running something in user mode under virtual memory. | ||||||
We got as far as creating the page directory and tables. Interrupts and how they are processed, the need for two stacks. | ||||||
No zoom video of today, the camera wasn't working. Maybe there's sound though. Examine the memory map that vm1.b printed, and see a few improvements. A much more serious use of interrupts, proper keyboard processing. Thinking about the implementation of processes. | ||||||
Reminders about the needs of the heap assignment, a tester. Something a bit like processes, with timesharing, but no VM. A serious page map. | ||||||
The serious page map's implementation:
vm5.b, os5.b, usr5.b. A proper page fault handler. | ||||||
The life-cycle of a unix process, states and transitions, what fork, exit, pipe, wait, and exec really do. Getting realistic: vm6.b, os6.b, sys.b, usr6.b, usr6b.b. | ||||||
No in-person class today, you should have received an email about it. Use the time for a special research assignment, which I have added as assignment 6. | ||||||
Same as Tuesday. | ||||||
A simplified mistake, No page 0, memmap, vm6.b, os6.b, sys.b, usr6b.b, usr6c.b, Getting a heap, shared memory, communications, races. Shared variables (or other resources) cause trouble: Critical sections and how to protect them, Mutexes, P(s), and V(s), and how to implement them, Atomic test and set; Intel's x86 interlocked instructions. | ||||||
Always explain odd or inventive things in your assignments. Semaphores or Mutexes? Single user devices: card reader, (codes), line printer, graph plotter. Queues of sleeping processes. The dining philosophers. Off-line processing and ordered allocation of resources. | ||||||
Intel's organisation for 48 and 57 bit virtual addresses. The basics of how assemblers do their job. Making your own virtual machine. | ||||||
More about the final assignment. Repetitive instructions and address translation in a virtual machine. |