Alexei Babkin
2003-11-23 01:23:52 UTC
Hi
I have doubts that I have correct understanding of the following sentence
in assignment 5:
"To increase concurrency, the KBA must buffer the characters from
keyboard separately for each task and then process them in FIFO order for
a particular task"
Do you mean that there should be a buffer, that will be receiving
characters from the keyboard at one end and feeding these characters in
FIFO to KBA for processing and later sending to the users, from the other
end of the buffer?
OR
Keep the same amount of buffers as there are tasks(at the moment) and
after processing the chars, coming from the keyboard, distribute them
among these buffers in accord to which tasks those chars should be passed
to, in FIFO order. This way KBA will process the chars at "its own pace" and the
users will be reading chars off their own buffers as they call to
getChar(). Also this way "slow" users will not slow down the KBA processing
chars and therefore will not slow down other (faster) users reading
"their" chars from "their" buffers.
OR
BOTH
I had thought about that for awhile and concluded that using both, we
should achieve the best concurency, however we would not know what user
had called into getChar() as we would have to allow all users to access
it. But I could be wrong, so I'd like you to clarify and elaborate some
more on the original sentence I cited in the beginning.
Thanks
Alex
I have doubts that I have correct understanding of the following sentence
in assignment 5:
"To increase concurrency, the KBA must buffer the characters from
keyboard separately for each task and then process them in FIFO order for
a particular task"
Do you mean that there should be a buffer, that will be receiving
characters from the keyboard at one end and feeding these characters in
FIFO to KBA for processing and later sending to the users, from the other
end of the buffer?
OR
Keep the same amount of buffers as there are tasks(at the moment) and
after processing the chars, coming from the keyboard, distribute them
among these buffers in accord to which tasks those chars should be passed
to, in FIFO order. This way KBA will process the chars at "its own pace" and the
users will be reading chars off their own buffers as they call to
getChar(). Also this way "slow" users will not slow down the KBA processing
chars and therefore will not slow down other (faster) users reading
"their" chars from "their" buffers.
OR
BOTH
I had thought about that for awhile and concluded that using both, we
should achieve the best concurency, however we would not know what user
had called into getChar() as we would have to allow all users to access
it. But I could be wrong, so I'd like you to clarify and elaborate some
more on the original sentence I cited in the beginning.
Thanks
Alex