linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* process resident in memory
@ 2003-03-18  6:28 Mehmet Ersan TOPALOGLU
       [not found] ` <20030318134238.GA22953@riesen-pc.gr05.synopsys.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Mehmet Ersan TOPALOGLU @ 2003-03-18  6:28 UTC (permalink / raw)
  To: linux-kernel

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

-- 
- mersan
     mersan@ceng.metu.edu.tr
     mersan@metu.edu.tr

	LIFE WORTH LIVING WITHOUT YOU?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: process resident in memory
       [not found] ` <20030318134238.GA22953@riesen-pc.gr05.synopsys.com>
@ 2003-03-18 13:58   ` Mehmet Ersan TOPALOGLU
  2003-03-18 14:03     ` Richard B. Johnson
  0 siblings, 1 reply; 6+ messages in thread
From: Mehmet Ersan TOPALOGLU @ 2003-03-18 13:58 UTC (permalink / raw)
  To: linux-kernel

Alex Riesen wrote:
> Mehmet Ersan TOPALOGLU, Tue, Mar 18, 2003 07:28:57 +0100:
> 
>>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.
> 
> 
>>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 (??)
> 
> 
> no. It is as long resident as it wish. Or until it is killed.
> 
> 
>>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


-- 
- mersan
     mersan@ceng.metu.edu.tr
     mersan@metu.edu.tr

	LIFE WORTH LIVING WITHOUT YOU?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: process resident in memory
  2003-03-18 13:58   ` Mehmet Ersan TOPALOGLU
@ 2003-03-18 14:03     ` Richard B. Johnson
  2003-03-18 14:21       ` Mehmet Ersan TOPALOGLU
  0 siblings, 1 reply; 6+ messages in thread
From: Richard B. Johnson @ 2003-03-18 14:03 UTC (permalink / raw)
  To: Mehmet Ersan TOPALOGLU; +Cc: linux-kernel

On Tue, 18 Mar 2003, Mehmet Ersan TOPALOGLU wrote:

> Alex Riesen wrote:
> > Mehmet Ersan TOPALOGLU, Tue, Mar 18, 2003 07:28:57 +0100:
> >
> >>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.
> >
> >
> >>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 (??)
> >
> >
> > no. It is as long resident as it wish. Or until it is killed.
> >
> >
> >>and its priority is very very high
> >
> >
> > it is irrelevant.
> >

Yes, but he didn't know what was available in user-mode.


>
> 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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: process resident in memory
  2003-03-18 14:03     ` Richard B. Johnson
@ 2003-03-18 14:21       ` Mehmet Ersan TOPALOGLU
  2003-03-18 18:08         ` Robert Love
  0 siblings, 1 reply; 6+ messages in thread
From: Mehmet Ersan TOPALOGLU @ 2003-03-18 14:21 UTC (permalink / raw)
  To: linux-kernel


> Yes, but he didn't know what was available in user-mode.
> 
> 
> 
>>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

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?





-- 
- mersan
     mersan@ceng.metu.edu.tr
     mersan@metu.edu.tr

	LIFE WORTH LIVING WITHOUT YOU?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: process resident in memory
  2003-03-18 14:21       ` Mehmet Ersan TOPALOGLU
@ 2003-03-18 18:08         ` Robert Love
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Love @ 2003-03-18 18:08 UTC (permalink / raw)
  To: mersan; +Cc: linux-kernel

On Tue, 2003-03-18 at 09:21, Mehmet Ersan TOPALOGLU wrote:

> 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




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: process resident in memory
@ 2003-03-18 15:40 Felipe Alfaro Solana
  0 siblings, 0 replies; 6+ messages in thread
From: Felipe Alfaro Solana @ 2003-03-18 15:40 UTC (permalink / raw)
  To: mersan, linux-kernel

----- Original Message ----- 
From: Mehmet Ersan TOPALOGLU <mersan@ceng.metu.edu.tr> 
Date: 	Tue, 18 Mar 2003 16:21:49 +0200 
To: linux-kernel@vger.kernel.org 
Subject: Re: process resident in memory 
 
> 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? 
 
What about nicing the process to real-time? 
-- 
______________________________________________
http://www.linuxmail.org/
Now with e-mail forwarding for only US$5.95/yr

Powered by Outblaze

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-03-18 17:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-18  6:28 process resident in memory Mehmet Ersan TOPALOGLU
     [not found] ` <20030318134238.GA22953@riesen-pc.gr05.synopsys.com>
2003-03-18 13:58   ` Mehmet Ersan TOPALOGLU
2003-03-18 14:03     ` Richard B. Johnson
2003-03-18 14:21       ` Mehmet Ersan TOPALOGLU
2003-03-18 18:08         ` Robert Love
2003-03-18 15:40 Felipe Alfaro Solana

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).