Announcement

Collapse
No announcement yet.

CSRSS and resources occupied

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CSRSS and resources occupied

    I have observed a strange thing: when I execute a program compiled with PBCC, in Task Manager is present then CSRSS.EXE program that occupies the 40%/50% of the resources, while the other half of the resources is occupied from the eseguibile program. All this slows down the computer. How to resolve the thing?

    If it's important, in my program are present:
    -WIN32API.INC
    -CONTOOLS ROUTINES (CT_PRO.INC)
    -FPCC ROUTINES
    mailto:[email protected]
    From Italy.

  • #2
    Use SLEEP statements in tight loops, so as to give back time slices to Windows.
    Sincerely,

    Steve Rossell
    PowerBASIC Staff

    Comment


    • #3
      Originally posted by Steve Rossell View Post
      Use SLEEP statements in tight loops, so as to give back time slices to Windows.
      don't run. Give me an example?

      But this solution slow down the program?

      Giuseppe
      mailto:[email protected]
      From Italy.

      Comment


      • #4
        >But this solution slow down the program

        Not that you will notice, but of course it does, because it gets fewer 'turns' using the CPU.

        But it's your choice: you can use a high percentage of your CPU time and the prorgam will run fast, or you can fairly share the CPU with other processes, and the program will run not quite so fast.

        But as I said... while you might be able to measure the increased execution time, I seriously doubt you would notice it.

        FWIW, I'll bet forum members could find enough time savings in your program in either/both design or technique to more than offset any "loss" incurred by inserting a few SLEEPs if we could see how your code is doing what.

        MCM
        PS:
        >don't run
        Programmer error. Show failing code.
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]ms.com
        http://www.talsystems.com

        Comment

        Working...
        X