Errata: Implementation of Soft Link using i-node

I would like to make a correction to a wrong fact I said in class.

Suppose we have a file P, which is a soft link to another file Q. During the lecture, I incorrectly said that the address inside i-node of P contains the i-node number of Q. This is WRONG. The i-node of P contains address of the data block of P on disk instead (just like normal file). To implement the link, in the data blocks on disk, we store a string that contains the path to Q.

Here is a video that re-explains this: http://goo.gl/3pbt3

What are the pros and cons of these two different approaches?

If we store the path to Q, then we need to take extra steps navigating through the file hierarchy to find the i-node of Q. Whereas if we store the i-node number of Q, we can access Q directly. On the other hand, if we store the path to Q, Q can be a file residing in a different partition.

But here is a deal breaker: what happen after Q is deleted? In both approaches, when we access P, we will encounter an error. But, if we store the i-node number of Q, this i-node number can be reused by another file!! So P can unintentionally linked to another file at a later time. This is not good.

Sorry for the confusion caused by this error.

Week 13: Changes to Lab and Tutorial Schedules

As Monday, 7 November 2011, is a public holiday, we loose the opportunity to enjoy the lab and tutorial sessions on Monday.

There is no tutorial sessions for next week (including the Thursday sessions). Instead, the answers to the questions will be posted and discussed online.

There will be four additional lab sessions on Wednesday, 9 November, 2011.

  • 12noon – 1pm
  • 1pm – 2pm
  • 2pm – 3pm
  • 5pm – 6pm

Students from Monday’s lab group can come to any of the lab sessions.  Lab TAs will be available to help.

PCs in OS Lab Fixed

A router hung.  It is fixed now. Please try and report if there are still issues.

The deadline for Lab 7 has been extended until Tuesday, 1 November 2011, 10:00pm.

Students who did not managed to work on the lab last Thursday are welcome to attend the lab sessions on this coming Monday.  If you have time table clashes and not able to attend the class on Monday, please feel free to contact your lab TAs if you need any help with the lab.

IVLE Gradebook for CS2106 Available Now

One of the features that you missed the most from IVLE is gradebook, according to the feedback gathered from the anonymous survey.  Some students are also having trouble receiving emails sent to @comp.nus.edu.sg accounts.

I have therefore decided to use IVLE gradebook for posting comments and marks for your labs from now on.  Lab 3 and 4 have been posted.  Lab 5 and midterm scores are coming.

Lab 4: Solution and Problem

I am making an exception and made a sample solution to Lab 4 available.

We have discovered errors with the grades and marks given out to Lab 4. This means that the email you received may contain incorrect marks and comments. IMPORTANT: if you receive a full marks, you should still check your solution against the sample posted — because your solution could still be wrong or incomplete.

I apologize for the errors, and I am regrading all of your Lab 4 submissions to make this right.

There is no specific question about shell and Lab 4 in the midterm, in case you are wondering. But you should still get familiarize with the system calls involved, including fork, wait, exec, exit, signal, and kill.

Midterm Test: Information

Time: 1200 – 1400
Date: 7 October (Friday)
Venue: LT15 and COM1 208.

Scope: Lecture 1-6, Lab 1-5, Tutorial 1-5

The test is close-book, but you are allowed to bring in one A4-size, double sided, crib sheet.

The total mark is 80. Time allowed is 90 minutes, so you should allocate x minutes to answer a question worth x marks.

You should write your matriculation number in pen. For the rest, either pen or pencil is fine (as long as it is clearly readable).

When answering question, please answer succinctly and direct to the point.

The following students should report to COM1 208 for the midterm test.
Continue reading

Mid-term Feedback Survey

We are near the half-way point of the semester, and this is a good time to take a look back and see how we are doing. The teaching team of CS2106 would much appreciate if you can let us know how we are doing and how we can improve ourselves.

Kindly please help us by spending a 5-10 minutes of your time in answering the anonymous survey. (due 4 October 2011).  Your feedback is important to us!