I/O operations. how practically are done? - Linux

This is a discussion on I/O operations. how practically are done? - Linux ; Hi, 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 ...

+ Reply to Thread
Results 1 to 12 of 12

Thread: I/O operations. how practically are done?

  1. I/O operations. how practically are done?

    Hi,

    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?

    Thanks


  2. Re: I/O operations. how practically are done?

    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 Shatskih, Windows DDK MVP
    StorageCraft Corporation
    maxim@storagecraft.com
    http://www.storagecraft.com

    wrote in message
    news:1161014537.791944.198600@h48g2000cwc.googlegr oups.com...
    > Hi,
    >
    > 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?
    >
    > Thanks
    >



  3. Re: I/O operations. how practically are done?

    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
    http://www.windrvr.com
    Remove StopSpam from the email to reply




    "Maxim S. Shatskih" wrote in message
    news:%239RL51T8GHA.568@TK2MSFTNGP05.phx.gbl...
    > 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 Shatskih, Windows DDK MVP
    > StorageCraft Corporation
    > maxim@storagecraft.com
    > http://www.storagecraft.com
    >
    > wrote in message
    > news:1161014537.791944.198600@h48g2000cwc.googlegr oups.com...
    >> Hi,
    >>
    >> 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?
    >>
    >> Thanks
    >>

    >




  4. Re: I/O operations. how practically are done?

    On 2006-10-16, Don Burn wrote:

    > 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.


    Yup. Smart serial interfaces that handled most or all of the
    "cooking" (canonical mode processing) were not uncommon on
    older Unix systems (and I presume on big iron as well). I
    remember a Tektronix PDP-11 machine that had an 8086 on each
    4-port serial card. The 8086 did all of the canonical mode
    processing and only cause a receive interrupt for the PDP-11
    when a complete line was ready.

    --
    Grant Edwards grante Yow! How many retired
    at bricklayers from FLORIDA
    visi.com are out purchasing PENCIL
    SHARPENERS right NOW??

  5. Re: I/O operations. how practically are done?

    Grant Edwards wrote:
    > On 2006-10-16, Don Burn wrote:
    >
    >
    >>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.

    >
    >
    > Yup. Smart serial interfaces that handled most or all of the
    > "cooking" (canonical mode processing) were not uncommon on
    > older Unix systems (and I presume on big iron as well). I
    > remember a Tektronix PDP-11 machine that had an 8086 on each
    > 4-port serial card. The 8086 did all of the canonical mode
    > processing and only cause a receive interrupt for the PDP-11
    > when a complete line was ready.


    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 Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett


  6. Re: I/O operations. how practically are done?

    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


  7. Re: I/O operations. how practically are done?

    xu_feng_xu@yahoo.com wrote:
    > 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


    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 Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett


  8. Re: I/O operations. how practically are done?

    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]


  9. Re: I/O operations. how practically are done?

    elvira_wang@yahoo.com wrote:
    > 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]


    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
    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett


  10. Re: I/O operations. how practically are done?

    Start with pre-Vista Windows DDK documentation on video drivers. This can
    shed some light.

    --
    Maxim Shatskih, Windows DDK MVP
    StorageCraft Corporation
    maxim@storagecraft.com
    http://www.storagecraft.com

    wrote in message
    news:1161087468.800766.319300@f16g2000cwb.googlegr oups.com...
    > 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]
    >



  11. Re: I/O operations. how practically are done?

    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.

    wrote in message
    news:1161014537.791944.198600@h48g2000cwc.googlegr oups.com...
    > Hi,
    >
    > 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?
    >
    > Thanks
    >




  12. Re: I/O operations. how practically are done?

    elvira_wang@yahoo.com wrote:
    >
    >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?


    It doesn't happen "immediately". However, it appears "immediate" because
    modern processors are unbelievably fast. Remember that, in the time
    between one refresh of the screen and the next refresh of the screen, a
    3GHz processor will have run more than 40,000,000 instructions.

    >Are the data transferred from the heap to the video ram?


    Eventually, yes.
    --
    - Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.

+ Reply to Thread