Project 1 - Notes & Hints


[ Follow Ups ] [ Post Followup ] [ CS2604 Discussion WWWBoard ] [ FAQ ]

Posted by hussein on July 10, 1999 at 11:46:40:

hi

in case any of you are not familiar with the concept
of a keyboard buffer ...

a buffer is a data structure that is used to solve
the problem of I/O devices operating at different
speeds from the CPU. in general, when entity A
wants to send data to entity B, and entity B is not
yet ready to process the data, the data is stored
temporarily until entity B is ready - thus freeing
up entity A to continue with other work instead of
waiting for entity B to complete its previous tasks.

a keyboard buffer is a data structure that is usually
embedded within the operating system of the computer.
its sole purpose is to store keystrokes from the
keyboard so that the user can continue typing even if
the computer has not as yet completed processing the
previous keystrokes. (you may ask how the computer is
going to do the buffering when its still busy
processing - two words: multitasking, interrupts)

most buffers, including keyboard buffer, work on a FIFO
principle. the first keystroke "Enter"ed, must be the
first "Retrieve"d ... when using an array, the big
question is how to implement a FIFO data structure ...
the answer to this question, if u get stuck, is on
pages 110-114 of the course text ...

what is most fascinating about the keyboard buffer is
that it is implemented in the BIOS of the computer -
so PCs (and probably other computers too) are using
fairly advanced data structures before even the OS
is loaded ...

we are writing a "simulation" for three reasons :
1. to appreciate the mechanics of a basic data
structure task managed by the OS
2. to avoid having to interface with the OS at a
low level - this is not a hardware course !
3. to avoid differences among OSes and hardware
platforms

references:
p110-114 of text (array-based circular queues)
p227 of text (disk buffering)
http://www.ececs.uc.edu/~sdunan/cs417/lect/chap05/ch12.html (the pc keyboard)
http://www.krystal.com/nsfaq/Q.5.html (low memory PC bios)



Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS2604 Discussion WWWBoard ] [ FAQ ]