How to run Realtime Application in win32 environment

Archived from groups: microsoft.public.win2000.hardware,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.hardware (More info?)

Hi all,

Please tell me is there any possibility to disable all background services
and everything in win32 (Windows 98, win2000 and win XP) and run only a
single application in Real-Time mode so that only this application utilizes
CPU cycles. This application utilizes serial communication, usb camera and
draw output of the camera on monitor. Any idea for any of the OS i.e. 98, 2K
or XP(specially win2k or XP)???

Thanks,

Arsalan
13 answers Last reply
More about realtime application win32 environment
  1. Archived from groups: microsoft.public.win2000.hardware,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.hardware (More info?)

    You can set the Reg_Sz string value of;
    "Shell"="Explorer.exe"
    to the full path of the program you wish to start by default. found at
    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

    For example to start the command interpreter;
    "Shell"="C:\winnt\system32\cmd.exe"

    You may be able to define this per user at;
    HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

    --
    Regards,

    Dave Patrick ....Please no email replies - reply in newsgroup.
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    http://www.microsoft.com/protect


    "Arsalan Ahmad" wrote:
    | Hi all,
    |
    | Please tell me is there any possibility to disable all background services
    | and everything in win32 (Windows 98, win2000 and win XP) and run only a
    | single application in Real-Time mode so that only this application
    utilizes
    | CPU cycles. This application utilizes serial communication, usb camera and
    | draw output of the camera on monitor. Any idea for any of the OS i.e. 98,
    2K
    | or XP(specially win2k or XP)???
    |
    | Thanks,
    |
    | Arsalan
    |
    |
  2. Archived from groups: microsoft.public.win2000.hardware,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.hardware (More info?)

    Arsalan Ahmad wrote:
    > Hi all,
    >
    > Please tell me is there any possibility to disable all background services
    > and everything in win32 (Windows 98, win2000 and win XP) and run only a
    > single application in Real-Time mode so that only this application utilizes
    > CPU cycles. This application utilizes serial communication, usb camera and
    > draw output of the camera on monitor. Any idea for any of the OS i.e. 98, 2K
    > or XP(specially win2k or XP)???

    There may be multiple aproaches to this, depending how tight you want to
    utilize all CPU cycles. If you are ok with ocasional preemption, you may
    try set the priority of your thread/process to highest.
    With this method I achieved ~100us latency in user (ring3) mode.

    Different aproach would be to write a kernel mode thread, apparently
    these do not get preempted, did not try.

    If you will get stuck, consider XP Embedded or CE.

    Gary G. Little wrote:
    > It's called DOS. You boot to it.

    The answer is off-topic.

    If Tektronix can handle 6Gs/s with Win2k on their scopes, and HP uses
    Win98, then the OP should definitely be able to use Windows for his app.

    Roman
  3. Archived from groups: microsoft.public.win2000.hardware,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.hardware (More info?)

    Arsalan Ahmad wrote:
    > Hi all,
    >
    > Please tell me is there any possibility to disable all background services
    > and everything in win32 (Windows 98, win2000 and win XP) and run only a
    > single application in Real-Time mode so that only this application utilizes
    > CPU cycles. This application utilizes serial communication, usb camera and
    > draw output of the camera on monitor. Any idea for any of the OS i.e. 98, 2K
    > or XP(specially win2k or XP)???

    Just curious, why would you need to utilize all the cycles for something
    like USB camera, serial comm and display ?

    I can see the need for exclusive CPU utilisation only if you would be
    polling some fast events, bitbanging PWM etc. Serial and USB comms on
    Wintel platform are hw+sw buffered and handled by OS quite well.
  4. Archived from groups: microsoft.public.win2000.hardware,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.hardware (More info?)

    It's called DOS. You boot to it.

    --
    Gary G. Little
    Seagate Technologies, LLC

    "Arsalan Ahmad" <arsal__@hotmail.com> wrote in message
    news:%23ieNGFvaEHA.644@tk2msftngp13.phx.gbl...
    > Hi all,
    >
    > Please tell me is there any possibility to disable all background services
    > and everything in win32 (Windows 98, win2000 and win XP) and run only a
    > single application in Real-Time mode so that only this application
    utilizes
    > CPU cycles. This application utilizes serial communication, usb camera and
    > draw output of the camera on monitor. Any idea for any of the OS i.e. 98,
    2K
    > or XP(specially win2k or XP)???
    >
    > Thanks,
    >
    > Arsalan
    >
    >
  5. Archived from groups: microsoft.public.win2000.hardware,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.hardware (More info?)

    "Roman Ziak" <news1@MYLASTNAME.com> wrote in message
    news:#u3gbA0aEHA.3512@TK2MSFTNGP12.phx.gbl...

    [...]

    > Different aproach would be to write a kernel mode thread, apparently
    > these do not get preempted, did not try.

    They do get preempted, unless they raise their IRQL to the DPC or higher
    level, but then they cannot use most of the OS services. And even then
    interrupt service routines will still be preempting them.

    S
  6. Archived from groups: microsoft.public.win2000.hardware,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.hardware (More info?)

    Hi all,

    Now there is one another question. Usually when we dispatch a message then
    it goes to the end of the message queue with the exception of WM_PAINT
    message. I want another message to be processed first. Is there any way?

    Thanks,

    Arsalan

    "Dave Patrick" <mail@NoSpam.DSPatrick.com> wrote in message
    news:urpSVcxaEHA.644@tk2msftngp13.phx.gbl...
    > You can set the Reg_Sz string value of;
    > "Shell"="Explorer.exe"
    > to the full path of the program you wish to start by default. found at
    > HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
    >
    > For example to start the command interpreter;
    > "Shell"="C:\winnt\system32\cmd.exe"
    >
    > You may be able to define this per user at;
    > HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
    >
    > --
    > Regards,
    >
    > Dave Patrick ....Please no email replies - reply in newsgroup.
    > Microsoft Certified Professional
    > Microsoft MVP [Windows]
    > http://www.microsoft.com/protect
    >
    >
    > "Arsalan Ahmad" wrote:
    > | Hi all,
    > |
    > | Please tell me is there any possibility to disable all background
    services
    > | and everything in win32 (Windows 98, win2000 and win XP) and run only a
    > | single application in Real-Time mode so that only this application
    > utilizes
    > | CPU cycles. This application utilizes serial communication, usb camera
    and
    > | draw output of the camera on monitor. Any idea for any of the OS i.e.
    98,
    > 2K
    > | or XP(specially win2k or XP)???
    > |
    > | Thanks,
    > |
    > | Arsalan
    > |
    > |
    >
    >
  7. Archived from groups: microsoft.public.win2000.hardware,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.hardware (More info?)

    "Arsalan Ahmad" <arsal__@hotmail.com> wrote in message
    news:%23Kn0nGvbEHA.556@tk2msftngp13.phx.gbl...
    > Hi all,
    >
    > Now there is one another question. Usually when we dispatch a message then
    > it goes to the end of the message queue with the exception of WM_PAINT
    > message. I want another message to be processed first. Is there any way?

    No. If you want it executed immediately, send it instead of posting it.

    --
    -GJC [MS Windows SDK MVP]
    -Software Consultant (Embedded systems and Real Time Controls)
    - http://www.mvps.org/ArcaneIncantations/consulting.htm
    -gchanson@mvps.org
  8. Archived from groups: microsoft.public.win2000.hardware,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.hardware (More info?)

    Roman Ziak <news1@MYLASTNAME.com> wrote:
    > If Tektronix can handle 6Gs/s with Win2k on their scopes, and HP uses
    > Win98, then the OP should definitely be able to use Windows for his app.

    You probalby know this, but those scopes use several processors and plenty
    of dedicated hardware to cpature those 6 Gsps... the Windows CPU probably
    spends most of its time running the GUI, cycle-wise!
  9. Archived from groups: microsoft.public.win2000.hardware,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.hardware (More info?)

    From where can I get information about wintel platform?? What is it
    sxactly?

    Thanks,

    Arsalan

    "roman ziak" <news1@MYLASTNAME.com> wrote in message
    news:Ocp57E1aEHA.3204@TK2MSFTNGP09.phx.gbl...
    > Arsalan Ahmad wrote:
    > > Hi all,
    > >
    > > Please tell me is there any possibility to disable all background
    services
    > > and everything in win32 (Windows 98, win2000 and win XP) and run only a
    > > single application in Real-Time mode so that only this application
    utilizes
    > > CPU cycles. This application utilizes serial communication, usb camera
    and
    > > draw output of the camera on monitor. Any idea for any of the OS i.e.
    98, 2K
    > > or XP(specially win2k or XP)???
    >
    > Just curious, why would you need to utilize all the cycles for something
    > like USB camera, serial comm and display ?
    >
    > I can see the need for exclusive CPU utilisation only if you would be
    > polling some fast events, bitbanging PWM etc. Serial and USB comms on
    > Wintel platform are hw+sw buffered and handled by OS quite well.
  10. Archived from groups: microsoft.public.win2000.hardware,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.hardware (More info?)

    intel's h/w + windows os.
    info about intel's h/w you can find on
    http://developer.intel.com/design/pentium4/manuals/253665.htm.
    about windows I think you don't need references :)
    Arkady

    "Arsalan Ahmad" <arsal__@hotmail.com> wrote in message
    news:ewHaD15cEHA.1152@TK2MSFTNGP09.phx.gbl...
    > From where can I get information about wintel platform?? What is it
    > sxactly?
    >
    > Thanks,
    >
    > Arsalan
    >
    > "roman ziak" <news1@MYLASTNAME.com> wrote in message
    > news:Ocp57E1aEHA.3204@TK2MSFTNGP09.phx.gbl...
    > > Arsalan Ahmad wrote:
    > > > Hi all,
    > > >
    > > > Please tell me is there any possibility to disable all background
    > services
    > > > and everything in win32 (Windows 98, win2000 and win XP) and run only
    a
    > > > single application in Real-Time mode so that only this application
    > utilizes
    > > > CPU cycles. This application utilizes serial communication, usb camera
    > and
    > > > draw output of the camera on monitor. Any idea for any of the OS i.e.
    > 98, 2K
    > > > or XP(specially win2k or XP)???
    > >
    > > Just curious, why would you need to utilize all the cycles for something
    > > like USB camera, serial comm and display ?
    > >
    > > I can see the need for exclusive CPU utilisation only if you would be
    > > polling some fast events, bitbanging PWM etc. Serial and USB comms on
    > > Wintel platform are hw+sw buffered and handled by OS quite well.
    >
    >
  11. Archived from groups: microsoft.public.win2000.hardware,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.hardware (More info?)

    Ok but then how is it related to my question. I have an application which
    perform some matrix operations that take a lot of CPU time. I want to
    minimize (not by changing algorithm right now) this CPU time. I know that in
    win32(win9x, win2k & xp) Operating system takes a lot of time. I want my
    application to run in real-time mode. It is MFC simple view based
    application which takes input(image) from a USB-based WebCam and perform
    some image processing on that image(I like to mention that i do all the
    image processing in WM_PAINT event i.e. OnPaint() message handler and
    display it. How is it possible to minimize my that imageprocessing time(not
    by changing algorithm right now)? Just any idea? any?

    Thanks,

    Arsalan


    "Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message
    news:ce51kn$flt$1@home.itg.ti.com...
    > intel's h/w + windows os.
    > info about intel's h/w you can find on
    > http://developer.intel.com/design/pentium4/manuals/253665.htm.
    > about windows I think you don't need references :)
    > Arkady
    >
    > "Arsalan Ahmad" <arsal__@hotmail.com> wrote in message
    > news:ewHaD15cEHA.1152@TK2MSFTNGP09.phx.gbl...
    > > From where can I get information about wintel platform?? What is it
    > > sxactly?
    > >
    > > Thanks,
    > >
    > > Arsalan
    > >
    > > "roman ziak" <news1@MYLASTNAME.com> wrote in message
    > > news:Ocp57E1aEHA.3204@TK2MSFTNGP09.phx.gbl...
    > > > Arsalan Ahmad wrote:
    > > > > Hi all,
    > > > >
    > > > > Please tell me is there any possibility to disable all background
    > > services
    > > > > and everything in win32 (Windows 98, win2000 and win XP) and run
    only
    > a
    > > > > single application in Real-Time mode so that only this application
    > > utilizes
    > > > > CPU cycles. This application utilizes serial communication, usb
    camera
    > > and
    > > > > draw output of the camera on monitor. Any idea for any of the OS
    i.e.
    > > 98, 2K
    > > > > or XP(specially win2k or XP)???
    > > >
    > > > Just curious, why would you need to utilize all the cycles for
    something
    > > > like USB camera, serial comm and display ?
    > > >
    > > > I can see the need for exclusive CPU utilisation only if you would be
    > > > polling some fast events, bitbanging PWM etc. Serial and USB comms on
    > > > Wintel platform are hw+sw buffered and handled by OS quite well.
    > >
    > >
    >
    >
  12. Archived from groups: microsoft.public.win2000.hardware,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.hardware (More info?)

    You have to make profiling to find how it the time.
    To make profiling for windows functions you can use
    ApiMon from Resource Kit. If you see that all time eats by your calculation
    and you want to redice it for any price, you need to move it on different
    thread with real-time priority ( create thread suspended and set its
    priority to real-time ).
    Arkady

    "Arsalan Ahmad" <arsal__@hotmail.com> wrote in message
    news:eI10cy7cEHA.3616@TK2MSFTNGP10.phx.gbl...
    > Ok but then how is it related to my question. I have an application which
    > perform some matrix operations that take a lot of CPU time. I want to
    > minimize (not by changing algorithm right now) this CPU time. I know that
    in
    > win32(win9x, win2k & xp) Operating system takes a lot of time. I want my
    > application to run in real-time mode. It is MFC simple view based
    > application which takes input(image) from a USB-based WebCam and perform
    > some image processing on that image(I like to mention that i do all the
    > image processing in WM_PAINT event i.e. OnPaint() message handler and
    > display it. How is it possible to minimize my that imageprocessing
    time(not
    > by changing algorithm right now)? Just any idea? any?
    >
    > Thanks,
    >
    > Arsalan
    >
    >
    > "Arkady Frenkel" <arkadyf@hotmailxdotx.com> wrote in message
    > news:ce51kn$flt$1@home.itg.ti.com...
    > > intel's h/w + windows os.
    > > info about intel's h/w you can find on
    > > http://developer.intel.com/design/pentium4/manuals/253665.htm.
    > > about windows I think you don't need references :)
    > > Arkady
    > >
    > > "Arsalan Ahmad" <arsal__@hotmail.com> wrote in message
    > > news:ewHaD15cEHA.1152@TK2MSFTNGP09.phx.gbl...
    > > > From where can I get information about wintel platform?? What is it
    > > > sxactly?
    > > >
    > > > Thanks,
    > > >
    > > > Arsalan
    > > >
    > > > "roman ziak" <news1@MYLASTNAME.com> wrote in message
    > > > news:Ocp57E1aEHA.3204@TK2MSFTNGP09.phx.gbl...
    > > > > Arsalan Ahmad wrote:
    > > > > > Hi all,
    > > > > >
    > > > > > Please tell me is there any possibility to disable all background
    > > > services
    > > > > > and everything in win32 (Windows 98, win2000 and win XP) and run
    > only
    > > a
    > > > > > single application in Real-Time mode so that only this application
    > > > utilizes
    > > > > > CPU cycles. This application utilizes serial communication, usb
    > camera
    > > > and
    > > > > > draw output of the camera on monitor. Any idea for any of the OS
    > i.e.
    > > > 98, 2K
    > > > > > or XP(specially win2k or XP)???
    > > > >
    > > > > Just curious, why would you need to utilize all the cycles for
    > something
    > > > > like USB camera, serial comm and display ?
    > > > >
    > > > > I can see the need for exclusive CPU utilisation only if you would
    be
    > > > > polling some fast events, bitbanging PWM etc. Serial and USB comms
    on
    > > > > Wintel platform are hw+sw buffered and handled by OS quite well.
    > > >
    > > >
    > >
    > >
    >
    >
  13. Archived from groups: microsoft.public.win2000.hardware,microsoft.public.win32.programmer.kernel,microsoft.public.windowsxp.hardware (More info?)

    Arsalan Ahmad wrote:
    > Ok but then how is it related to my question. I have an application which
    > perform some matrix operations that take a lot of CPU time. I want to
    > minimize (not by changing algorithm right now) this CPU time. I know that in
    > win32(win9x, win2k & xp) Operating system takes a lot of time. I want my

    Arsalan, this is wrong. OS does take very little time unless you ask it
    to do something for you or you are running a background virus scanner as
    a service.

    > application to run in real-time mode. It is MFC simple view based
    > application which takes input(image) from a USB-based WebCam and perform
    > some image processing on that image(I like to mention that i do all the
    > image processing in WM_PAINT event i.e. OnPaint() message handler and
    > display it. How is it possible to minimize my that imageprocessing time(not
    > by changing algorithm right now)? Just any idea? any?

    If you do not want to change algorithm, consider changing the compiler,
    unless you are already using a good optimizing one. We have an image
    processing commercial product, which we used to compile with Visual C++
    ..NET 2002 Standard. After we switched to Professional and enabled
    optimisations, we achieved 10-20% more FPS.

    Roman
Ask a new question

Read More

Win32 Microsoft Windows XP Product