×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    338

    What happens when a program starts?

    hi everyone,
    I came to know that when we run a program in Symbian a process starts by default for it. The when i create an Active Object class we add it to the Active scheduler using,
    Code:
    CActiveScheduler::Add(this);
    That means an ActiveScheduler is also created by default.
    If the system creates an ActiveScheduler that means there is a thread too, which is also created just before creating ActiveScheduler.
    If my view is right then i can say that, We, by default get a process, a thread and an ActiveScheduler hiddenly in the project when we are running it.

    Am i right ?
    Last edited by Md. Kayesh; 2011-12-12 at 06:33.

  2. #2
    Registered User
    Join Date
    Dec 2009
    Posts
    339

    Re: What happens when a program starts?

    if your application uses UI control framework(Graphical User Interface) then by default you get an ActiveScheduler. But if you are writing non gui application(as an example some type of server application that do not have user interface) you have to provide your own ActiveScheduler or if you are creating a separate thread for some task then you need to provide an ActiveScheduler for this thread too.

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    338

    Re: What happens when a program starts?

    Quote Originally Posted by slinx View Post
    if your application uses UI control framework(Graphical User Interface) then by default you get an ActiveScheduler. But if you are writing non gui application(as an example some type of server application that do not have user interface) you have to provide your own ActiveScheduler or if you are creating a separate thread for some task then you need to provide an ActiveScheduler for this thread too.
    Thanks. The information was helpful. But what about the thread creation? Is a thread created by system at the beginning of each gui or non-gui application?

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,569

    Re: What happens when a program starts?

    Each application runs in its own process and must have at least one thread of execution.

    You might wish to read the Symbian Internals book: http://www.developer.nokia.com/Commu...n_OS_Internals

  5. #5
    Registered User
    Join Date
    Dec 2009
    Posts
    339

    Re: What happens when a program starts?

    Quote Originally Posted by Md. Kayesh View Post
    Thanks. The information was helpful. But what about the thread creation? Is a thread created by system at the beginning of each gui or non-gui application?
    When a process is created, a single thread is initialized for it(both for gui and non gui, we have to call entry function E32Main). Beside this, we need a CleanupStack and ActiveScheduler for application , in gui application they are provided by the framework classes but in non gui application we have to create them explicitly. For more information look at documentation that comes with SDK.

Similar Threads

  1. Monitoring program starts
    By tanglaoya in forum Symbian
    Replies: 2
    Last Post: 2010-08-25, 09:34
  2. sdk.exe does'nt starts
    By bduthoit in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2009-11-23, 14:27
  3. Replies: 12
    Last Post: 2008-10-07, 07:02
  4. Searching: Program which starts Bluetooth
    By danyball in forum Symbian
    Replies: 1
    Last Post: 2007-11-18, 12:04
  5. Replies: 1
    Last Post: 2002-06-11, 13:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×