1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Mice21 [21]
1 year ago
9

onsider a file system on a disk that has both logical and physical block sizes of 512 bytes. assume that the information about e

ach file is already in memory. for each of the three allocation strategies (contiguous, linked, and indexed), answer the following question: if we are currently at logical block 10 (the last block accessed was block 10) and want to access logical block 4, how many physical blocks must be read from the disk?
Computers and Technology
1 answer:
anygoal [31]1 year ago
4 0

For three disk allocation strategies (contiguous, linked, and indexed),

in this case, the  physical blocks must be read from the disk are 1,4 and 2 respectively.

In the disk, every block has a sequential number. The majority of disks today do logical I/O in hardware. Physical I/O is seldom ever required of operating systems today.

File access uses virtual I/O. Similar to disk logical I/O is disk virtual I/O. The distinction is that with virtual I/O, as opposed to physical I/O, the blocks that make up a file are

You could want to transfer from virtual block 10 to virtual block 4 in a contiguous allocation. Since the file is contiguous and you are at logical block 10 + Z, block four can be accessed by reading logical block 4 + Z. Without any intermediaries, that can be done directly.

Each block in the linked structure has 511 bytes of data and one byte that serves as an offset to the following block.

Read the first block, determine the offset to the second block, read the second block, determine the offset to the fourth block, and then read the fourth block in order to gain access to the fourth block.

If blocks are numbered from 1 to 10, then then is the "4" correct. The remainder of the solutions, however, make the assumption that block numbering begins at 0, using division to obtain offsets.

Assume there is a contiguous index for the indexed way of allocating files. Once more, it is assumed that each offset in the index is one byte in size.

Let's say that Z serves as the index's origin. Then, the byte at block Z + 3 DIV 512 and the offset at 3 MOD 512 (3 = 4 - 1) make up the entry for block 4 (numbered 1 to 4).

You must read the index and the data block in order to locate the block (2 reads).

To learn more about disk allocation strategies click here:

brainly.com/question/15083707

#SPJ4

You might be interested in
What are some ways you can give staying off your phone a "boost" and make it easier to do?
Arte-miy333 [17]

Answer:

go do something outside and leave your phone inside to charge

Explanation:

7 0
3 years ago
What may happen if a large number of computer users are attempting to access a web site at the same time that you are
Nitella [24]
It will most likely begin to crash and eventually just freeze , i'm guessing  
6 0
3 years ago
Read 2 more answers
How do you take a screen shot on hp pavilion dm3
drek231 [11]
Press and hold down the "Fn" button while pressing the "Home Prt Sc" button above the numeric keypad to capture the entire screen. Make a screenshot of the active window only by holding down the "Fn" and Alt" keys while pressing "Home Prt Sc." 2. Press the "Start" button, and type "Paint" into the search box.
5 0
3 years ago
Word provides an undo button that can be used to cancel the most recent command or action. true or false.
erastova [34]
The answer would be true.
7 0
3 years ago
Read 2 more answers
In this exercise, your function will receive 2 parameters, the name of a text file, and a list of strings. The function will wri
diamong [38]

Answer:

# the function is defined

# it takes 2 arguments: filename and list of string

def solution(filename, listOfString):

   # the file is opened in write mode

   # so that we can write to it

   with open(filename, 'w') as file_object:

       # we loop through the entire list of string

       # this looping help us know what to write to the file

       for each_string in listOfString:

           # if the length of the string is less than 4

           # we write 'x' with a new line

           if len(each_string) < 4:

               file_object.write("x\n")

           # else if the length of the string is greater than equals 4

           # we write the fourth character

           # and also add new line

           else:

               file_object.write(each_string[3])

               file_object.write("\n")

Explanation:

The function is written in Python. It takes two argument; filename and list of string.

It opens the file in write mode and then loop through the list of string. During the loop, we know what to write to the file.

In the length of a string is less than 4; we write 'x' else we write the fourth character in the string. The fourth character has an index of 3 because string uses zero index counting like a string. Starting from zero; 0, 1, 2, 3, 4... the fourth character has an index of 3.

5 0
3 years ago
Other questions:
  • Which computer port transmits audio and video without the need for compression?
    6·1 answer
  • What is the very first thing a user usually must do to gain access to a secure computer?
    7·1 answer
  • What processes are needed to transform a c++ program to a machine language program that is ready for execution?
    14·1 answer
  • Last week, a disk containing CSM Tech Publishing’s current project manuscripts crashed. Fortunately, there was a backup, but all
    15·1 answer
  • Should the use of hacktivists by a country against enemy organizations be considered an act of war? Why or why not? How about th
    8·1 answer
  • Can i edit my name on this app?
    7·1 answer
  • What does it mean to catch an exception?
    8·1 answer
  • Omo help me i need it now.
    12·1 answer
  • with the advent of technology one can experience special features such as 3D theater experiences true or false
    8·1 answer
  • 7 TH GRADE QUESTION...PLS HELP
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!