Process Vs Task Vs Threads

can anyone explain me the exact difference between process task and threads??
thanks in advance!!!


Similar Content



Watching / Capturing An Applications Threads

There is a home grown application that initiates either a telnet or ssh session based on the number of threads set.

I want to watch the process happen from start to finish, that is from the moment the first thread starts until the last thread finishes.

I was thinking netstat, but it wont show the process in its entirety. As connections are established and terminated the status / output of the command would be different..not to mention Id have to keep hitting the command and the enter key.

As usual, I have cracked my Linux in a nutshell book and will be doing web searches to find a solution.

Monitoring The Execution Of POSIX Threads

I work on Red-Hat Enterprice OS.
I run one process which generates many POSIX threads.
How can I monitor/trace their execution.

Best regards,
Yehuda

Kill Zombie Process Via C Program Without Killing Main Process

Hi ,
In my program, for a process A executing operation, there are multiple threads created.
One of the thread A checks whether process is active or not
Second thread B executes a function
One of the periodic thread C calls a callback function that executes an audit after every 30 secs.

In the audit , the function uses g_spawn_commmand_line_sync() function to spawn a child process that executes a command line (shell script).

Since g_spawn_commmand_line_sync() spawns a new child process .
In the error case scenario, the spawned child process got stuck and became zombie process. It did not get killed.Also it acquired sockets which were assigned to a thread B executing operation.

Even though the thread B got terminated ,the child process did not release the sockets that were connected to it.


My question is ,I have to automate this in C program that if it finds spawned process of g_spawn_commmand_line_sync() defunct, the
health check thread B should be able to clean it without klling the main process.

i could not find any spawn function that will help me find the PID of g_spawn_commmand_line_sync() spawned process.

I get the details from ps commands. But how can I find it in a c-program?

Difference Between Child THREAD And Child PROCESS

Hello,

I am troubleshooting something and I got this problem.

If I do "pstree -p"

It shows,

Code:
        ├─soffice.bin(7734)─┬─{soffice.bin}(7735)
        │                   ├─{soffice.bin}(7736)
        │                   ├─{soffice.bin}(7737)
        │                   └─{soffice.bin}(7743)

However, it does NOT show up in "ps -elf"

Code:
ps -elf | grep soffi
0 S whho      7734     1  0  80   0 - 36435 -      11:14 pts/2    00:00:03 /usr/lib/openoffice/program/soffice.bin -splash-pipe=5
0 S whho      7833  7759  0  80   0 -   751 -      11:21 pts/3    00:00:00 grep soffi

I was wondering if 7735, 7736, 7737, 7743 were really processes. Then I checked /proc, I could cd to /proc/7735, /proc/7736, etc, but I could not ls them out.

I looked at the man page of "pstree", it says,

Code:
Child threads  of a process are found under the parent process and are shown with the process name in curly braces, e.g.

           icecast2---13*[{icecast2}]

So, what does all this mean? Does it mean that 7735, 7736, 7737, 7743 are just threads but not processes? If so, why could I cd to /proc/<id> but not see them in "ps -elf".

Would somebody please help me?

Thanks!

whho

Kill -3 Pid > /tmp/process.txt Not Working?

Hi All,
I am trying to get a dump of a process using kill and it doesn't look to be working, can someone explain what I am doing wrong?

Code:
systemctl start snmpd.service

Code:
pgrep snmpd
4233

Code:
kill -3 4233 > /tmp/snmp_pid.txt

OR

Code:
kill -SIGQUIT 4233 > /tmp/snmp_pid.txt

Yes the process quit's which is fine but there is no output from the process in /tmp/snmp_pid.txt.

Can someone please explain?

Thanks

How To Share The Same Code Segment Between Two Processes Using Mmaps?

Hi Experts:

I'm new to Linux,recently i was confused with the words as below:

"To achieve sharing,the process A mmaps the executable file of process B into into the virtual address space of process A. As the Linux loader maps the executable files into the process when executing them,the two processes share the memory image of the mapped file"

questions:
1,What are the "executable files",are they ELF files?
2,How to do "mmaps"?if process A and process B share the same code segment, ,where is process A's own code segment?


Thank you in advance.

OpenWRT Linux Command Question

Hello everyone from stackexchange,

I am a total Linux newbie, and for a short school task I have to perform the following action in Linux OpenWRT running in my virtualbox. I have tried multiple commands and googled a lot but I can't get it working. If someone could help me out on what to do, that would be awesome. I have looked through the manuals too but it doesnt seem to work.

Task: http://i.imgur.com/MeLcGJh.png

My OpenWRT screen: http://imgur.com/98OLB9Y

Many thanks.

Linux Process Call Examles

hi all
i am new to linux system programming.
request u to give idea with examples for linux process creation fork() and exec setsig() setalarm(). how to catch these process id's

Regards
Bala

Can't Connect To MintUpdate

I'm using Linux Mint 16 "petra" and normally I can see in the task bar whether or not there are software updates available or not. For the past week or so, I have not been able to get any connection to the mintUpdate site and the icon in the task bar shows a red X on the shield.

When I right-click on the icon and select "Information" I get the message below.

<<
++ Launching mintUpdate in user mode
++ Testing initial connection
-- No connection found (tried to ping google.com) - sleeping for 30 seconds
++ Starting refresh
++ Auto-refresh timer is going to sleep for 15 minutes, 0 hours and 0 days
-- Error in checkAPT.py, could not refresh the list of packages
>>

Can anybody out there inform me what may be wrong with either my system or with the mintUpdate site? I'm able to connect to the Internet without any problem.

Thanks in advance for your reaction!

Cant Enter To Settings (general) On Centos 7

Hello everyone,

Something happened with my centos partition and now i cant enter to settings via gui.

Can someone explain how to go there using the command line?

What i want to do is to change the screen resolution and i dont know how to do it using the console. I read some old threads about it but im a noob and dont get it.

Thanks in advance