pairofstrings said:
What is flat memory in RAM and Kernel memory?
Flat memory is a memory model. It's basically a huge array of memory.
In the old days of DOS the memory model was segmented. In the flat model, you just use a word as a pointer. So basically your address would something like 0x3625371A (just an example), or just a machine word.
In the segmented model your memory was referenced using the segment:address model. In the DOS days if you wanted to get access to the screen buffer you would have to write to the address A000:0000. So to do stuff you put A000 in the segment register and 0000 in the index register, instead of just using one word to point to something.
Also back in the DOS days, everything was free gain for the programs. You could basically read and write anything in memory.
As windows became popular, the protected memory model became standard. Protected memory just means that memory is protected by other programs. We take it for granted now that programs can't access other programs memory, but back in time, this wasn't the case.
Kernel memory just refers to the memory specifically used by the kernel (think Operating System). Back in the DOS days, people could write their own device drivers for their programs and access anything. Typically what the DOS games had to do is write keyboard, sound, and graphics interrupt routines (think device driver) so that it would be smooth and responsive.
When windows 95 and above came along, the kernel memory was protected from other programs so that you couldn't do stuff like this. What happens is that the kernel provides an interface to get information on hardware and you can't just read or write to ports at will.
So yeah basically when you hear kernel think operating system specific stuff at a low level in terms of device drivers and device memory and so forth.