May-14: Project 6, revision D is up. Yes, it is the last minute, and I don't expect you to make any changes to your work. However, if you are still working on this project, this revision's kernel.k has much more in it, including some page table manipulation and the initialization of the trap table. Moreover, the compiler has changed to allow the referencing of procedure names -- that is, you can take the address of the first instruction of a procedure. This feature was critical in creating the trap table.
Warning: The kernel code compiles, but it has not thoroughly been tested. More importantly, use this new kernel code simply as a guide to finish your own code. Remember that what I seek is a demonstration, via k-code, that you know how the page tables and page frames should be managed in a virtual memory system. If you think that your code communicates those ideas clearly, then you're done.
May-12: Project 6, revision C has been posted. There are a couple of new instructions (clock and alarm registers, making pre-emptive scheduling possible), as well as more debugging of the existing compiler/assembler/simulator code bases. The provided kernel does a little more now---it actually does a bit of managing the pointers to the device tables and kernel page tables. It also lays out what the rest of my kernel will do, and I will be filling in those procedures over the next couple of days.
You should at least be able to add your procedures to the kernels and then modify my main() to perform test calls on your procedures. I've thoroughly debugged the kernel code contained in revision C (which includes a version 3 of the code), so it should make a reasonable base on which to begin testing your code.
Once again, I am aware that time is short. Do what you reasonably can to show your work. Be sure to explain your code with comments or a README file, and submit what you've got. I doubt that anyone will write and heavily test a completed kernel. Such is life.
May-12: Later today, I will post revision C, which will be the final revision that I will post. I understand that it is currently difficult for you to test your code. You should do your best to write the procedures that I've described, demonstrating (in our lovely k-code) that you understand how the page tables work and should be maintained. I will attempt to get you something that will make testing possible, but I have no expectation that anyone will fully get their virtual memory system to work by Friday. You simply needed more time and working code than I could provide, so, instead, get as far you can and don't worry about it too much.
May-10: I have posted revision B of Project 6. Although not complete, it does contain some modifications to the assembler, compiler, and system. It also has a kernel that is correctly loaded, sets up the kernel page table and stack, switches into virtual address mode, and calls a main() compiled from k-code. The project description now also specifies much more of what you (and I) need to do in order to complete this project (or come closer to it). A revision C will follow, I hope, within a day.
Apr-30: Once again, new code for Project 5. Here, my portion of the compiler (as well as the assembler and the simulator) are more thoroughly debugged. In particular, a handful of small code generation errors of mine have been fixed here. To get the update:
$ cd cs26 $ mv -r project-5 old-project-5 $ tar -xzvpf ~sfkaplan/public/cs26/project-5-v3.tar.gz $ cp old-project-5/compiler/Procedure.java project-5/compiler $ cp old-project-5/compiler/ProcedureCall.java project-5/compiler $ cp old-project-5/compiler/standard-library.k project-5/compiler
That is, assuming that all of your work so far has been the Procedure.java, ProcedureCall.java, and standard-library.k files, the above will move your existing work into the old-project-5 directory, obtain the new code into a new project-5 directory, and then copy your existing work into that new directory.
Apr-20: New code is available for Project 5. To obtain it, you likely want to do something like the following:
$ cd cs26 $ tar -xzvpf ~sfkaplan/public/cs26/project-5-v2.tar.gz
You will get, in a project-5 directory, both a compiler directory and a new assembler directory. Both compile and seem to work normally, and should make a reasonable substrate for your code-generation work. There is, within the compiler directory, a standard-library.k file, which contains a single, example procedure for the = operation. Build on that to create the remainder of your standard library of procedures. The compiler already reads that file for every compilation, including its methods in the resulting assembly code.
Mar-10: In a stunning flurry of activity, here is a written document for Project 4. It's big, so start reading ASAP. It includes a number of substantial changes to the ISA, the assembler, and the system itself. There is also new assembler and simulated system code that you shold use, so grab version 2 of that (as described in the assignment).
Mar-09: I have posted a written document for Project 3. I will post something for Project 4 as well, so please check the assignments page soon. In particular, please note that the code that I gave you last Friday is not sufficient to accomplish the tasks to which I set you (particularly, writing the BIOS and kernel). The new posting will describe how to get updated code that absolutely does work -- I know because I tried it.
Feb-25: We will have class in SMudd 207 today; we will have lab in SMudd 007 to begin Project 3 on Friday.
Feb-18: I am happy to say that I am feeling better. We will meet for a lecture today, not a lab. (Not to worry, a new project will be coming soon!)
Feb-16: No class today. I'm sick, so enjoy the morning off.
Feb-08: There are a handful of problems with Project 1 that many of you have brought to my attention. Here are the problems and how to deal with them (or not):
The cs26-submit command does not work: Sorry about that. I've installed it, and it should now work on castor.cs, as well as all of the workstations in SMudd 007.
The NOT instruction does not work: I goofed with the assembler, such that the NOT instruction expects three operands, instead of the documented two. This problem is fixed with version 2 of the software for this project (see below).
Branch to an address at or beyond 0x0080 are mangled to have a high byte value of 0xff: The CPU simulator had a bug in which, while fetching instructions, the high-bit of the low-order byte of a word could be sign extended to set the bits of the entire high-order byte. This problem could affect the storage and retrieval of any value, but for most people, it affected branching. This problem is fixed with version 2 of the software for this project (see below).
Assembly of word-sized operands that require the highest bit to be set failed: An operand like 0xf000 would cause the assembler to abort incorrectly. This problem is fixed in version of the software for this project (see below).
Getting the new software: By following the steps below, you will obtain a new, corrected version of the asssembler and the simulator. With a little luck, it will fix many of your problems. Please note that, to compensate for these problems, this assignment will now be due on Monday, February 09, at 11:59 pm.
$ cd cs26/project-1 $ tar -xzvpf ~sfkaplan/public/cs26/vp-project-1-v2.tar.gz $ cd assembler $ javac *.java $ cd ../system $ javac *.java
Feb-06: No lab today! We will meet in SMudd 207 for our usual class lecture/discussion. We just might have lab on Monday, so stay tuned.
Feb-05: Thanks to many of you for observing and correcting a number of errors in the Project 1 posting. It pleases this old pedant to see all of you so thoroughly and correctly scrutinize my writing! (Seriously, that's not sarcasm.)
Feb-03: At long last, Project 1 has been posted. Note the new due date of Sunday at 11:59 pm, thus adjusting for my delay in posting this assignment.
Jan-24: Welcome to Systems II! If you are enrolled in this class, or even if you are considering this class, please begin, before our first class on Monday, by reading the course information. This document makes clear what material we will cover, what is expected of you as a student, how I will evaluate your work, etc. It may also help you to determine whether this course is one that interests you.