process resident in memory
I am a newbie in kernel programming.
And am sorry if something related previously asked.
I wonder if it is possible to following situation is possible or not.
let say i have a user process p1.
p1 does some malloc, and file i/o etc
i initiate it during boot time.
it stays resident in memory as if kernel it self (??) and its priority is very very high
Signature · 5 lines
- mersan
[email protected]
[email protected]
LIFE WORTH LIVING WITHOUT YOU?A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 17 lines · Alex Riesen
Mehmet Ersan TOPALOGLU, Tue, Mar 18, 2003 07:28:57 +0100:
Quoted 5 lines
I am a newbie in kernel programming.
And am sorry if something related previously asked.
I wonder if it is possible to following situation is possible or not.let say i have a user process p1.
That (user process) has nothing to do with kernel programming.
Quoted 3 lines
p1 does some malloc, and file i/o etc
i initiate it during boot time.
it stays resident in memory as if kernel it self (??)
Quoted 8 lines
no. It is as long resident as it wish. Or until it is killed.
Quoted 1 line
and its priority is very very high
it is irrelevant.
Well i guess i couldn't explain what i really meant.
Thing is that i am trying to change kernel memory management specifically for one user process only. i.e if kernel sees this process it will treat it in a different manner.
It won't let it to be swapped and give a very high priority to it.
I just wondered the possiblity of this.
Sorry for my poor english
Signature · 5 lines
- mersan
[email protected]
[email protected]
LIFE WORTH LIVING WITHOUT YOU?Quoted 18 lines · Mehmet Ersan TOPALOGLU
Quoted 17 lines · Alex Riesen
Mehmet Ersan TOPALOGLU, Tue, Mar 18, 2003 07:28:57 +0100:
Quoted 5 lines
I am a newbie in kernel programming.
And am sorry if something related previously asked.
I wonder if it is possible to following situation is possible or not.let say i have a user process p1.
That (user process) has nothing to do with kernel programming.
Quoted 3 lines
p1 does some malloc, and file i/o etc
i initiate it during boot time.
it stays resident in memory as if kernel it self (??)
Quoted 8 lines
Quoted 8 lines
no. It is as long resident as it wish. Or until it is killed.
Quoted 1 line
and its priority is very very high
it is irrelevant.
Yes, but he didn't know what was available in user-mode.
Quoted 9 lines
Well i guess i couldn't explain what i really meant.
Thing is that i am trying to change kernel memory management specifically for one user process only.
i.e if kernel sees this process it will treat it in a different manner. It won't let it to be swapped and give a very high priority to it. I just wondered the possiblity of this.
Sorry for my poor english
You want to execute:
man mlockall
man nice
Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips). Why is the government concerned about the lunatic fringe? Think about it.
Quoted 15 lines
Yes, but he didn't know what was available in user-mode.
Quoted 8 lines
Well i guess i couldn't explain what i really meant.
Thing is that i am trying to change kernel memory management specifically for one user process only.
i.e if kernel sees this process it will treat it in a different manner. It won't let it to be swapped and give a very high priority to it. I just wondered the possiblity of this.
Sorry for my poor english
Quoted 4 lines
You want to execute:
man mlockall
man nice
first of all i don't have chance to modify the process' code. the thing mlockall does is exactly what i am trying to do (at least a part of it).
So your answer is he couldn't know about user-mode so it is not possible. What if kernel forks that process or somehow its process id is informed to kernel?
Signature · 5 lines
- mersan
[email protected]
[email protected]
LIFE WORTH LIVING WITHOUT YOU?Quoted 7 lines · Mehmet Ersan TOPALOGLU
first of all i don't have chance to modify the process' code. the thing mlockall does is exactly what i am trying to do (at least a part of it).
So your answer is he couldn't know about user-mode so it is not possible. What if kernel forks that process or somehow its process id is informed to kernel?
nice works given a PID. You can call renice(1) from the command line or you can use the nice(2) or setpriority(2) system calls.
Note you need to be root to lower the nice value (increase the priority) of a process.
Unfortunately mlockall() only works from a process in the address space. And it is not inherited on fork(). Tough luck.
Robert Love