edited by
10,286 views
33 votes
33 votes

A hard disk has $63$ sectors per track, $10$ platters each with $2$ recording surfaces and $1000$ cylinders. The address of a sector is given as a triple $\langle c, h, s \rangle$, where $c$ is the cylinder number, $h$ is the surface number and $s$ is the sector number. Thus, the 0$^{th}$ sector is addresses as $\langle 0, 0, 0 \rangle$, the 1$^{st}$ sector as $\langle 0, 0, 1 \rangle$, and so on

The address of the 1039$^{th}$ sector is

  1. $\langle 0, 15, 31 \rangle$
  2. $\langle 0, 16, 30 \rangle$
  3. $\langle 0, 16, 31 \rangle$
  4. $\langle 0, 17, 31 \rangle$
edited by

5 Answers

Best answer
57 votes
57 votes

$1039^{th}$ sector will be stored in track number $(1039 + 1)/63 = 16.5$ (as counting starts from $0$ as given in question) and each track has $63$ sectors. So, we need to go to $17^{th}$ track which will be numbered $16$ and each cylinder has $20$ tracks $(10$ platters $\times 2$ recording surface each) . Number of extra sectors needed $= 1040-16 \times 63 = 32$ and hence the sector number will be $31$. So, option (C). 

edited by
11 votes
11 votes

a sector address is given like this $\langle c, h, s \rangle$ so it means that, we traverse in this way:

this all is happening in a single cylinder:
means first move sector wise(covering a track on a surface),
when all sector are over change the surface (also means a single track is over)

then move in all surfaces(a cylinder has $2\times 10 = 20$ total surfaces) as done previously,
when all surface are over then at last move into next cylinder

for a single track, it has 63 sectors
for a single surface, it has 1 track = 63 sectors
this means that for a single cylinder, it has 20 surfaces = 20 tracks = 20 $\times$ 63 sectors

on checking option C:
$\langle0,16,31\rangle$
Number of sectors to be crossed $= 0+ (16 \times 63) + 31 \\ = 1039$

option C is the answer

@cse23

edited by
7 votes
7 votes
track no= $\frac{1039}{63}$ =$16.492063492063492063492063492063 ....$ so track no = $16 ..$

now i am considering the fractional part ... sector no=$0.492063492063492063492063492063* 63 = 31$

so the address is $\langle0,16,31\rangle $....  

correct me if i am wrong ...
edited by
0 votes
0 votes

(C) IS THE CORRECT ANSWER

1st sector start at <0,0,0> (in the question they are calling the 1st sector as the 0th sector) 

so, if we are asked to calculate the address of the 1039th sector and if we go by our assumption then they must be asking about the address of the 1040th sector.

Now, we have to calculate the <c,h,s> i.e. the cylinder number, the surface number and the sector number.

First, let's calculate the cylinder number:

we know that a cylinder will contain= 10x2x63 sectors = 1260 sectors and we need the address of the 1040th sector so it is clear that the 1040th sector is inside the 1st cylinder only, and in the question, they are representing the address of the 1st cylinder as 0 so c = 0.

Second, lets calculate the surface number: 

a surface will contain = 63 sectors (NOTE: if h starts from 0 then for any number h it means that we have to cross that many surfaces in order to get to the surface we want) h = 1040/63 = 16.507 (it means that we have to cross 16 surfaces) so, h = 16.

now calculate the remaining sectors = 0.507 x 63 = 31.941 (it means that we have to cross 31 sectors) so, s=31.

hence, <c,h,s> = <0,16,31>

edited by
Answer:

Related questions

20 votes
20 votes
5 answers
2
Kathleen asked Sep 22, 2014
8,374 views
In which one of the following page replacement policies, Belady's anomaly may occur?FIFOOptimalLRUMRU