Code Examples and Reading Assignments

This page documents what we do in class. It contains C programs that we will discuss in class, reading assignments from our textbook, simple homework exercises that you can work on for practice and exam preparation (not for credit), links to other sources of information, etc.

The reading assignments and practice problems are listed by the date on which they were assigned. The sample program files are listed by the date on which they were used. When you are viewing a source code page, you can use your browser's "File -> Save As..." menu item to save a copy of the code on your computer. It is a good idea for you to "play" with these example programs; compile them, run them, make simple changes to them and compile and run them again.

  • Monday, April 29.

  • Wednesday, April 24.
    • Look at Exercises 1 (replace UNIX with Windows NT/2000/XP), 4, 5, 6, 8, 9, and 10, on pages 442-443 at the end of Chapter 13.
    • Read Chapter 14 of our operating systems textbook for next week.

  • Monday, April 22.
    • Your eighth homework assignment is now listed on the homework assignments page. It is due Monday, May 6.

  • Wednesday, April 10.
    • Here is an outline of what we want to cover today.
    • Here is a paper that goes through several nice examples of how a C compiler translates various kinds of variables into assembly language. It was written for Linux, but all of the C examples can also be used with a Windows C compiler and they will produce pretty much the same assembly listings.
    • The above paper is part of a very useful collection of information about operating systems called the Operating System Resource Center.
    • Here is an article that discusses the size of executable files and how to control the loading of (unwanted) library code into a program. (The author of the article is the person who wrote the PEBrowse program.)
    • Read Chapter 13 of our operating systems textbook for next week.

  • Monday, April 8.

  • Wednesday, April 3.
    • Here is a nice Virtual Memory Tutorial.
    • Here are a few programs that let us observe some of Window's virtual memory behavior. In particular, we want to see where the various parts of a program, like its code and data segments, stack, heap, and library code, are placed in virtual memory.

  • Monday, March 25.
    • Read Chapter 12.
    • Look at Exercises 1, 3, 4, 7, 8, 9, 10, 12, 14, and 15 on pages 402-404 at the end of Chapter 12.
    • Here is a nice explanation of virtual memory written by the producers of MATLAB. One thing to note is how even users of MATLAB (let alone programmers) need to be aware of how virtual memory works.
    • The due date for your sixth homework assignment has been changed to Monday, April 8.

  • Monday, March 18.
    • Your sixth homework assignment is now listed on the homework assignments page. It is due Monday, April 1.

  • Wenesday, March 6.
    • Here is a set of review problems to help you study for the exam on March 20.
    • Read Chapter 11.
    • Look at Exercises 1, 2, 4, 5, and 6 on pages 357-358 at the end of Chapter 11.
    • Look at this brief explanation of why we need memory management (this continues the earlier explanation of why we need an operating system).

  • Monday, March 4.
    • The date for the first exam has been changed to Wednesday, March 20 (that is in the week right after spring break).
    • On Wednesday, instead of the exam we will begin Chapter 11 on Memory Management and Virtual Memory.

  • Wednesday, February 27.

  • Monday, February 25.

  • Wednesday, February 20.

  • Monday, February 18.

  • Wednesday, February 13.
    • If you would like to read a good explanation of pointers and dynamically allocated memory, read the Pointers and Memory tutorial from Stanford University.
    • Look at Exercises 4, 5, 6, 7, 8, 9, 10, and 11 on pages 213-215 at the end of Chapter 7 from the Operating Systems textbook.

  • Monday, February 11.
    • For details about the programs that give you information about processes in Windows, see the new Windows Tools page.
    • The most important book about the internals of Windows NY/2000 is Inside Windows. The chapter from this book on processes and threads is conviently available for reading over the Internet.

  • Wednesday, February 6.
    • There are several programs that give you information about processes in Windows. For programs to use with Windows NT/2000, see the Windows Tools page.
    • For Windows 95/98/ME there are two programs, pview95.exe and wintop.exe. Visual C++ will install pview95.exe for you. You can get wintop.exe from the following web page.
      http://www.microsoft.com/windows95/downloads/
      Look for the link to the "Kernel Toys". wintop.exe is a very useful Windows 95/98/ME program to have.
    • Start reading Chapter 7 from the Operating Systems textbook. We will go over Chapter 7 next week.
    • You might want to look at these slides, prepared by the author of our textbook, for Chapter 7.
    • Your fourth homework assignment is now listed on the homework assignments page. It is due Monday, February 18 (one week after assignment 3).

  • Wednesday, January 30.
    • Here are some more tricky little C programs.
    • Start reading Chapter 6 from the Operating Systems textbook. We will go over Chapter 6 next week.
    • You might want to look at these slides, prepared by the author of our textbook, for Chapter 6.

  • Monday, January 28.
    • Read Chapter 5 from the Operating Systems textbook.
    • You might want to look at these slides, prepared by the author of our textbook, for Chapter 5.
    • Look at Exercises 2, 3, 5, 7, 9, and 11 on pages 150-151 at the end of Chapter 5 from the Operating Systems textbook.
    • Don't forget to look at the Study Problems prepared by the textbook's author.

  • Wednesday, January 23.

  • Wednesday, January 16.
    • Read Chapter 3 from the Operating Systems textbook.
    • You might want to look at these slides, prepared by the author of our textbook, for Chapter 3.
    • Look at Exercises 2 and 3 on page 84 at the end of Chapter 3.
    • Look again at Assignment 1 on the homework assignments page. There are some corrections of typos in the worksheet for the asignment.
    • Your second assignment, a C programming assignment, is now listed on the homework assignments page.

  • Monday, January 14.
    • For Chapter 1: Here is an example of a two different abstractions of the same resource (a window). One abstraction is the provided by the Windows operating system and the other abstraction is provided by the Java runtime system.
    • Read Chapters 1 and 2 from the Operating Systems textbook.
    • Look at this brief explanation of why we need operating systems.
    • You might want to look at these slides, prepared by the author of our textbook, for Chapter 1 and Chapter 2.
    • Look at Exercises 2, 3, 8, and 9 on pages 26-27 at the end of Chapter 1 from the Operating Systems textbook.
    • Look at Exercises 2 and 5 on page 50 at the end of Chapter 2.
    • Look at the Study Problems prepared by the textbook's author for Chapters 1 and 2.
    • Be sure to look at the homework assignment page. Your first assignment is already listed there.


Return to the CS 302 home page.


compliments and criticisms