The Gateway to Computer Science Excellence
+26 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$
in Operating System by Veteran (105k points)
edited by | 3k views
In this question we can go for options elimination:

A. $15*63+31 = 976$ //15 is taken because we need to cross 0 to 14 platters (15 platters) each with 63 sectors.
B. $16*63+30=1038$
D. $17*63+31=1102$

Hence, (C) is the correct option!
The Q is illuding enough bcs it considers the data fills the first cylinder from top to bottom then starts filling next cylinder, indeed option elimination looks appealing.

@chauhansunil20th 15 is taken because we need to cross 0 to 14 platters (15 platters) each with 63 sectors.

can u explain this line bit more. i m not getting how 1 platter has 63 sectors. There are 63 sectors per track and there may be many tracks per surface. 

3 Answers

+40 votes
Best answer

$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). 

by Boss (22.8k points)
edited by
what is the significance in adding 1 to 1039 ?
couting starts from 0 and 0th sector is counted as 0 itself right ?
So 1039th sectors  is actually numbered 1039 itself right ?

check option C:

$\langle 0,16,31\rangle$
Number of sectors to be crossed $= 0+ (16 \times 63) + 31 \\ = 1039$

option C is the answer


point to be noted here that secor 31 means that it is 32th sector since numbering starts from 0.

16*63 =1008 sectors have been crossed and we need to read further 32 sectors to get 1039th sector(sector number 1040)
The answer will not change either we take the 0th sector as 1st sector or 1st sector as 1st sector.
+9 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:
Number of sectors to be crossed $= 0+ (16 \times 63) + 31 \\ = 1039$

option C is the answer


by Boss (30.8k points)
edited by
@amarVashishth sir,
How could one  interpret that data on disk is stored cross sectionally ? and not latteraly ?

Thus, the 0th sector is addressed as ⟨0,0,0⟩, the 1st sector as ⟨0,0,1⟩, and so on.

If we proceed in a similar fashion we have the address <0,1,0> after all the sectors in a track are addressed. Which means the addresses are numbered in a cross sectional fashion. 


" for a single surface, it has 1 track = 63 sectors "

can anyone explain me how this interpretation comes. How we are considering that in one surface there is only one track. ?

It may be silly question but i m not getting this visually nor conceptually. 


@Satbir bhai mujhe bhi ye doubt hai jo kuljeet bhai ne pucha. could u explain ?

They have given $<c,h,s >$ to reach a sector and on a surface we will have $1$ track in which there will be $63$ sectors. If there would had been multiple tracks per surface then they would have either mentioned it or given address format like $<c,h,t,s>$ where $t$ means track number.

On the contrary , if you assume more than $1$ track per surface then how will you address a sector using $<c,h,s>$ only ?
+5 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 ...
by Boss (12.1k points)
edited by
Can u explain what's the logic behind multiplying the fractional part by no of sectors to get the sector number
think of it like this way, 1 track has 63 sectors, therefore to find the location of 1039 sector we need to divide it  by 63.
Now after dividing we get 16.4920634920634920  , this means that our sector lies somewhere between 16 and 17 track that means 16 track for sure.
now we reached 16 track , now we need to go to sector on 16th track. So multiplying this fractional part should give us the sector number. This is why we multiply it.
better do like this to get the remainder : 1039 - 16*63 = 31

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,292 answers
104,909 users