Operating Systems Homework #2

$24.99 $18.99

0x0f0000000000. Assume for this question that stack segment also grows upward (towards higher addresses). Q4. Consider the following page reference string of a process. 2413463612 15254 1243 Assume the process has 3 frames that it can use, all empty initially. Assume second chance (i.e., clock) algorithm is used as page replacement algorithm. Assume reference bits…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

0x0f0000000000. Assume for this question that stack segment also grows upward (towards higher addresses).

Q4. Consider the following page reference string of a process.

2413463612 15254 1243

Assume the process has 3 frames that it can use, all empty initially.

  1. Assume second chance (i.e., clock) algorithm is used as page replacement algorithm. Assume reference bits (R bits) are cleared after every 5 references (i.e., some time between every 5th and 6th reference). Show the memory state (the pages in memory and their R bit values) after each page reference. Also indicate which reference causes a page fault. Assume after a page fault, when the new page is loaded, its R bit is set to 1.

  1. Solve the same question for Optimal algorithm.

Q5. Suppose that a disk drive has 10,000 cylinders, numbered 0 to 9,999. The drive is currently serving a request at cylinder (track) 4500, and the previous request was at cylinder 3900. The queue of pending requests, in FIFO order, is as follows: 5200 2000 9500 4300 1500 5100 9600 4000 4600

Starting from the current head position, what is the total distance (in cylinders/tracks) that the disk arm moves to satisfy all the pending requests for each of the following disk-scheduling algorithms: FCFS, SCAN , SSTF.

Q6. A disk has the following parameters:

Size: 512 GB

RPM: 3600

avg seek time: 4 ms

max transfer rate: 30 MB/s.

  1. Assume block size 4 KB. What is the I/O time to read one random block from this disk? How many such transfers can we complete per second? What is the I/O data rate (i.e., throughput).

  2. Assume we will read 512 blocks (each 4 KB), that are contiguous on the disk, sequentially. How many such transfers can we complete per second? What is the I/O data rate (i.e., throughput).

Q7. Consider a file system that uses inodes to represent files. Disk blocks are 4 KB in size, and a pointer to a disk block requires 8 bytes. Assume in an inode we have 10 direct disk block pointers, one single indirect pointer, one double indirect pointer, and one triple indirect pointer. That means, combined index allocation scheme is used to keep track of the blocks allocated to a file.

  1. What is the maximum size of a file that can be stored in this file system?

  2. How many second level index blocks are required for a file X of size 8 GB.

  3. If nothing, except the inodes, is cached in memory, how many disk block accesses are required to access a byte i) at offset 2^15, ii) at offset 2^23, iii) at offset 2^32 of the file X?

2

Operating Systems Homework #2
$24.99 $18.99