General Information
My Information
Name: | Jonathan Misurda |
Office: | 6213 Sennott Square |
Phone: | (412) 624-8835 |
Email: | jmisurda@cs.pitt.edu |
Office Hours: | M 2:30-4:30 T 3:00-5:00 |
You can find a copy of the syllabus here.
Announcements
(07/25/07) — The grading sheet is available for your perusal, but is subject to minor changes without notice.
(07/24/07) — I forgot to list that -ENOSPC is the error to return when there is no space on a device. Use this error to indicate that no more files may be created in a directory.
(07/19/07) — There are more disk blocks than a one block bitmap can keep track of. Since we're never deleting blocks, just use the last block to keep whatever information you need to allocate new blocks correctly.
Please note, your disk must survive beyond an unmount and remount, which means you should keep any information you need (like the next free block) stored on disk and read into memory whenever you need it.
(07/10/07) — Project 3 is assigned, due Sunday, July 29, 2007 at 11:59pm. You can find the handout below.
(06/26/07) — While you need to handle arbitrarily large files, the actual messages themselves can have a fixed maximum length. You might find this helpful to parse out the information from the file.
If you're getting weird compiler errors while building osmsg.c about certain header files such as time.h, change the compile line to:
gcc -o osmsg -I /u/OSLab/USERNAME/linux-2.6.21/include osmsg.c
To use the man on os.cs.pitt.edu, you may need to set up the MANPATH environmental variables correctly. You can issue the following command to do it:
source /opt/set_specific_profile.sh
To do it every time you log on to the os machine, add the following to your .bash_profile:
if [ "$HOSTNAME" = "set.cs.pitt.edu" ]; then source /opt/set_specific_profile.sh; fi
(06/13/07) — Mac users running Q.app should download a new disk image that should solve the problems.
(06/12/07) — There is a typo on the project 2 assignment sheet. The proper function prototypes for your syscalls should be asmlinkage not asmcall. Please make the necessary corrections on your sheets. The online copy has been changed.
(06/08/07) — I have moved into a new office. I will hold my office hours from now on in 6213.
(06/07/07) — After installing one of your updated kernels, it may be necessary to update LILO if you are unable to boot into the development kernel. If you get a LILO error, or your boot is an infinite loop, boot the original kernel, login as root, and type lilo. This should fix any issues.
Users of the Mac OS X version of QEMU (Q.app) should use the latest unstable version.
(06/06/07) — Project 2 is assigned, due Friday, June 29, 2007 at 11:59pm. You can find the handout below.
(06/01/07) — One (hopefully) final clarification. You can use freopen in combination with the /dev/fd/# filesystem. The source of the trouble with piping in general is that you need to be careful how the forks are done. You cannot make both the producer (left side of the pipe) and the consumer (right side of the pipe) both be direct descendents of the shell process. You instead need to make the consumer the direct child, and the producer the child of the consumer (i.e., the grandchild of the shell.) By doing this, everything gets initialized properly.
The example linked below does this, so if you follow that model, whether you use freopen or dup2 it should work.
(05/31/07) — There is a mistake in what we've said about being able to use freopen to implement the pipe (see correction above.) I am sorry I didn't test this out sooner. You need to do something a bit more complicated to make it work.
I am providing an example on my website that forks two processes, hardcoded to be ls and wc, and hooks up a pipe between them. Notice the calls to dup2 and close. You can see the example at http://www.cs.pitt.edu/~jmisurda/teaching/cs1550/2077/testpipe.c
As this was entirely my fault for not testing this earlier, there is also a 2 day extension for the deadline until Sunday night at midnight.
(05/25/07) —Some clarifications on Project 1: You do not need to handle multiple pipes or redirections combined with pipes on the same commandline. You do, however, need to handle arguments for both processes on the pipe commandline.
(05/21/07) —My office hours for the term will be M 2:30-4:30 and T 3:00-5:00 (and by appointment.) The TA's office hours will be: H 5:00-7:00 and W 3:30-4:30 (and by appointment.)
(05/21/07) —Project 1 is assigned, due Friday, June 1, 2007 at 11:59pm. You can find the handout and necessary files below.
- (05/15/07) — Slides will go up after class tomorrow.
In the Projects section is a version of QEMU for Windows with the necessary disk image to boot linux. For Linux and Mac, download the zip file provided below, and get an appropriate copy of QEMU from: http://fabrice.bellard.free.fr/qemu/download.html
- (05/14/07) — Welcome to the Summer Term (2077)
Slides
- First Set of Class Slides (PDF)
- Second Set of Class Slides (PDF)
- Third Set of Class Slides (PDF)
- Fourth Set of Class Slides (PDF)
- Fifth Set of Class Slides (PDF)
- Sixth Set of Class Slides (PDF)
- Seventh Set of Class Slides (PDF)
- Eighth Set of Class Slides (PDF)
- Ninth Set of Class Slides (PDF)
- Tenth Set of Class Slides (PDF)
- Eleventh Set of Class Slides (PDF)
- Twelfth Set of Class Slides (PDF)
- Thirteenth Set of Class Slides (PDF)
- Fourteenth Set of Class Slides (PDF)
- Fifteenth Set of Class Slides (PDF)
- Sixteenth Set of Class Slides (PDF)
- Seventeenth Set of Class Slides (PDF)
- Eighteenth Set of Class Slides (PDF)
- Nineteenth Set of Class Slides (PDF)
- Twentieth Set of Class Slides (PDF)
Projects
For the projects you will need a copy of QEMU and a bootable diskimage. The disk image we will be using and a copy of QEMU for windows is available by clicking here.
Links
-
Download putty: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
-
Windows text editor with syntax highlighting: http://www.editplus.com
-
Unix Command Reference (from CSSD): Here