Re: OS in-memory structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Well, I think it applies to all architectures, but I'm not sure, so take with care. Also, I think this is something everybody knows, sorry.
The OS is mapped in every process address space, but its pages are protected (check out this http://www.logix.cz/michal/doc/i386/chp05-02.htm#F-05-10). A process cannot jump to a kernel address, because the process executes in user mode and kernel addresses are therefore protected from being executed by a user process. Then, a system call occurs and the kernel starts executing through an interrupt (the famous 0x80 vector number). The active address space is the caller one, but now, since the kernel executes in privileged, any address of any page can be reached. The kernel can throw to the bus addresses from user space, cause it is actually using the process address space.

I was confused mostly because I thought the kernel as a process, and I didn't remember how a page table entry looks like. Besides, I have learnt something: during an interrupt from an external device for example, the kernel cannot use addresses from any user process memory map, because the current address space may not be the correct one.

Thank you, and sorry for my English

On Oct 7, 2010, at 6:38 PM, hiren panchasara wrote:



On Thu, Oct 7, 2010 at 9:28 AM, Juan Rafael Garcia Blanco <jgblanco.mail@xxxxxxxxx> wrote:
Hi, it has just been solved, thank you
Would you care to share?

Thanks.

On Oct 7, 2010, at 5:55 PM, Juan Rafael Garcia Blanco wrote:

> Hi.
> During the boot process, Linux is loaded in main memory. When a system call is done, the OS executes again. If the system call is accompanied by some parameter, which is an address of the user process memory map, how can the kernel access that variable which is in user process memory map? I mean, when the kernel fires up an address, how is it translated? I can't find an answer to my question in books nor in the internet.
>
> Thank you very much


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux