2 Replies Latest reply: Feb 26, 2007 12:18 PM by 807567 RSS

    Implementation of IO Completion Ports in Solaris

    807567
      I am working on porting of a Windows NT application which uses IOCompletion ports. I would like to know how the same can be implemented in Solaris and it would be helpful if can get some sample source code for the same.

      Regards
        • 1. Re: Implementation of IO Completion Ports in Solaris
          807567
          I am working on porting of a Windows NT application
          which uses IOCompletion ports. I would like to know
          how the same can be implemented in Solaris and it
          would be helpful if can get some sample source code
          for the same.

          Regards
          Bad luck, there isn't such support in SOLARIS. You can simulate this by using async I/O
          aioread/aiowrite and dedicating special threads for receiving the SIGIO signals. These threads
          will make an aiowait loop. Unfortunately, you will receive signals for ANY kind of async I/O so you
          must be able to deduce yourself the relevant file-descriptor associated with the specific I/O.
          Also, you must know that async I/O is often masked as by using dedicated threads with
          synchronous I/O. I think that only for volumes, async I/O is really asynchronous.

          Hope it helps.
          • 2. Re: Implementation of IO Completion Ports in Solaris
            807567
            Actually, in Solaris 10 event ports were introduced. These allow one to wait in a unified fashion for async io completions, poll, timers, etc. More event sources are planned, including file modification events, signals, etc.