I've been thinking quite a bit about operating systems this past week, and how one might go about creating one.
Not that I'm likely to attempt this, but I would like a better understanding of how it can be done.
I began thinking about filesystems, designing my own, then reading in more detail about FAT32 and others, and making comparisons, and seeing what details I've overlooked.
Then I began thinking about threading, and how a processor might manage several applications held in memory, and allow them to run simultaneously.
Then I began thinking about graphical user interfaces, and this is something I'm struggling to figure out.
I've made a rudimentary gui before now, that resembles Windows, but it didn't do more than display widgets on forms, while the forms themselves could be dragged about the screen, and have their Z-Order changed when they gained focus.

What I was stuck with was this: Suppose we have a window. We can draw things on it's surface (eg, using GDI), so the window must have a bitmap associated with it to paint onto that surface.
But wouldn't that have to be a screen sized bitmap, as there's no reason why the window couldn't be resized fullscreen? So would that window's existence consume a megabyte or two of memory therefore, to hold such a large bitmap?
Win95 happily worked with 8MB of memory, but I never felt as though that memory was saturated from having a few windows open.
Not that I'm likely to attempt this, but I would like a better understanding of how it can be done.
I began thinking about filesystems, designing my own, then reading in more detail about FAT32 and others, and making comparisons, and seeing what details I've overlooked.
Then I began thinking about threading, and how a processor might manage several applications held in memory, and allow them to run simultaneously.
Then I began thinking about graphical user interfaces, and this is something I'm struggling to figure out.
I've made a rudimentary gui before now, that resembles Windows, but it didn't do more than display widgets on forms, while the forms themselves could be dragged about the screen, and have their Z-Order changed when they gained focus.

What I was stuck with was this: Suppose we have a window. We can draw things on it's surface (eg, using GDI), so the window must have a bitmap associated with it to paint onto that surface.
But wouldn't that have to be a screen sized bitmap, as there's no reason why the window couldn't be resized fullscreen? So would that window's existence consume a megabyte or two of memory therefore, to hold such a large bitmap?
Win95 happily worked with 8MB of memory, but I never felt as though that memory was saturated from having a few windows open.
