CISC 324*: Operating Systems, Winter 2018

Office Hours, Instructor, Teaching Assistants

Professor Dorothea Blostein, Goodwin 720, (613) 533-6537. Email: blostein@cs.queensu.ca. Research: www.cs.queensu.ca/home/blostein

The teaching assistants answer questions by email, and in person during office hours. If you have a scheduling conflict with office hours then email the TA to set up an alternate meeting time.

Summary of office hour times. April 5 lecture and office hours are canceled to give everyone time to attend Creative Computing, biosciences atrium, 11AM to 2PM.

Final exam Friday April 20 7:00PM-10:00PM

Syllabus: Course Content, Marking Scheme, Assignment Due Dates

Textbook and Course Reader

The textbook and course reader are for sale at the bookstore:

Optional online resources

Assignments and Labs

    Assignments and labs must be handed in at the beginning of class on the due date. Late work is not accepted. If you have to miss a lecture you may hand the assignment in early: see the instructions provided at the start of Assignment 1.
    Please read this discussion of academic integrity from the Faculty of Arts and Science.

Assignment Problems and Readings

    Assignment solutions are available on onQ after the assignment due date.
    Marked assignments are returned in lecture. Assignment papers that are not picked up at the lecture are put into a box outside Professor Blostein's office, Goodwin 720.

  • Assignment 1 is due at the Jan 18 lecture.
    Labs 1 and 2 are due at the Jan 22 lecture. Instructions for the labs are provided in the course reader.
    You can choose the order: do assignment 1 first and then the labs, or do the labs first and then assignment 1.

  • Assignment 2. This assignment is due at the Jan 30 lecture. Lab 3 is due at the Feb 6 lecture.

  • Assignment 3. This assignment is due Feb 13. Feb 15 is the first in-class exam. Lab 4 is due Feb 27.
    For an entertaining way to procrastinate, look up "semaphore" on youtube. Among other things, you can find videos that illustrate how to send messages using semaphore flags, also videos about various bands with the name semaphore, and a Monty Python video titled The Semaphore Version of Wuthering Heights.

  • Assignment 4 This assignment is due March 8 in lecture (two days later than the original due date of March 6). The introductory paging example in problem 3 is particularly important for students who have not studied paging in a previous course.
    Disk access is very slow compared to main memory access. This 2009 video shows a way to overcome this problem by using many disk drives in parallel.
    Wikipedia computer data storage provides an overview of primary, secondary and tertiary storage, and describes storage characteristics (volatility, mutability, accessibility, addressability, capacity, performance, energy use).

  • Assignment 5 This assignment is due March 19.

  • About Labs 5 and 6: Lab 5 is due at lecture Thursday March 29 (original due date was Thursday March 22). Lab 6 is due at lecture Tuesday April 3 (original due date was Thursday March 29).
    In lab 5 you use Java monitors to begin writing a simulation of a computer system. In lab 6 you finish coding the simulation. This is broken into two labs to make sure no one tries to write the entire program all at once at the last minute. Lab 5 is pass/fail and lab 6 is marked fully. If you have trouble with lab 5, ask a TA for help before you attempt lab 6.

  • Assignment 6 This assignment is due Monday April 9. (Original due date for assignment 6 was Thursday April 5. That lecture will be canceled because it is the same day as Creative Computing. Quite a few CISC324 students are presenting posters and projects at Creative Computing. All CISC324 students should stop by to see the wide range of exciting projects done by compsci undergrads.)
    To supplement the textbook readings on security, here are

