Page 1 of 2
OS design plan
Posted: Wed Dec 14, 2011 1:56 pm
by arming
When a programmer designs a program, I suppose that this programmer write the algorithm (for example, in pseudocode), but when the desing is for an Operative system... what?
Are they some examples?
Re: OS design plan
Posted: Wed Dec 14, 2011 2:45 pm
by turdus
arming wrote:When a programmer designs a program, I suppose that this programmer write the algorithm (for example, in pseudocode), but when the desing is for an Operative system... what?
Are they some examples?
paper, pencil. Believe me, the best.
Re: OS design plan
Posted: Wed Dec 14, 2011 2:49 pm
by Brendan
Hi,
arming wrote:When a programmer designs a program, I suppose that this programmer write the algorithm (for example, in pseudocode), but when the desing is for an Operative system... what?
Programmers don't design programs, they implement them. When someone (e.g. a
software engineer) designs a program, they don't write algorithms - they create
diagrams that describe what pieces of a system do and how they interact.
You should do something similar. An OS is a massive thing - break it into pieces (kernel, GUI, shell, text editor, etc), then break each of those pieces into smaller pieces (physical memory manager, virtual memory manager, scheduler, etc), then break each of those pieces into even smaller pieces (free page pools, MTRR handling, memory mapped IO control, etc). For each of those tiny tiny pieces, work out how they interact and design the interface/API.
Once you've done that, you'll have a list of functions you need to implement.
Cheers,
Brendan
Re: OS design plan
Posted: Wed Dec 14, 2011 3:01 pm
by arming
Brendan wrote:Hi,
arming wrote:When a programmer designs a program, I suppose that this programmer write the algorithm (for example, in pseudocode), but when the desing is for an Operative system... what?
Programmers don't design programs, they implement them. When someone (e.g. a
software engineer) designs a program, they don't write algorithms - they create
diagrams that describe what pieces of a system do and how they interact.
You should do something similar. An OS is a massive thing - break it into pieces (kernel, GUI, shell, text editor, etc), then break each of those pieces into smaller pieces (physical memory manager, virtual memory manager, scheduler, etc), then break each of those pieces into even smaller pieces (free page pools, MTRR handling, memory mapped IO control, etc). For each of those tiny tiny pieces, work out how they interact and design the interface/API.
Once you've done that, you'll have a list of functions you need to implement.
Cheers,
Brendan
Fantastic explanation! Now I understand.
Thanks for all.
Re: OS design plan
Posted: Wed Dec 14, 2011 3:07 pm
by DavidCooper
arming wrote:When a programmer designs a program, I suppose that this programmer writes the algorithm (for example, in pseudocode), but when the design is for an Operative system... what?
Are there some examples?
[To help you with your English I've made a couple of corrections - hope you don't mind.]
Isn't most of the fun the whole business of coming up with your own design? Ask yourself what you're doing it for: do you want to write your own OS or do you want to write someone else's? Put together your own ideas first, and then take a look at what other people are doing, or put your plan forward for others to comment on.
Write a list of all the things you think will be needed in your OS, then think about the order to build them in and rearrange your list accordingly. There are many parts of your OS which you shouldn't rush into without working out how you really ought to do them - a lot of people paint themselves into corners and then have masses of work to do redoing everything a better way, so if you're in any doubt about something, discuss your plan here to see if that part of your design is likely to cause you problems later on.
You mention pseudocode, and the answer's yes: design your OS in normal language (e.g. "Boot machine", "Get into 32-bit or 64-bit protected mode", "Design/find a mechanism to do multitasking"). Just set out your plans in that manner and expand things into more detailed plans as you build each component of your OS.
What are you wanting to do with your OS that will be better than anything else that's already out there? If nothing, then you're already set on writing someone else's OS.
Re: OS design plan
Posted: Wed Dec 14, 2011 3:26 pm
by DavidCooper
berkus wrote:You missed the word Operative, David. While it is possible to use this word (e.g. similar to Executive), the general consensus is to call them Operating Systems.
Didn't even saw that. Hope I answered the wright question and that it wasn't actually about sumthing far mower technical witch I've never heard of.
Re: OS design plan
Posted: Wed Dec 14, 2011 3:26 pm
by arming
thanks for the english corrections

(I hope I'll pass the First Certificate Exam

)
I'll try XMIND to draw diagrams.
Re: OS design plan
Posted: Wed Dec 14, 2011 3:28 pm
by DavidCooper
arming wrote:thanks for the english corrections

(I hope I'll pass the First Certificate Exam

)
I've accidentally set an exam for you in my previous post - correct it if you can.
Re: OS design plan
Posted: Wed Dec 14, 2011 3:38 pm
by arming
DavidCooper wrote:arming wrote:thanks for the english corrections

(I hope I'll pass the First Certificate Exam

)
I've accidentally set an exam for you in my previous post - correct it if you can.
No, I can't

.
Well, I'm going to try it.
Re: OS design plan
Posted: Wed Dec 14, 2011 3:50 pm
by Solar
arming wrote:I'll try XMIND to draw diagrams.
Unless you actually intend to use
those very early-design diagrams in documentation later, don't bother. Chances are your design will change, especially since you give the expression of not having done much design work before.
Thus, a piece of paper and a pencil will do just fine.
Imagine you're telling someone how a certain piece of your OS works, and how it interacts with other parts. You'll want to scetch down some boxes and lines and stuff. Do just that.
At some later point, you will probably want to learn about some "standard" ways to draw this stuff (like e.g. UML), but for the beginning, pen & paper are quite enough to put things into context. I
never used graph software during the (early)
design phase, only at later points (for persistent documentation, CASE modelling, or communication).
Re: OS design plan
Posted: Wed Dec 14, 2011 4:29 pm
by arming
If I want to post my diagram (first I'm going to do the diagram with pencil and paper and then I'm going to pass it to XMIND), in which board have I to post it? And in which format?
Re: OS design plan
Posted: Wed Dec 14, 2011 7:27 pm
by VolTeK
turdus wrote:paper, pencil. Believe me, the best
Smart man there.
Or notepad. Believe me, it saves most of the "store in your head" portions of the work and while your probably not use to it, start getting use to it.
Re: OS design plan
Posted: Wed Dec 14, 2011 11:34 pm
by Solar
arming wrote:If I want to post my diagram (first I'm going to do the diagram with pencil and paper and then I'm going to pass it to XMIND), in which board have I to post it? And in which format?
OS Design & Theory is fine. Post it as graphics, i.e., JPG, GIF, PNG, PDF.
Re: OS design plan
Posted: Thu Dec 15, 2011 4:49 am
by turdus
GhostXoPCorp wrote:
Or notepad.
If you mean notepad.exe by that, I disagree. You cannot draw diagrams and arrows with it.
Re: OS design plan
Posted: Thu Dec 15, 2011 6:36 am
by CrypticalCode0
ANSII art FTW!
