in Operating System edited by
19,434 views
48 votes
48 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 $\langle 400, 16, 29 \rangle$ corresponds to sector number:

  1. $505035$
  2. $505036$
  3. $505037$
  4. $505038$
in Operating System edited by
19.4k views

4 Comments

@Arjun sir what about no of tracks per surface?
if it is not mentioned in question then do we have to assume it to 1 track per surface?

0
0
edited by

@JAINchiNMay In the question given that There are 1000 cylinders so in each surface there would be 1000 tracks.

0
0
So cylinder and tracks are same
Thanks!!
0
0

5 Answers

109 votes
109 votes
Best answer

The data on a disk is ordered in the following way. It is first stored on the first sector of the first surface of the first cylinder. Then in the next sector, and next, until all the sectors on the first track are exhausted. Then it moves on to the first sector of the second surface (remains at the same cylinder), then next sector and so on. It exhausts all available surfaces for the first cylinder in this way. After that, it moves on to repeat the process for the next cylinder.

So, to reach to the cylinder numbered $400 (401^{th} cylinder)$ we need to skip $400$ $\times$ ($10$ $\times$ $2$) $\times$ $63  = 504,000$ sectors.

Then, to skip to the $16^{th}$ surface of the cylinder numbered $400$, we need to skip another $16$ $\times$ $63 = 1,008$ sectors.

Finally, to find the $29$ sector, we need to move another $29$ sectors.

In total, we moved $504,000 + 1,008 + 29 = 505,037$ sectors.

Hence, the answer to $51$ is option (C).

edited by

15 Comments

reshown by
In the statement "Finally, to find the 29 sector, we need to move another 29 sectors" in your explanation you said that we moved another 29 sectors to reach sect 29, but finally we need to access sect 29 which is 30th sector and question asks for that sect number which is having address 29 in 17th surface(surface no 16) which is further on 401 st cylinder (cylinder number 400 ) .So according to me answer is (D).

Give it a thought or correct me if I am missing something !!
2
2

It is true that the counting starts from 0, so the 29th sector is actually the 30th sector. Or is it?!

Notice that although the counting begins with 0, the starting sector is labelled the 0th sector, and not the first.

So, to reach the sector marked by the address <0, 0, 3>, we need to goto the sector labelled number 3 (not number 4)

<0,0,0> = 0th sector

<0,0,1> = 1st sector

<0,0,2> = 2nd sector

<0,0,3> = 3rd sector

...

<0,0,29> = 29th sector.

38
38
Thanx @Pragy...Got it now .Actually I thought it is asking for "Number of sectors like from 0-3 we have 4 sectors .But question actually calls number 3 sector as 3rd sector and not 4th as you said.
2
2
moved by
for b part chck the options to see who gives the desired no of sectrs
–2
–2

How to find reverse of this solution.
Like.. to find the address of the sectors of 505035, 505036, 505037 and so on..

0
0
+1 Very well explained.
0
0
@Pragy but then how can you be sure that in convention <c,h,s> , for s the numbering begins from 1 but for cylinder it begins from 0? It's nowhere mentioned in the question that 1st cylinder is addressed as <1,0,0>
0
0

@Sandeep

I think you're right

http://stackoverflow.com/questions/8950810/do-we-call-the-first-bit-in-a-byte-bit-1-or-0

Even in bit conventions the first bit is called as "bit 0". 

@Arjun if possible please see this.

0
0
@arjun sir ,
How could one  interpret that data on disk is stored cross sectionally ? and not linearly ?
4
4
edited by

<0,0,0> : 0th sector
<0,0,1> : 1st sector
<0,0,2> : 2nd sector
.

.
<0,0,63> : 63rd sector

But this won't be there right? As there are only 63 sectors and this would represent a 64th sector. Even though we're counting from 0 and labeling it as 0 but at the end each track can only have 63 sectors no matter the labeling.

So, <0,1,0> : would represent the 64th sector.

Similarly <400,16,0> : would represent the 505009th sector.

And <400,16,29> : would represent the 505038th sector.


This is the wrong interpretation and it is somewhat like this:

<0,0,0> : 0th sector
<0,0,1> : 1st sector
<0,0,2> : 2nd sector
.

.
<0,0,62> : 62nd sector.

So, <0,1,0> : would represent the 63rd sector.

Similarly <400,16,0> : would represent the 505008th sector.

And <400,16,29> : would represent the 505037th sector.


 

0
0
the way you explained is amazing😊
1
1
yes pal
0
0