Lab Instructions and Files

    Instructions for labs are provided in the CISC324 Course Reader. CISC3234 does not have formally scheduled lab sections, so you may complete lab work anytime. If you run into difficulty with a lab, contact a TA by email. Files needed for lab work are listed below, and are also available on caslab at /cas/course/cisc324.

    • lab 1 count.c

    • lab 2
      In directory firstDemo: Demonstrate.java
      In directory threadDemo: MainMethod.java MyThread.java

    • lab 3
      In directory ReaderWriter: MainMethod.java Reader.java Writer.java RandomSleep.java Synch.java
      This lab is challenging because it is your first time writing synchronization code. As a first step, study and execute the given code where readers have priority (course reader page 29). Make sure that you can tell from looking at the output that readers are indeed getting priority. Then plan how to create code that gives priority to writers. As it says in step 3 of the lab instructions, first decide what semaphores and integer counters you need, and then figure out how to test the counters to decide whether a thread needs to acquire some semaphore or release some semaphore. For ideas on how to design and implement this type of synchronization, study the starvation free solution given on pages 31-33 of the course reader (section 3.3 Blostein Code: Semaphores other than mutex are initialized to 0).

    • lab 4.
      In directory TrafficNew: MainMethod.java Car.java Synch.java TimeSim.java Semaphore.java
      TimeSim.java is provided because Java's built-in sleep() method results in inexact timing. For example, if two threads execute a sleep instruction at the same time, the thread that executes sleep(20) may wake up before the thread that executes sleep(10). File TimeSim.java contains an accurate time simulation written by Professor Blostein. The simulated time advances after all threads have reached a sleep() or acquire(). The implementation of timeSim needs an exact count of the number of threads. Therefore, every thread you create has to begin by calling Synch.timeSim.threadStart() and has to end by calling Synch.timeSim.threadEnd(). The car thread code in Car.java shows how to do this.

    • lab 5.
      The files for Lab 5 are in directory rw.monitor: MainMethod.java rwMonitor.java SharedDataStruct.java Reader.java Writer.java
      Note: the TimeSim code from Lab 4 does not work with labs 5 and 6; TimeSim only works with the Java semaphore implementation, which is not used in labs 5/6.

      In lab 5 you use Java monitors to begin writing a simulation of a computer system. In lab 6 you finish coding the simulation. This large programming assignment is broken into two labs to make sure that no one ends up trying to write the entire program all at once at the last minute. Lab 5 is marked pass/fail or pass/marginal/fail, and the TA provides coding corrections and suggestions if needed. Lab 6 (your complete simulation) is marked in detail.
      If you have trouble with the coding of lab 5, please refer to "How do I get started on Lab 5?" in section 5.1 of the lab 5/6 instructions in the course reader.

    • lab 6
      No new files for lab 6. Continue using your files from lab 5.

Notes about graduate school

These notes may help you to decide whether to consider pursuing an MSc degree. Please be aware that graduate students get paid enough to cover tuition and modest living expenses. Here is information about how to apply for graduate study at Queen's School of Computing, and answers to frequently asked questions. Application procedures for other departments and institutions are similar; you can find details on websites. Queen's Graduate Computing Society provides advice, support and social contacts for graduate students and graduate student applicants in the School of Computing. For example, the events page mentions the GCS Coffee Break, every Tuesday and Thursday at 10:30AM in Goodwin 620: this is an opportunity to meet graduate students and professors in an informal setting. The lab representatives list provides websites and email contacts for various School of Computing research labs.

Graduate school provides you with the opportunity to do research, to study a present-day problem in depth. It is common to start with some self-doubt, concerned about whether you will be able to contribute anything, and somewhat intimidated by the established researchers who publish papers in this area. I certainly went through this experience myself when I started graduate studies. I can assure you that you will be able to contribute! As long as you bring enthusiasm and persistence, it happens naturally that after you work on a problem for a year or two you will have insights and ideas that are valuable to others. For example, you can start research by reimplementing a few methods reported in the literature, and testing how well they work on new data. In doing this, you will identify problems and limitations, and you can try out various ideas about how to address these limitations. Voila! you are contributing to research.

You can choose to attend graduate school directly following your undergraduate education, or you can first work in industry for a few years and then go to graduate school. Both scenarios work out really well. Work experience is valuable in giving you additional maturity and insights for carrying out research. If you land an industry job that suits you well then you are all set for a happy and fulfilling career. If you start an industry job and after a few years feel that this job does not give you sufficient freedom to pursue your innovative ideas, then you can apply to graduate school to pursue those ideas.

An important part of the graduate school application process is making contact with potential supervisors: you have to interest a supervisor into committing his/her research funds to support your graduate studies. To be effective, your email to potential supervisors has to be personalized. Professors ignore generic email of the type "Dear Sir, I would like to study at your esteemed institution. Attached is my resume". Instead, take the time to learn a little bit about this particular professor's research, have a look at a few papers published by this professor and his/her students. Then write a short email (a few paragraphs) introducing yourself and expressing your enthusiasm/interest in this research area.

Strong technical writing skills are essential in research. You need to be effective in sending email to potential collaborators or potential supervisors, in writing a thesis, and in submitting papers for publication. If you like, have a look at advice about technical writing that I give to students in my graduate course CISC859 Pattern Recognition.

Oncgoing concurrency research

To find out about the latest concurrency research, skim through journals such as

Francis Atampore, a PhD student in the School of Computing, gave a guest lecture in CISC324 W2016 about concurrency control and research. Here are the slides from his presentation.