Solved

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

Posted on 2013-11-08
1
285 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 76

Accepted Solution

by:
arnold earned 500 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
The case of the missing phone talks about the way a small electronic gadget (the mobile phone) has penetrated into our lives and has made us addicted to it.
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now