lkml.org 
[lkml]   [1998]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: elevator algorithm bug in ll_rw_blk.c
    Hi Stephen,

    "Stephen C. Tweedie" wrote:

    > On Sun, 15 Nov 1998 14:13:31 -0500, Chip Salzenberg
    > <chip@perlsupport.com> said:
    >
    > > According to Alan Cox:
    > >> Chip:
    > >> > But that's a *one-way* elevator. Ideal elevators are two-way,
    > >> > aren't they?
    > >>
    > >> If you go for the shortest movement alone you starve the edges of the disks.
    >
    > > I said "two-way", not "shortest movement".
    >
    > Two-way elevators _do_ have this problem. A block in the middle
    > cylinder of the disk gets serviced twice per full two-way pass, once in
    > each direction. Maximum wait time is half a pass; average is a
    > quarter. For a block at the edge of the disk, it will get serviced only
    > when the two-way pass approaches close to the edge of the disk, and will
    > not get another chance for a full pass, average wait half a pass.
    >
    > It's not a total stavation issue, but it _does_ give you a significant
    > unfairness.

    Well a better model is when you assume that there's much more blocks in between
    edges of the disk than on the edges. The unfairness you described exists, but it's
    not that significant - definitely more blocks might be served quicker by the
    two-way elevator, with the peak best for the center of the drive (and obviously
    worst serving times for the edges :)

    See ya!


    -- Tomek,
    "In theory there's no difference between theory and practice, but in practice...."




    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:45    [W:2.451 / U:0.180 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site