Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Number of process in Session 0

Number of process in Session 0

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminwindows-admin
11 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Cvaji
    wrote on last edited by
    #1

    Hai All, I am creating 200 process simultaneously from another process which is running as service in Windows server 2008 R2 machine. But only 95-100 process are getting created. After that, the remaining process will be terminated abnormally. Please let me know if there is any limitation in Windows server regarding the number of processes. -Cvaji

    _ L 2 Replies Last reply
    0
    • C Cvaji

      Hai All, I am creating 200 process simultaneously from another process which is running as service in Windows server 2008 R2 machine. But only 95-100 process are getting created. After that, the remaining process will be terminated abnormally. Please let me know if there is any limitation in Windows server regarding the number of processes. -Cvaji

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      How did you validate that the processes are terminated abnormally? Are all processes the same? If they are the same, you really shouldn't be doing this.

      «_Superman_»
      I love work. It gives me something to do between weekends.

      Microsoft MVP (Visual C++)

      Polymorphism in C

      C T 2 Replies Last reply
      0
      • _ _Superman_

        How did you validate that the processes are terminated abnormally? Are all processes the same? If they are the same, you really shouldn't be doing this.

        «_Superman_»
        I love work. It gives me something to do between weekends.

        Microsoft MVP (Visual C++)

        Polymorphism in C

        C Offline
        C Offline
        Cvaji
        wrote on last edited by
        #3

        All process are same. Why do you say, no to do it????

        _ 1 Reply Last reply
        0
        • C Cvaji

          All process are same. Why do you say, no to do it????

          _ Offline
          _ Offline
          _Superman_
          wrote on last edited by
          #4

          Antiviruses will target this as a malicious application.

          «_Superman_»
          I love work. It gives me something to do between weekends.

          Microsoft MVP (Visual C++)

          Polymorphism in C

          T 1 Reply Last reply
          0
          • _ _Superman_

            How did you validate that the processes are terminated abnormally? Are all processes the same? If they are the same, you really shouldn't be doing this.

            «_Superman_»
            I love work. It gives me something to do between weekends.

            Microsoft MVP (Visual C++)

            Polymorphism in C

            T Offline
            T Offline
            ThatsAlok
            wrote on last edited by
            #5

            «_Superman_» wrote:

            Are all processes the same? If they are the same, you really shouldn't be doing this

            I am slightly disagree with this, i am not sure about capibility of Windows 2008 Server r2 and never spawn 100 same process from service. However, I working/designing an architecture, that will scale Up/Down according workload demand, basically instead on creating thread for each process, I have a controller service, which will spawn the process, to work independently and process the wrok accordingly. Basically idea behind the design is intead of stessing on multithreaded architecture, use multiprocess architecture!, if one application crash due some reason, you have atleast same type of application doing similiar work.

            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
            Never mind - my own stupidity is the source of every "problem" - Mixture

            cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

            _ 1 Reply Last reply
            0
            • _ _Superman_

              Antiviruses will target this as a malicious application.

              «_Superman_»
              I love work. It gives me something to do between weekends.

              Microsoft MVP (Visual C++)

              Polymorphism in C

              T Offline
              T Offline
              ThatsAlok
              wrote on last edited by
              #6

              «_Superman_» wrote:

              Antiviruses will target this as a malicious application.

              Totally depend upon, what system resource it using!, if it just interacting with some DB, antivirus will do nothing!

              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
              Never mind - my own stupidity is the source of every "problem" - Mixture

              cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

              C 1 Reply Last reply
              0
              • T ThatsAlok

                «_Superman_» wrote:

                Are all processes the same? If they are the same, you really shouldn't be doing this

                I am slightly disagree with this, i am not sure about capibility of Windows 2008 Server r2 and never spawn 100 same process from service. However, I working/designing an architecture, that will scale Up/Down according workload demand, basically instead on creating thread for each process, I have a controller service, which will spawn the process, to work independently and process the wrok accordingly. Basically idea behind the design is intead of stessing on multithreaded architecture, use multiprocess architecture!, if one application crash due some reason, you have atleast same type of application doing similiar work.

                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                Never mind - my own stupidity is the source of every "problem" - Mixture

                cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

                _ Offline
                _ Offline
                _Superman_
                wrote on last edited by
                #7

                I agree with you, but I would be suspicious if 200 processes are created. It is going to take up too much resources.

                «_Superman_»
                I love work. It gives me something to do between weekends.

                Microsoft MVP (Visual C++)

                Polymorphism in C

                T 1 Reply Last reply
                0
                • T ThatsAlok

                  «_Superman_» wrote:

                  Antiviruses will target this as a malicious application.

                  Totally depend upon, what system resource it using!, if it just interacting with some DB, antivirus will do nothing!

                  "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                  Never mind - my own stupidity is the source of every "problem" - Mixture

                  cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

                  C Offline
                  C Offline
                  Cvaji
                  wrote on last edited by
                  #8

                  Its not interacting with any DB. "95 processes are started and 96th is not getting started." Is that related to antivirus? That means antivirus will allow 95 processes and will restrict up to 95?

                  _ 1 Reply Last reply
                  0
                  • C Cvaji

                    Its not interacting with any DB. "95 processes are started and 96th is not getting started." Is that related to antivirus? That means antivirus will allow 95 processes and will restrict up to 95?

                    _ Offline
                    _ Offline
                    _Superman_
                    wrote on last edited by
                    #9

                    No its not related to any antivirus. Each process will take up a lot of resources. You're probably running out of it. Take a look at this blog entry - Pushing the Limits of Windows: Processes and Threads[^] What I meant about the antivirus is that such behavior is seen mostly in malicious applications and so antiviruses could target such applications. And so I would never recommend or approve such a design.

                    «_Superman_»
                    I love work. It gives me something to do between weekends.

                    Microsoft MVP (Visual C++)

                    Polymorphism in C

                    1 Reply Last reply
                    0
                    • _ _Superman_

                      I agree with you, but I would be suspicious if 200 processes are created. It is going to take up too much resources.

                      «_Superman_»
                      I love work. It gives me something to do between weekends.

                      Microsoft MVP (Visual C++)

                      Polymorphism in C

                      T Offline
                      T Offline
                      ThatsAlok
                      wrote on last edited by
                      #10

                      «_Superman_» wrote:

                      I agree with you, but I would be suspicious if 200 processes are created. It is going to take up too much resources.

                      yeap i agree, too many process will take too many resources.Also, it's depend how you write your process. Simpler design approch would be, the application should be console based (so we get rid of hugh GDI resources from our progams). Should have clean architecture and should utilize deadlock prevention techniques!.

                      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                      Never mind - my own stupidity is the source of every "problem" - Mixture

                      cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

                      1 Reply Last reply
                      0
                      • C Cvaji

                        Hai All, I am creating 200 process simultaneously from another process which is running as service in Windows server 2008 R2 machine. But only 95-100 process are getting created. After that, the remaining process will be terminated abnormally. Please let me know if there is any limitation in Windows server regarding the number of processes. -Cvaji

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #11

                        Cvaji wrote:

                        I am creating 200 process simultaneously

                        Hi, Some humble comments: 1.) I would recommend redesigning your application so that it does not require 200 processes to be created. I cannot think of many reasons why this would be necessary. I can think of hundreds of reasons why this would be undesirable. 2.) The number of processes is mostly limited by the amount of RAM available to the OS. Adding more RAM will probably allow more threads/processes. 3.) You should investigate some of the linker options such as "/STACK" and "/HEAP" to minimize application resource usage. Try to minimize the amount of GDI objects and file descriptors used by your application. 4.) If your process is multi-threaded utilize the STACK_SIZE_PARAM_IS_A_RESERVATION creation flag when you create a thread. Thats all I can think of for now. Best Wishes, -David Delaune

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups