I'm writing a paper on kernel design for my English class and as part of the assignment I am required to interview someone on the topic. Obviously, there aren't really that many people who are knowledgeable on the subject. If anyone here (with at least a 4 year degree in CS or a job in CS) would be willing to answer a question for me, I would really appreciate it.
My question: Could you explain shared memory and how it is used in the context of a microkernel to facilitate communication between drivers and user applications/APIs and the performance implications of the use of shared memory?
It's really the only thing I could think to ask... The point of the interview is to be exposed to advanced concepts in my subject, but I can't really think of any that are advanced relative to the rest; pretty much all of kernel design is "advanced." If you would like to talk about something else that you think would be important in a paper comparing the different kernel designs, I'd be glad to hear it.
Since it does have to be cited, I will need your name to be able to use this in my paper. If you don't want to post it here, just PM me.
I need to interview someone on OS kernel design.
Re: I need to interview someone on OS kernel design.
Hi,
I guess you are doing an english language course. I did a similar report when i was a young'un on the differences between language style used in online mediums (IRC, forums) compared with day to day use. This was back when it was all new though, wouldnt be interesting now
Good luck!
I guess you are doing an english language course. I did a similar report when i was a young'un on the differences between language style used in online mediums (IRC, forums) compared with day to day use. This was back when it was all new though, wouldnt be interesting now
Good luck!
Re: I need to interview someone on OS kernel design.
I have a 5 year masters, in case you need qualification from a response Also for citation, my name is James Molloy.My question: Could you explain shared memory and how it is used in the context of a microkernel to facilitate communication between drivers and user applications/APIs and the performance implications of the use of shared memory?
The canonical method of communication is the function call. A function takes data as arguments, and may return data or may modify data passed in.
Microkernels impose a lot of barriers between drivers, processes and the kernel itself. Each driver is usually in its own address space or at least does not have direct access to any other address space. How this is implemented (SAS with protection, or multiple virtual memory spaces) is completely implementation defined and moot for this discussion.
As the constituent components in the system are isolated, a standard function call cannot work. Firstly, one cannot perform the "jump" of execution from one space to another, and secondly if you could you couldn't pass much data. I say "much" because constants could still be passed around (and the execution problem can be solved by using some sort of entry point system), but anything larger than a small (64-bit) constant would be difficult.
Larger pieces of data have memory reserved for them, and are usually passed to functions "by reference" rather than "by value". That is, because of their size, it is inefficient to replicate them constantly, so instead a smaller value (32 or 64-bits usually) called a "pointer" or "reference" is passed around.
However, if you pass a pointer from one isolation space to another, the pointer would refer to memory still in the first isolation space, and would not be able to be accessed. This is why shared memory is important.
A certain area of memory is set up as "shared" between isolation spaces. When performing a call to another isolation space, any "by reference" arguments are set up to point to somewhere in that shared space so both can access them.
In terms of performance, if multiple threads of execution modify the same area of memory simultaneously on different processors, cache coherency is required to ensure the state of the hardware caches is the same in each processor. If an area of memory is in multiple caches, modification in one will cause a message to be sent to the others informing them of the change.
Therefore, the more you modify the same area of memory the more performance penalty you may encounter.
Re: I need to interview someone on OS kernel design.
That's great! I wasn't actually expecting to learn anything, but I hadn't even considered the implications of shared memory in an SMP environment.