@Pragy Agarwal   its mentioned that the address is in 400th cylinder, then shouldn’t 399 be multiplied instead of 400   ====> 399× (1010 × 22) × 63

0
0

@rish1602  It means 400 no. cylinder is going on, i.e. not yet fully filled. (0- 399) = 400  cylinders are fully filled, so 400 * (10 * 2) * 63 sectors are required for cylinders.

0
0
edited by

badiya @Pragy Agarwal bhai

0
0
3 votes
3 votes

(See UPDATE below) May be my interpretation flawed.. but here's my approach:

First, let us understand the story behind the DISK's Model which I have inferred after a two hour long research from this paper:
http://www2.cs.uh.edu/~paris/7360/PAPERS03/IEEEComputer.DiskModel.pdf

So, as per the question, there are 10 platters which are like the simple (2-sided) RW CD..
A cylinder is a stack of tracks. Don't think them as tracks on a surface but a cross-sectional stack of tracks across all the platters.
Imagine stacking all the platters one one top of the other (which they actually are on a spindle) and then looking at a track which in turn is a cylinder through all the platters below..

If the image is still unclear, refer to the diagrams in the paper or the web.

Now, as per the question,

10 platters (2-sided),, 1000 cylinders per platter (or 500 per surface), 63 sectors per track (which is on a cylinder on each surface - logically).

Now, the address <400,16,29> corresponds to,
PS: It must be noted that this is a 0-based address as per the question.
Hence, it is actually <401st cylinder, 17th surface, 30th sector>..

Skipping 16 (0-15) surfaces above the 17th (on which the sector is located) =>

skipping 16 x 500 x 63 sectors +

(on the 17th surface) skipping 400x63 sectors +

(on the 400th cylinder) skipping 29 sectors

= 529229

UPDATE:
The question is not ambiguous but my interpretation was flawed in the sense that the sectors are not numbered laterally but CROSS-SECTIONALLY across the platters (rather surfaces).

So the sectors are first numbered sequentially on the 0th cylinder of the 0th surface on the 1st platter and then the 1st surface (the other recordable end) of the same platter.

Similarly, if the head is on the 1st cylinder => It has skipped the 0th cylinder. 
Further, depending on the cylinder position of the head, it can be inferred how many times, all the 10 platters were skipped.

To make this even more evident and clear, let us rectify the above interpretation.

So, <400,16,29> can still be interpreted as: the head on the 401th cylinder, 17th surface and the 30th sector on that surface as explained above due to the 0 based index.

Hence, we have skipped
400 x 2 <individual tracks per surface> x 10 <platters> x 63 <sectors> + 16 <cylinders skipped no 17th surface> x 63 + 29 <sectors skipped no the 401st track>
= 505037

edited by

4 Comments

Feedback: Although I appreciate the other answer by @Pragy, it would have been further appreciated if the interpretation in my answer was corrected instead of a downvote.. Am I right? :)
0
0
edited by

Heres the obvious rule:

\text{``If you don't know the answer, don't post an answer!"}

If you have some approach and wish to discuss it, either open up a new thread, or drop a comment on the question.

Also, heres how the downvote to an answer should be interpreted:

"The answer was flawed/was misleading/was spam/poorly structured/had poor grammar/was racist/sexist/ or some other genuine cause."

A downvote is NOT a personal attack at the person, who's answer/comment received the downvote.

25
25
how... 400*20 is giving no. of surfaces... for track why we are not multipling with 1000..then we should multiply with 63....so answer should be... 400*20*1000*63+16*1000*63+29 correct me where i m wrong
0
0
When read write head arm is at 400 cylinder it means we have surpassed 400*20*63 as each cylinder has 20 surfaces each containing 63 cylinder in addition to that we are at 16th  track  containing 63 sectors each so add 16*63 in addition we have surpassed total 29 cylinders here that gives 505037
0
0
2 votes
2 votes
⟨400,16,29⟩ means it has crossed 400 cylinders(0-399),then in 400th cylinder it has crossed 16 surfaces(0-15) & in 16th surface it's in 29 numbered sector.

So [(400*(20*63)) + (16*63) + 29] = 505037

1 cylinder means crossing (20*63) sectors,as 20 r/w head is simultaneously recording from 20 surfaces & then going to the next level cylinder.
0 votes
0 votes

Answer : C

Total no. of Sectors = [(cylinder no. * total surfaces * secor/track)+(surface number *secor/track )+(sector no.) ]

total surface = 2*10 = 20

[ ( 400 * 20 * 63 ) + ( 16 * 63 ) + 29 ]  

= 505037

Answer:

Related questions