Quiz 2
Quiz 2
2. State and discuss the components of a file system. How many lookup calls are needed
to resolve a given pathname for a file that is stored on an NFS server? Justify your
answer.
File system consists of three major components.
flat file service defines operations over file content and assigns UFIDs to newly
created files
Directory service provides mapping between UFIDs and string names(file path
names)
Client module integrates the fat file system and directory service (2 marks)
Number of lookup calls depends on the number path name components.
For example path name with N components needs N lookupcalls
Component by component lookup is carried out due to availability of symbolic
links, mount points and .. in the path names (4 marks) (2 mark)
3. Give a brief account on Domain Name Service. Describe the two name resolution
techniques used in NFS. Which of the two techniques facilitates concurrency and
why?
Domain name Service is the name service used by the Internet
It is a distributed name database which heavily used caching
Databases are generally replicated to improve performance, availability and fault
tolerance.
Its primary functionality is to resolve the IP for a given string name (URL)
Reverse resolution is also supported (2 marks)
In Iterative navigation, client interacts with name servers one by one until the name
is resolved
In IRecursive navigation, the client interacts with one server. If it fails to resolve the
name server forwards the client request to another server. This is done recursively
until the name is resolved
Recursive navigation facilitates concurrency as servers can work on outstanding
jobs while other servers resolve the name.(2 marks)
4. A clock is reading 10:27:54.0 (hr:min:sec) when it is discovered to be 4 seconds fast.
Explain why it is undesirable to set it back to the right time at that point and show
(numerically) how it should be adjusted so as to be correct after 8 seconds has
elapsed.
Since clocks are ever advanced, resetting faster clocks by turning clock hands in
anti-clockwise direction results in wrong time values for events. For example if
two events occur before and after resetting the clock. First event is stamped with
a higher value than the second event. This is wrong as the clock value of the first
event must be lower than the next event. (2 mark)
Clock can be reset by forcing it to run at a slow rate for a fixed amount of time.
Just assume that the clock is set to run at rate c.
Observed incorrect time = Tskew = 10:27:54.0
Correct clock value at this time =10:27:50.0
Correct clock value after 8 seconds =10:27:58.0
incorrect time after 8 seconds = E = 10:28:02.0
Substitute these values to S=c(E-Tskew)=Tskew
10:27:58=c(10:28:02 - 10:27-54) - 10:27:54
Then c = 0.5(2 marks)
5. A client attempts to synchronize with a time server. It records the round-trip times and
timestamps returned by the server in the table below.
Which of these times should it use to set its clock? To what time should it set it?
Estimate the accuracy of the setting with respect to the server’s clock. If it is known
that the time between sending and receiving a message in the system concerned is at
least 10 ms, do your answers change?
S1 11:34:23:235 11
S2 10:58:53:823 9
S3 11:44:43:638 10
S4 10:59:53:835 9
According to the cristian algorithm, server which records the minimum round
trip time needs to be selected and clock is to its UTC time + 0.5*minimum round
trip time
In this example, there are two servers, S2 & S4, with minimum round trip time (9
request + 9 reply = 18ms)
Let's select S2. Then clock is set to 10:58:53:823 + 18/2 ms = 10:58:53:832
Then the lock is accurate to +or- 9 (2 marks)
If the actual minimum round trip is 20=2*10, selected value 18 is smaller than the
minimum.
It is wrong hence the clock needs to be reset.
Therefore, S3 should be selected and clock is set to 11:44:43:638+10=11:44:43:648
Then the lock is accurate to +or- (10-9)=1ms(2 marks)