Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have studied a few books about operating system internals but have not found any clear explanation about a few things that have been on my mind for a while. I have a few questions and I would really appreciate it if someone could provide me with plain and comprehensive explanation/answers.
Many thanks in advance.

========================================
section 1- Things that happen at initial system bootstrap procedure:
When the kernel starts up I assume there must be processes like swapper(memory manager) with pid == 0 and the init process with pid ==1.

1- where do the swapper reside as we do not have a virtual memory yet??

2- How do these processes get created at first? We know that init process is the one that is responsible to create (directly or indirectly ) all user processes.

====================================
section 2- The kernel area in the virtual memory layout of a process

We already know that a region of the virtual addresses for a process belongs to Kernel or it is simply called kernel space. The kernel code is supposed to run in this area and that is understood. This leaves me with a few questions:

3 -As we know when the code is complied and linked it will perform operation(s) that result in system call(s) and it is where the kernel comes into the picture. lets say when you do try to open a file it eventually becomes a system call that is handled by the kernel. So where does this kernel code come from? does the linker put it in the kernel space of the virtual address space of the process?

4- lets say that fopen(...) gets called in the user space, what are the exact steps taken to go from this call to a system call?

=====================================
section 3 - Page tables

5- Where is the page table for each process? Is it in the data segment of the kernel area of the process' virtual memory space?
Posted
Updated 17-Oct-13 11:44am
v3

1 solution

You should get hold of a book on OS internals for the answers to these questions. Some of these[^] will probably help.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900