We lost another pioneer in computing in October. John McCarthy is well know for his work in AI and LISP, but he has a close connection to the development of operating systems — John McCarthy is one of the earliest developer of time-sharing mechanism.
Lester Earnest first encountered McCarthy at MIT while working on the government’s Semi-Automatic Ground Environment (SAGE) defense system — an early computer network that allowed multiple users to access the system at the same time — and according to Earnest, SAGE inspired McCarthy’s work on time-sharing. “He was first to come up with an idea of how to do time-sharing in a general purpose way, as opposed to special purpose,” Earnest says.
You can read this article by John McCarthy that describes his early involvement in development of time-sharing system.
In the solution we present in class, we use two mutex variables. Many of the solutions submitted use one mutex only. A question raised during discussion with a student whether any solution with one mutex is wrong.
I will post some of the solutions submitted by you, and let you take a look and discuss. I think debugging threads is not easy and is a skill that comes with experience. So hopefully this little exercise will serve as a practice for you.
24 October – 28 October 2011
Here are the questions for discussion during Tutorial 8. Enjoy.
Try running some memory-intensive programs (e.g., Adobe software, Firefox) and observe some information related to page faults on your computer:
1. For Windows users, open Task Manager, go to “View”, “Select Columns”, and show the “Page Fault” and “Page Fault Delta” columns. Observe the number of page faults for each process and how many new page faults are generated between updates (the delta).
2. For Linux users, open up a terminal and run “vmstat k”, where k is an integer that indicates the update interval. (man vmstat for details). Observe the “si” and “so” columns, which reports on the amount of memory swapped in and swapped out. Alternatively, run “ps -ea v” and observe the “MAJFL” columns, which report on the number of page faults.
3. For Mac users, open up a terminal and run “vm_stat k”, where k is an integer that indicates the update interval (man vm_stat for details). Observe the numbers under columns “faults”, “pageins” “pageouts”.
For comparisons with your friends, post the amount of RAM on the system you are making the observations on.
21 October, 2011
This lecture is the second of a three-part series looking into memory management issues in OS.
Having a hardcopy of slides during lecture would be helpful. Be prepare to take notes during lecture.
Download Slides: PDF
- Section 3.4
- Section 3.5.1, 3.5.2
- Section 3.6.1, 3.6.2, 3.6.4, 3.6.5
Related Wikipedia entries are listed below. These are for students who are keen to go beyond what is covered in CS2106. Read the articles with a critical mind since Wikipedia is editable by anyone.
Lab 5 has been graded by Mr. Xu Yecheng and your mark is now available through IVLE Gradebook. Many students did not do as well as expected, and did not receive full marks. In particular, many solutions either lead to deadlock or lead to overflow/underflow of pot. If you did not get a 10 and were not aware of bugs in your code, you should look at your code carefully to find out what is wrong (it’s quite illuminating). If you are convinced that your code works but still did not receive a full mark, please feel free to email Mr. Xu or me.
We are in the midst of returning the midterm scripts to all. Please check and make sure everything is marked properly and you understand your mistakes. Please check that your midterm mark in IVLE Gradebook is consistent with what you get on your hardcopy.
Here is the solution to the midterm.
The figure below shows the histogram for your marks. The average is 49.6; stddev is 15.9; and median is 51. I am quite happy that the general results are better than last year’s midterm (despite many of you commented that this year’s midterm is harder). For those who do well, keep it up! For those who did not do as well as expected, I hope you learn from this test and do better in the final.
Since we are covering about memory, the following news article is timely:
John Ousterhout, research professor of computer science at Stanford and head of a new project called RAMCloud, proposes exactly that: Create a data center storage solution “where information is kept entirely in DRAM and large-scale systems are created by aggregating the main memories of thousands of commodity servers.”
Here is a more technical Wired article and the original white paper.
Here is the screencast from Lecture 8.