Results 1 to 6 of 6
I have a few questions about Linux processes.
1. I'm confused because Linux obviously has the ability to run several processes/programs concurrently from the bash shell each being a separate ...
- 09-25-2009 #1Just Joined!
- Join Date
- Sep 2009
- Posts
- 8
Understanding Linux Processes question 1
I have a few questions about Linux processes.
1. I'm confused because Linux obviously has the ability to run several processes/programs concurrently from the bash shell each being a separate executable having it's own main function. Linux also has processes created from within a single executable, say a C program, with their own memory space, but these processes are arranged in a Parent/Child relationship. And then you have the multi-user capability of Linux which also refers to each user as a separate process with their own memory space. Are all of these processes equivalent? They don't seem to me to be the same thing.
- 09-25-2009 #2
The terms parent and child are used in manuals, but the processes are actually quite independent. Each has its own PID and virtual memory. Typically the child process will run exec() or one of its derivatives to switch to a different program, and parent and child will then run independently. In fact that's how the shell launches processes. It is the parent, the processes you launch with commands are its children.
Users are not processes. One user can run many processes, and processes can be run by different users. You're right; they aren't the same thing at all.And then you have the multi-user capability of Linux which also refers to each user as a separate process with their own memory space. Are all of these processes equivalent? They don't seem to me to be the same thing."I'm just a little old lady; don't try to dazzle me with jargon!"
- 09-28-2009 #3Just Joined!
- Join Date
- Sep 2009
- Posts
- 8
[QUOTE=hazel;730467]The terms parent and child are used in manuals, but the processes are actually quite independent. Each has its own PID and virtual memory. Typically the child process will run exec() or one of its derivatives to switch to a different program, and parent and child will then run independently. In fact that's how the shell launches processes. It is the parent, the processes you launch with commands are its children.
I need to study up on the exec() call. I've seen it mentioned in the sections on the fork() call several times in the books I've read, but so far they haven't explained the use of the exec() call.
- 09-28-2009 #4Just Joined!
- Join Date
- Sep 2009
- Posts
- 8
- 09-29-2009 #5Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,943
No. All processes with the same priority and nice settings are scheduled equally without regard to who is running them. You can change the priority of a process with the renice system command, and you can change their niceness setting with the nice system command. There is also a real-time scheduler that can be used for time-critical processes. Some kernel processes use that as can properly written user processes but there are a lot of special issues to deal with (suitable for expert system programmers).
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-29-2009 #6


Reply With Quote

