In: Computer Science
Question 10a.
Consider again the file MyNotes.txt from the previous questions. Assuming that users who are neither Bob nor members of the personnel group should have no access to the file, which octal code would you use with chmod to set the permissions on the file for all users?
Select one:
a. 665
b. 664
c. 110
d. o+0
e. 660
f. 770
g. o-0
h. 550
i. o=7
j. 764
k. 655
l. o=0
m. 755
n. 760
Part B.
A program reads files from disk. After reading the entire file, it processes each file, then writes the processed file back to disk before reading and processing the next file. Assume that the reading of the file from a local disk takes 6 ms, the processing of the file takes 19 ms, and the writing of the processed file back to the local disk takes 27 ms.
How long does it take the program to process 64 files from the local disk? Enter an integer value in milliseconds (ms), without the unit.
Part C
Suppose the program reads and writes the files from a network drive instead, and assume that it takes 16 ms for the computer’s read request to reach this network drive, and the same amount of time for the network drive’s data to travel back to the computer (a situation that corresponds roughly to a computer in Auckland accessing a network drive in Sydney). The write request also takes 16 ms to reach the network drive, and the write confirmation from the drive to the computer also needs to travel back, incurring the same delay. Assume all other times remain the same (including the 6 ms read time and the 27 ms write time at the network drive itself, as well as the 19 ms processing time at the computer). How long does the processing of the 64 files take now?
PART A:
The permission would be "770" because apart from Bob and the personnel group everybody must be restricted from accessing it.
PART B:
There are 3 sections where each file takes a different time in these sections. The sections are
1.Reading section:
This is the section where the file is read from a local disk.
2.Processing section:
This section is responsible for processing the file.
3.Writing back section:
This section deals with the time taken to write back the processed file back to the disk.
Initially all the sections will be in idle stage. When the 1st file is read it takes 6ms. After that 1st file goes to the processing section. During the 1st file is getting processed, the 2nd file will be in Reading Section. When 2nd file has completed the Reading section it proceeds to processing section along with the 1st file , As soon as the 2nd file leaves for processing, 3rd file enters into the Reading Section .
Like this multiple files will exist in the above 3 sections. When the 1st file completes all the three sections, there will be 8 files still continuing in the three sections and 1st file takes total of 52 ms. As there are 63 remaining files , So it would take 52 x 63 = 3276 ms. Total for 64 files it would take 3328
PART C:
A single file takes 116 ms of time (it includes read request time, read response time,read time, processing time, write request time,write response time, writing time).
So as there are 64 files then it would take 7424 ms of time