ECE421 T, Operating Systems, Spring 2023
Tues, Thurs from 5:05 to 6:20 p.m. in MM 205

The Book

Documentation

Potentially useful source code

Assistance

Assignments

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.

Read the Important Rules link above.
Submit assignments (code + sample run(s)) through blackboard (under Assignments).
Submissions must be clearly readable word documents.
Capture your code as text, not an image: cat, copy, paste.

PC log in - use Putty or your own preferred SSH app.
OR mac users: start the terminal app, windows users: start powershell, then type the command
ssh username@rabbit.eng.miami.edu and type your password when prompted.
Windows users beware: you can't use ctrl-V in pico, but page up and page down will do the job.

Class History

Class 1 - Tue 17-1-2023 Quick introductions.
A few mysteries to motivate the course.
Introducing BCPL, we got up to just before the inbin function (in section 7).
Class 2 - Thur 19-1-2023 Nearly done with BCPL, we reached the defective definitions of newvec and freevec in section 33.
Class 3 - Tue 24-1-2023 (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.
Class 4 - Thur 26-1-2023 Writing output to a "magnetic tape" in BCPL.
Reading from a tape too, the program we made.
A better-designed input/output library.
Class 5 - Tue 31-1-2023 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.
Class 6 - Thur 2-2-2023 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.
Class 7 - Tue 7-2-2023 When a file grows, linked lists of blocks, hard and soft links. The free block list, or a bitmap.
RAID.
Class 8 - Thur 9-2-2023 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.
Class 9 - Tue 14-2-2023 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.
Class 10 - Thur 16-2-2023 Further explanation of the list/stack of free blocks.
Instruction formats and fixes.
Continue with how function calls work.
Class 11 - Tue 21-2-2023 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.
Class 12 - Thur 23-2-2023 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.
Class 13 - Tue 28-2-2023 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.
Class 14 - Thur 2-3-2023 The Buddy system illustrated.
Mercury delay lines, again, Nickel delay line.
Core Memory: C2, C3, C4, C5, C6, C7.
Class 15 - Tue 7-3-2023 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.
Class 16 - Thur 9-3-2023 The whole virtual memory process.
TLB in the cache, extra bits in table entries, swapping pages out, resident bit, dirty bit.
Break
Class 17 - Tue 21-3-2023 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.
Class 18 - Thur 23-3-2023 We got as far as creating the page directory and tables.
Interrupts and how they are processed, the need for two stacks.
Class 19 - Tue 28-3-2023 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.
Class 20 - Thur 30-3-2023 Reminders about the needs of the heap assignment, a tester.
Something a bit like processes, with timesharing, but no VM.
A serious page map.
Class 21 - Tue 4-4-2023 The serious page map's implementation: vm5.b, os5.b, usr5.b.
A proper page fault handler.
Class 22 - Thur 6-4-2023 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.
Class 23 - Tue 11-4-2023 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.
Class 24 - Thur 13-4-2023 Same as Tuesday.
Class 25 - Tue 18-4-2023 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.
Class 26 - Thur 20-4-2023 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.
Class 27 - Tue 25-4-2023 Intel's organisation for 48 and 57 bit virtual addresses.
The basics of how assemblers do their job.
Making your own virtual machine.
Class 28 - Thur 27-4-2023 More about the final assignment.
Repetitive instructions and address translation in a virtual machine.