Question

In: Computer Science

Question 10a. Consider again the file MyNotes.txt from the previous questions. Assuming that users who are...

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?

Solutions

Expert Solution

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


Related Solutions

Using the portfolio and hedge ratio from the previous question, and assuming the S&P 500 intitial...
Using the portfolio and hedge ratio from the previous question, and assuming the S&P 500 intitial value is 3109.55. What is our portfolio value if the market drops 6%? What is the change in value of our puts? What is our total profit or loss?
Question: For the previous planet and star (with a luminosity = 0.041 solar luminosity), assuming a...
Question: For the previous planet and star (with a luminosity = 0.041 solar luminosity), assuming a circular orbit, what would be the distance from the star such that the planet’s surface temperature is 280 K (no atmosphere or greenhouse effect to worry about)? What are the orbital period and circular velocity of the planet? What is the circular velocity of the star (in m/s) that would be measured with the Doppler shif Related information below Estimate the depth of the...
Consider the 500-Watt heat source in the previous problem. Assuming that at launch the 500-Watt source...
Consider the 500-Watt heat source in the previous problem. Assuming that at launch the 500-Watt source was pure plutonium 238, what was the mass of the plutonium 238 at launch (closest answer in kg)? The alpha particles emitted by the plutonium have energy 5.6 MeV. (Previous Problem: Plutonium 238 is used as a heat source to generate electricity in space probes. It is an alpha-emitter with a half life of 88 years. If the plutonium heat source on a probe...
Consider again the Ohio Trust bank location problem discussed in Section 7.3. The file OhioTrustFull contains...
Consider again the Ohio Trust bank location problem discussed in Section 7.3. The file OhioTrustFull contains data for all of Ohio’s 88 counties. The file contains an 88 X 88 matrix with the rows and columns each being the 88 counties. The entries in the matrix are zeros and ones and indicate if the county of the row shares a border with the county of the column (1 = yes and 0 = no). a. Create a model to find...
Oxbrayne info from previous question (Consider the neighborhood, Oxbrayne, with 1933 residents where 50 % fall...
Oxbrayne info from previous question (Consider the neighborhood, Oxbrayne, with 1933 residents where 50 % fall in the A-class.) 2. Sticking with Oxbrayne as describe above. Consider a sample size (with replacement) of 25 used to estimate the proportion of its residents falling in to A-class. (a) What is the probability that an estimate of ˆp exactly coincides with the true proportion? (b) Now what if the sample size was effectively infinite, and sampling was with replacement. What would your...
To read in a number from a file as an integer is very simple. (Assuming our...
To read in a number from a file as an integer is very simple. (Assuming our file is defined as myInput; int mynum; myInput >> mynum; The file name should be myNum.txt A sample run of the program: The min is: 40 The max is: 90 The total is: 180 The average is: 60 The number of records read in was: 3 This run used 90 40 50 as its test input. A couple of things to keep in mind,...
What is the output from the following program? Explain your results. file:///Users/brianabernal/Downloads/Question%201.pdf int val = 20;...
What is the output from the following program? Explain your results. file:///Users/brianabernal/Downloads/Question%201.pdf int val = 20; int func1() {     int val = 5;     return val; } int func2() {     return val; } int main() {     // (1)     cout << func1() << endl;     // (2)     cout << func2() << endl; }
For this question you will need to upload a file. It is question 3 from the...
For this question you will need to upload a file. It is question 3 from the PDF file I sent you. Please show your work. The following information is given about the market for a normal good. Demand: P = 150-2Qd Supply P = 20+ 0.5 Qs What is the quantity demanded at a price of $80? (1.5 mark) What is the quantity supplied at a price of $80? (1.5 mark) At a price of $80 the market is not...
Consider the same football situation as in the previous question, but now suppose the payoffs (probabilities...
Consider the same football situation as in the previous question, but now suppose the payoffs (probabilities of winning) are as given in the following normal form: Defense Defend Pass Defend Run Offense Pass 0.2, 0.8 0.3, 0.7 Run 0.5, 0.5 0.4, 0.6 Do any of the teams (the one playing defense or the one playing offense) has a dominant strategy? Which one? Explain why.
5.Consider again the picture you selected in question #3. What’s attached to the 5’ end of...
5.Consider again the picture you selected in question #3. What’s attached to the 5’ end of this molecule? (BOLD the correct answer)    A phosphate group    OR    An OH group (which is attached to the ribose sugar) 6.Consider again the picture you selected in question #3. The way it’s drawn on this page, the bottom end of this molecule is considered to be the…(BOLD the correct answer)             3’ end      OR      5’ end
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT