I will put your final exam grade in the final-grade/final-grade.txt file in your handin directory.
50 - 54: 53 54
55 - 59: 57
60 - 64: 62
65 - 69: 65 69
70 - 74: 70 71 74
75 - 79: 76 76 77 78 78
80 - 84: 81 83 83
85 - 89: 88 88 88 89 89 89
90 - 94: 90 90 91 92 93
95 - 100: 97 98 100
If while(TAS) is missing, then multiple threads running on multiple processors can proceed, leading to a race condition.
If it is missing, a deadlock can occur. For more see: [Lec 17, Slide 11].
If no mutex, then there will be race condition.
It is important because each thread must have its own stack for its own execution.
AFS wins: for any writes. Because in NFS writes always go to the server periodically (e.g. every 1-3 seconds). But in AFS, writes are kept locally until the file is closed.
Without call-backs, there is no way to check if the files in the client cache are still consistent with those in the server. Thus, on open(file), the client must talk to the server first in order to check the consistency of the file.
Some of you answers that read()/write() must be changed. It is already explicitly stated that since the first version of AFS, read() and write() never contact the server. Thus, the answer is either open() or close(). The latter does not need to be changed. So the answer is open().
If you use AFS, data is fetched from the server only on opens, and the whole file is stored on the local disk, and the file server cannot be utilized as a file cache. Since the client memory is small, everything will be read from the slow local disk.
With NFS, if the file is not in local cache, read can go to the server. And since the server's memory is huge, the clients' files might be in the server memory.
In conclusion, in this scenario, transferring data from the server's memory to the client is much faster than reading the data from the client's disk. (Note: it is a common practice that whenever you have a high-end server, you want to utilize the server's memory to cache client's data).