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.
Paul Allison, allisonp@queensu.ca.
Office hours: Tuesday 12:30-2:00, Goodwin 728.
Paul is head TA. He and Professor Blostein mark the exams. The other four TAs mark the assignments and labs.
Colin Bingham, 13cpb3@queensu.ca.
Office hours: Thursday 11:30-1:00, Goowdin 241. [Office hours canceled on Thursday April 5 due to Creative Computing]
Prajjwol Mondal, 13pm3@queensu.ca.
Office hours: Monday 11:30-1:00. Goodwin 241.
Christopher Thomas, 12cmt@queensu.ca.
Office hours: Wednesday 1:00-2:30, Goodwin 241.
Winker (Yong Jia) Xiao, 13yjx@queensu.ca.
Office hours: Wednesday 5:00PM-6:30PM, Goodwin 241.
Monday 11:30-1:00. Prajjwol Mondal, Goodwin 241. Tuesday 12:30-2:00, Paul Allison, Goodwin 728. Wednesday 1:00-2:30, Christopher Thomas, Goodwin 241. Wednesday 5:00PM-6:30PM, Winker Xiao, Goodwin 241. Thursday 10:00-11:30, Professor Blostein, Goodwin 720. Thursday 11:30-1:00, Colin Bingham, Goodwin 241.
We have three review sessions scheduled. The length of each session depends on how many questions students have. A typical review session lasts 1.5 hours (we have the room reserved for two hours). You are welcome to attend part of a session, arriving late or leaving early.
Bring questions for us to answer at the review session. Usually students ask questions about how to solve problems from previous CISC324 final exams. Final exams can be found at http://library.queensu.ca/exambank. Professor Blostein taught the course in 2017, 2016, 2015, 2014, 2013, 2012, 2009, 2008, 2007. Also on onQ you can see the second midterm exam given in 2017, along with solutions.
The following review problem for "write semaphore code" was already given to you for the first in-class exam. The problem is a simulation of cars and trucks crossing a bridge with a load limit. Make sure you take at least 20-30 minutes to try to solve this problem yourself, before looking at the solution. You won't learn much if you just read the problem statement and then read the solutions. Here is the problem statement and here are various solutions.
Addendum to Syllabus describes policies that the Faculty of Arts and Science recommends be part of any syllabus.
Here is a description of the CISC324 Learning Outcomes.
Here is information about the Academic Consideration Protocol in Arts and Science.
The Senate Policy on Academic Consideration for Students in Extenuating Circumstances was approved in April, 2017. Queen's University is committed to providing academic consideration to students experiencing extenuating circumstances that are beyond their control and which have a direct and substantial impact on their ability to meet essential academic requirements. Each Faculty has developed a protocol to provide a consistent and equitable approach in dealing with requests for academic consideration for students facing extenuating circumstances. Arts and Science undergraduate students can find the Faculty of Arts and Science protocol and the portal where they submit a request at: http://www.queensu.ca/artsci/accommodations. Students in other Faculties and Schools should refer to the protocol for their home Faculty.
Optional online resources
Many full-length lectures by MIT Computer Science professors are available online. Here are a few OS related ones:
Operating Systems: Three Easy Pieces. This supplementary textbook provides alternative explanations of concepts such as processes and CPU scheduling. Recommended by a CISC324 student.
The Little Book of Semaphores by Allen B. Downey published by Green Tea Press. This book provides a clear and extensive overview of semaphores. Recommended by a CISC324 student who later served as a CISC324 TA.
On the lighter side, Julia's drawings about programming. Examples:
What does an operating system even do?,
the stack (in a C program),
pipes,
CPU scheduling,
mutexes,
page table,
memory allocation,
(Linux) copy on write,
(Linux) user space vs. kernel space.
Assignment Problems and Readings
Lab Instructions and Files
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.
Short virtual memory videos by Stanford Computer Science professor Dr. David Black-Schaffer:
Introduction,
Three Problems with Memory,
What is Virtual Memory,
How Does Virtual Memory work,
Page Tables,
Address Translation,
Address Translation Example Walkthrough.
Processes, Synchronization, Deadlock,
Part 2,
Part 3,
Part 4. Semaphores. (Dr. Chris Terman)
Virtual Memory,
Part 2,
Part 3,
Part 4. (Part 1 by by Dr. Slivina Wachman, others by Dr. Chris Terman)
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 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.
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.
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.
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).
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.
To supplement the textbook readings on security, here are
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.
In directory firstDemo:
Demonstrate.java
In directory threadDemo:
MainMethod.java
MyThread.java
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).
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.
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.
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.
No new files for lab 6. Continue using your files from lab 5.
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.
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.