Discussion:
Clarification needed for Assnt 5
(too old to reply)
Alexei Babkin
2003-11-23 01:23:52 UTC
Permalink
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
Caroline Kierstead
2003-11-24 15:23:41 UTC
Permalink
Post by Alexei Babkin
I have doubts that I have correct understanding of the following sentence
"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
The primary intent is that each user has its own buffer of characters
that have been already processed by the KBA. Depending upon the structure
of your tasks, you may (or may not) want a buffer in between the keyboard
and the KBA as well. That decision is up to you, but you will have to
take into consideration the relative speeds of the tasks and the accept
priorities.
--
--
Caroline Kierstead, Instructional Support Coordinator
University of Waterloo, DC3138 (519) 888-4567 x6226
Loading...