linux-mips
[Top] [All Lists]

Re: User applications

To: Carsten Langgaard <carstenl@mips.com>, "linux-mips@oss.sgi.com" <linux-mips@oss.sgi.com>
Subject: Re: User applications
From: Michael Shmulevich <michaels@jungo.com>
Date: Mon, 08 Jan 2001 15:30:35 +0200
References: <3A598AFC.83204F56@mips.com>
Sender: owner-linux-mips@oss.sgi.com
Carsten Langgaard wrote:

> I have a few questions about user applications.
>
> When a new user process is started will its user space be cleared by the
> kernel or is there a potential leak from an older user process ?

Usually it is defied by the loader. If the data section contents is set to
LOAD, then the contents of the section will be loaded from disk (no leak),
if not -- whatever values left i nmemory will be there, or exactly, the
virtual page of some other proccess that was swapped out or ended.

> What about the registers values, are they cleared for each new user
> application or will it simply contain the current value it got when the
> user application is started ?

It depends on the context switch algorithm of the processor, I think.

> How can you flush the data and instruction cashes from a user
> application ?
>

As far as I understand, ASID must take care of it. It contains unique IDs
per process virtual space, so that even
though virtual addresses may be found in TLB, their ASID will be different,
causing TLB miss and probably page fault.

>
> /Carsten
>
> --
> _    _ ____  ___   Carsten Langgaard   Mailto:carstenl@mips.com
> |\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
> | \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
>   TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
>                    Denmark             http://www.mips.com

Michael.


<Prev in Thread] Current Thread [Next in Thread>