Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Is there just one PID for an application and the services it loads

Posted on 2013-11-08
1
Medium Priority
?
293 Views
Last Modified: 2013-11-16
Hi,

I have an android application that loads three services.  The application itself runs in the background with the three services.  I am wanting to do some CPU usage measures for the application and the three services.  I had placed the code that gathers the metrics that I am using in one of the services.  It occurred to me that the PID that I am getting me only be for the service.  I was hoping someone might know exactly how this works.  Does the application and the three services each have there own PID or is there one PID shared between the application and the services?  If I have not given enough information to answer this question, let me know and I will do what I can to supply more info.

Thanks
0
Comment
Question by:DLAtkinson
1 Comment
 
LVL 80

Accepted Solution

by:
arnold earned 2000 total points
ID: 39635212
Not a specific answer to android, usually.
Each application at the time of running has a unique ProcessID. When it exits and after enough time has passed, the PID numbers are reused..
The PID is assigned by the system.
As to your question, a process starts and gets a process ID of 1234 it then starts three additional services/processes 2345, 2346, and 2347
The parent process ID (PPID) of each of these three will be 1234.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days software publishers make it possible to move all the possible applications on smartphones, tablets, smartwatches, and more. Although behind every logic and decision is a gross doubt: how do they make it possible? In this blog post, we sha…
Creating a Cordova application which allow user to save to/load from his Dropbox account the application database.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question