I/O operations. how practically are done?

Discussion in 'Windows Vista Drivers' started by elvira_wang, Oct 16, 2006.

  1. elvira_wang

    elvira_wang Guest


    I have read once that the IO processing is the soul of Operating
    systems but unfortunately I can't find a useful textbook which
    addresses this topic practically. As such can anyone of you please
    explain me the following.

    Considering an advanced editor tool [like the word processor] which is
    generally equipped with considerable capabilities like spell checker,
    auto-recovery, periodic backup and so on. I am just wondering what
    happens precisely when the user type in her/his characters? Will the
    typed characters be transferred one by one to the editor processor HEAP
    segment? Will an interrupt be sent to the CPU at each typed character?
    How come that the characters are displayed immediately on the screen
    and while the user is typing? Are the data transferred from the heap to
    the video ram?

    elvira_wang, Oct 16, 2006
    1. Advertisements

  2. Keyboard ISR interrupts the CPU. The keyboard driver in the kernel gets the
    scancode and delivers it to the GUI core (X in Linux, win32k in Windows), since
    the GUI core is constantly reading from the keyboard driver. Then this keypress
    is delivered by the GUI core to the text editor app.

    How the text editor keeps the text in memory and how it updates its on
    keypresses is private for the given text editor.
    Maxim S. Shatskih, Oct 16, 2006
    1. Advertisements

  3. elvira_wang

    Don Burn Guest

    Max is correct for most modern computers, I have worked in the past with
    systems that had serial multiplexor that were smart enough to collect a
    line of text before sending, in fact one system had a state machine that
    allowed the editing within a line to be offloaded.

    Don Burn (MVP, Windows DDK)
    Windows 2k/XP/2k3 Filesystem and Driver Consulting
    Remove StopSpam from the email to reply

    Don Burn, Oct 16, 2006
  4. elvira_wang

    Pavel A. Guest

    Pavel A., Oct 16, 2006
  5. I once wrote a driver for a Chase Research card supporting (iirc) 4
    serial lines. The description of your card matches the one I worked
    with: 808x processor (may have been an 8088), 4 ports, though a 16-port
    version also existed.
    As it was not easy to integrate the processing power of the card, we
    just switched it off completely and did a "raw" interface. The only
    advantage of the card being that it provided 4 ports in one AT bus slot.
    Josef Moellers, Oct 17, 2006
  6. elvira_wang

    xu_feng_xu Guest

    any available documentation that i can read? what about displaying the
    data to the screen? video ram

    your answers did not address my question and i am still confused. any
    help will be extremely appreciated

    many thanks
    xu_feng_xu, Oct 17, 2006
  7. I would advice a decent textbook on operating design.

    In general, you have two separate paths:
    1. from keyboard to the application
    2. from the application to the screen

    The exact paths depend highly upon the system and the state of the
    system. The keyboard may be attached to a terminal which is connected
    through a serial line, it may be a PS/1 keyboard, it may be a USB
    keyboard or even a keyboard connected to an X terminal.
    The display may, again, be a terminal connected through a serial line, a
    monitor attached to a graphics card, an X terminal.
    Josef Moellers, Oct 17, 2006
  8. elvira_wang

    elvira_wang Guest

    any available documentation that i can read? what about displaying the

    data to the screen? video ram

    your answers did not address my question and i am still confused. any
    help will be extremely appreciated

    [posted previously from my friend account ...mistake]
    elvira_wang, Oct 17, 2006
  9. It is a highly complicated matter.

    As I wrote: find a textbook on operating system design. A decent, not
    too complicated book is A. M. Lister and R. D. Eager: Fundamentals of
    Operating Systems. Also recommended is Andrew S. Tanenbaum's "Structured
    Computer Organization" to name just two that I have.

    Then, obviously, there is the Linux source code, but that requires that
    you have a basic understanding of operating system design. Also, "video
    ram" is partially handled by the X server, so you'd have to look at
    that, too.

    Again: it's pretty complicated and any answer would quickly get quite
    out of hand, due to the multitude of possible paths.
    You are well advised to get some textbooks on operating system design.

    Josef Moellers, Oct 17, 2006
  10. Start with pre-Vista Windows DDK documentation on video drivers. This can
    shed some light.
    Maxim S. Shatskih, Oct 17, 2006
  11. You want to use abstractions, to ignore specifics of the implementation.

    There are many layers, and they may change with OS release, hardware, system
    configuration, etc.

    Input hardware gives you keyboard scan codes and mouse movement. The
    keyboard and mouse drivers take care of the hardware details, supplying
    input messages to the rest of the system.

    The windowing subsystem passes the input messages to an application, which
    could be a text editor, of course. It is up to the application to interpret
    the keyboard and mouse input messages.

    An application calls to the drawing subsystem to draw text and other
    graphics in its window. The commands are passed to a hardware-specific
    display card driver. The video card then shows the drawing on a monitor.

    The many layers of an OS are built with abstraction. One module doesn't need
    to know all the details of another module. An application doesn't need to
    know how the mouse or video driver works, it just calls some set of
    documented functions.
    Alexander Grigoriev, Oct 18, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.