OSDev.org

The Place to Start for Operating System Developers
It is currently Sun Apr 28, 2024 10:01 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 237 posts ]  Go to page 1, 2, 3, 4, 5 ... 16  Next
Author Message
 Post subject: Your OS design
PostPosted: Wed Jan 22, 2003 4:20 pm 
This is a thread I have wanted to see for a long while. It is for people to air the concepts and ideas behind the OS's they are coding or designing. Sorry if this is off-topic or been done before!

I shall start with my OS. Temporarily named as Lucid, I am still trying to think of a good name beginning with K to fit in with my API call names!

One thing I am doing is having all drivers and system functions being in the form of loadadble modules. These will be loaded in at boot time or later and will provide text call names. For example there could be a module called "FontManager" which had a call "RenderText". There will be a mechanism for describing the call syntax and also will be general calls which modules can respond to like "About", "Version" etc. So an application will request a handle and call ID from the Module Manager and use this when calling, although obviously standard kernel calls will already have this done in the API library. I want (almost) all module calls to be callable from a console. I.e. the above example could be called as:

[tt]*Call "FontManager", "RenderText", 100, 100, "Test"[/tt]

On the subject of console's. I don't want a shell like bash or ksh. They don't belong on a desktop OS, maybe on hulking great mainframes but the average joe doesn't need or want them. I like the old idea of using standard interpreted languages for scripting rather than some shell programming language wannabe. Along with this concept; things like changing directory will be done through module calls.

I have coded an object manager which currently stored everything from processes/threads to handles. I also have coded a mechanism for storing object entities. These are simple Key/Value combinations I will use for things like statistics. I.e there will be a Key called "MemoryManager.HeapSize" which will return a number indicating bytes of heap used. I will ultimately have object persistence so they will (if needed) be written out to disk and reloaded at next boot.

I have a message manager which currently works under a simple sender/receiver relationship. It handles queues of incoming messages currently and I will soon add a parameters function to it to pass arbitrary elements of data along with the message. Messages are not used much yet though as I have no console or desktop to speak of. The message system with parameters will be used when I come to code the GUI.

I will a drive mount structure similar to Windows but not using letters, I will use things like fd0: or hd0:, although these will be nameable to things like work:. There will be no specific mounting as such. The unix mount and vfs system is terrible and I won't have anything to do with it!

As far as the desktop goes, I want a simple API and an icon bar similar to Risc OS (because I think its the best yet).

That will do for now. So what are your ideas?

Daryl.


Top
  
 
 Post subject: Re:Your OS design
PostPosted: Wed Jan 22, 2003 4:38 pm 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5964
Location: In a galaxy, far, far away
this sounds fine ... and pretty close from my own Kernel Dynamix System ... That's pretty pleasant to see i'm not the only one to promote modularity as goal #1.

_________________
Image May the source be with you.


Top
 Profile  
 
 Post subject: Re:Your OS design
PostPosted: Wed Jan 22, 2003 4:50 pm 
I like your ideas, and I look forward to seeing them implemented :).

I think that there is a place for the command-line shell in a desktop OS. I think a graphical file manager and a command-line shell fulfil two different roles. A GUI file manager is like getting your hands dirty and doing it yourself (opening folders, dragging and dropping files, etc.). A command-line shell is like ordering someone else to do what you want: you tell it what you want doing and it goes off and does it. For example, Windows Explorer and CMD.EXE fit these two roles nicely, and I use both regularly.

I think that giving names to devices is more-or-less the same as giving them DOS-style drive letters. It's somewhere in between drive letters and subdirectories under /mnt. I don't particularly like either of these, but there's a thread in alt.os.development at the moment (called "a: vs /root") which discusses various alternatives.

On the subject of loadable modules: I'm thinking about a scheme for object naming and method dispatching. In a mainstream OS you have various objects (files, processes, users, etc.) each with their own naming conventions/namespaces (file names, process IDs, user names) and sets of functions. What I'd like to do is to unify the namespace: not to turn everything into a file (as Plan 9 does) but to turn everything into an object, with a file (and a process, and a user, etc.) being a special kind of object. I'm impressed by technologies such as COM and CORBA, so what I'd end up with is kernel syscalls like:
Code:
status_t ObOpenObject(const wchar_t *path, const IID& interface_id, void **object_pointer);
status_t ObCreateObject(const CLSID& class_id, const IID& interface_id, void **object_pointer);

Here ObOpenObject gives you access to the master kernel namespace of objects, which might look like:
/Processes
0
1
2
/FileSystem
FloppyDrive0
Storage
OperatingSystem
MyFiles
CdRomDrive0
/Users
Tim
Admin
Guest
Each 'file' in the namespace is actually an object, which supports several interfaces. When you call ObOpenObject you request one specific interface (such as IID_IProcess). An interface is effectively a C++ class without any member variables. Each interface supports, at a minimum, the IUnknown interface, which provides reference counting (AddRef and Release) and a method for obtaining pointers to the object's other interfaces (QueryInterface). When you call a method, you'd always be calling some code inside the current process; however, that code could either carry out the method to completion (like thisProcess->GetStandardOutput()) or invoke a syscall which would cause the method to run inside another process and return the results to you. In effect, the kernel becomes a namespace manager and inter-process communication system.

Of course, none of this is particularly new, it's just my take on things. :)


Top
  
 
 Post subject: Re:Your OS design
PostPosted: Thu Jan 23, 2003 1:05 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5964
Location: In a galaxy, far, far away
A word on the commandline-vs-GUI shell, i think that the command line brings things you cannot do easily with a GUI-only scheme such as "rename *.bak *.old" or "grep "#include<hello>" `find *.c` >hello-invokers.lst"

There may be a way to do it graphically as well through the use of search wizards, etc (? la WinXP), but the command line still gives you a lot of flexibility.

What i'd like to blow up that limitation is a kind of graphical environment where you can quickly assign some common tasks to the current folder (make clean, etc.). The best thing i envision is some framework where the 'stdout' part of the shell is graphical and the 'stdin' remains command-line aware (so that you can quickly type "ls *.h" over your files window and have the files filtered so that only C header files show up :)

See this link for more about my point of view on shells.
http://clicker.sourceforge.net/pixs/futureshell.png will give you a quick view of the future i'd like to have on my computer :)

_________________
Image May the source be with you.


Top
 Profile  
 
 Post subject: Re:Your OS design
PostPosted: Thu Jan 23, 2003 2:11 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5964
Location: In a galaxy, far, far away
Your ideas motivate me, DarylD ...
[url=http://clicker.sourceforge.net/pixs/futureshell2.png] Here's some more "shell of the future" from Clicker32's time-wrapping camera 8)
[/url]
-- edit
i removed the picture from this thread, so that there is more space for typing.
-- /edit

_________________
Image May the source be with you.


Top
 Profile  
 
 Post subject: Re:Your OS design
PostPosted: Thu Jan 23, 2003 3:45 am 
Yes, modularity is very important for me definately. My number one criteria for my OS though is keeping everything simple and accessible so it becomes an easy to maintain and extend OS.

The idea of using COM and CORBA is certainly an interesting one and could certainly be implemented with interesting results. It would nice to combine methods and data together in one scheme.

As far as a command line goes, yes I have to admit I do make use of one. But as Pype was saying, it would be really nice to be able to replace that with some GUI system, but that will certainly be a challange and a half just coming up with the perfect idea!

When I say getting rid of the command line, I don't mean the total removal of one, I just mean having a simplified one that uses the Module Calls. I need to just come up with a system whereby a full module name and call name wouldn't have to be specified. I remember back on my old BBC, it didn't have a command line but it was of course possible to format disks and copy files from a sort of command line, in fact it was really the only way to do it. The way that worked was to have a whole load of * (OS) calls which were called from normally ROM's. For example the *cat command displayed a catalogue of the current directory, but this could be shortened to *.

So what I would have is a FS module (which I currently have, although it only works quite rudimentarily so far) which will have module calls titled "Delete", "ChangeWorkingDirectory" etc. I would like these module calls to be called directly from a console of sorts. Together with my idea of being able to interrogate module calls for their parameters, I won't actually have to write a shell at all. I would just need a wrapper around the module calls (which will obviously be called from everywhere).

So for the directory listing command which I could call "List", the user would type in a module call maybe as follows:

*FS:List

The console would call the "GetParameters" function for that call and would get a list of optional or necessary parameters and would then make the appropriate call.

This method should remove the need for a specific shell. The only thing I am undecided on is for shell scripting. A solution may show itself to me later!

Daryl.


Top
  
 
 Post subject: Re:Your OS design
PostPosted: Thu Jan 23, 2003 4:28 am 
Incidentally, I am wondering about starting again on my OS. Not from scratch I might add, I will reuse huge chunks of code but for the following reasons:

1. I do quite fancy the idea of expanding the use of objects in my OS. The COM idea Tim mentioned is quite interesting.

2. I am thinking about using C++ for the kernel as opposed to C, a lot of the structures I am using would really benefit in terms of simplicity.

3. The call interface is slightly less than efficient. I am deciding on a new faster method of doing things.

4. I want to make use of namespaces if I can. I think it will help separate things.

5. My naming convention has got a little messy. It could definately do with a little more structure.

Also, starting again so early on is not such a headache really. At least it gives me a chance to tidy things up. And I can keep things like the Memory Manager etc.

Daryl.

Update: I have decided to stick to C for now. Seems like C++ has too many issues. I would also like to use my message passing system more if I can including OS calls. The problem I have currently is that all my calls to the kernel using the API require various structs which must be in the header files for the API. Seems a little messy, I would like a system where I can send all parameters in a message and maybe instead of using the get module handle/module call ID system, is instead a way of using Module::call syntax. It should hopefully help separate the API and kernel more. Still toying with ideas though.


Top
  
 
 Post subject: Thelema (part 1)
PostPosted: Thu Jan 23, 2003 11:44 am 
As some of you know already, I've mostly been working on (or rather, failing to work on) a test system called LoIS, and some random experiments to practice various techniques. However, I also have a long-term plan for a system, one based on various newer ideas that I found intriguing. None of the plans I have for it are original, really, but they have not disseminated through the programming community to any great degree (one of the Big Secrets of the computer industry is that, for all the sound and fury of various fads such as Java, there hasn't been a significant new development in software design since around 1978. I call this phenomenon 'computing in the Red Queen's square', after the scene in Through the Looking Glass where the Red Queen tells Alice how she must run as fast as she can just to stay in one place). Having hung out with some ritual-magick types a lot lately, I've decided (for now) that the name of this system will be 'Thelema'. :)

My intended interface design is based around a universal viewer/editor/interpreter; an uber-EMACS, as it were. Special-purpose windows or forms will be built by scripting extensions to this (though visual form-building tools will eventually be added to this.

The underlying command structure will be interpreted scripts, of course, just as in Emacs, but there will be various ways to invoke them, primarily through some kind of 'live text' a la Oberon - by allowing any given section of text to be selected and run as a script, the need for a special-purpose shell vanishes. It will be possible, and hopefully easy, to build menus and define icons; in the case of menus, they would simply be ordinary text which has been 'hooked' to automatically invoke a given script and locked in place. It should be possible to edit any menu at any time, and save the new configuration as a preference. Functions and object will be organized into 'toolboxes', which can be reganized by the user as appropriate. There will be no applications in the classical sense; rather, various tools and forms will be combined to create 'frameworks', similar to EMACS modes in concept but more comprehensive and (hopefully) flexible.

One concept I mean to experiment with is layering; within a window, sub-views can overlaid to create a total view, in the same way cel sheets are overlaid to create animation frames. Each layer would itself be a full editor framework, and a single window could contain an indefinite (i.e., limited only by the system's capacity) number of different, independent frameworks. This idea has been used by various imaging editing tools IIRC, and to a very limited extent by XML layers, but has not before been applied generally to the best of my knowledge.


Top
  
 
 Post subject: Thelema (part 2)
PostPosted: Thu Jan 23, 2003 11:45 am 
Instead of a conventional file system, there will be a more general document management system, based largely on the concepts pioneered by the Xanadu Project, and influenced by Raskin's work as well. I hope to implement something very similar to the classic Xanadu plan, thoug with a much diminished scope. Documents, when created, will be stored permanently, and tracked by a set of links; when a document is 'edited', what is changed is not the document itself, but rather the link trails controlling how it should be read and displayed. Different trails may share the same material, and conversely, different trails of the same document may exist with completely different content. The links will also track ownership, publication status and visibility of a given trail (though I doubt it will support automatic royalties, something that was always part of the Xanadu concept but which has proven to be unacceptable by most users). Documents can be referenced by their title (or that of a given trail) or by searches of various kinds. There will not any sort of built-in directory heirarchies, though tools to build such things out of links would be easy enough to implement if someone insisted on it.

Programs will be treated somewhat diferently than other documents, but the same to some extent still applies. It may even be possible to apply the document link system to code linking an loading, allowing for a simplified system that would support dynamic libraries as part of it general design. Programs and scripts will be associated primarily with there source code (naturally), and by default the deliverable form will include the source with it to allow for debugging. When a program is compiled, it does not generate a native binary, but rather an intermediate representation containing the parse-tree and other necessary information needed to generate the object code (similar to the 'slim binaries' in later Oberon systems). This will provide a portable format which can be conveniently either interpreted directly, or compiled locally, while still providing for full security checking. While the generated native code may be saved locally, it would not be part of the distributable, both for security reasons and portability concerns - and because it is hoped that it will be possible to incorporate machine-specific optimization in the fashion of the Synthetix kernel.

Of course, in Real Life, chances are I'll never get even half of this done. But it's what I want to do, and I fully intend to try to do it.


Top
  
 
 Post subject: Re:Your OS design
PostPosted: Thu Jan 23, 2003 12:27 pm 
Offline
Member
Member

Joined: Wed Oct 18, 2006 11:59 am
Posts: 1600
Location: Vienna/Austria
Hi!

As for operating system concepts, i am thinking of a kind of "modulat" kernel, where device-servers (drivers) are loadable and act as threads in the kernel space: something like modules in linux but not really THAT way. They shall be kernel threads. as is for memory manage ment and file system, i want them to be in the kernel adress space as kernel threads for that message passing issues can be handled the easy way.

I want each process be aware of the kernel by way of mapping the kernel pages in to each process' adress space (by according entries in his page directory - that should do it)

For now, i am at the very low level state, starting to implement some kind of memory management and process handling (i.e. process/task management)

I consider operating system development a good and fine project and since i have started even the smallest piece of coding for it, I have learned much more than ever in that programming course i have attended (they didnt even taught me how to make linker scripts and what is the sense of those neat header files ...)

Pype, your Idea of a shell in a gui-window sounds cool. and even possible. Just be careful of which input you assign to which layer on this multi purpose gui window: keyboard to the shell (if it is activated), mouse to the other gui elements. this way it should do its job.

DaryID,

how do you intend to implement this: a shell, from which you issue system calls? IWill this be a kind of parser?

so long

bye folks

@schol-r-lea: books are fine traps :-)) they have magic inbetween.

www.distantvoices.org

_________________
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image


Top
 Profile  
 
 Post subject: Re:Your OS design
PostPosted: Thu Jan 23, 2003 2:38 pm 
These ideas just makes one wonder, where do you guys hang out and get these ideas!!! ;D (Fill us in on your sources of info on COM,COBRA,Namespaces,etc) INSPERATIONAL!!!

My goal for the Operating system i'm working on was to make the life of the programmer a lot easier!!!! Apart from providing means for Loading modules, i wanted to create a system where you could program graphics without having to call A MILLION functions just to set up the display and plot a pixel! >:( My system is really being designed with games in mind, as they are amongst (in my opinion) the most resource tasking programs.
For the interface, I just came up with the idea of an event manager that handles the communication between the input/output drivers and the user.
So a user could issue a check left event request to the event manager , without having to bother if the user pressed the left arrow key on the keyboard or moved the mouse to the LEFT.
Also I was thinking of a system where the programs are not compiled in the traditional sense, maybe they are written in a scripting language (similar to c,pascal,asm yet to decide) and the output from the interpreter is a stream of byte codes that can later be executed in the Script Executor on any platform/OS that has its own Interpreter for the scripting language.
The GUI would provide the user/programmers with automatic menu support (no extra code needed in their programs) they just need to supply the menu item-fuction pairs to the Menu Manager. I'm looking at using a single menu across the entire system, which alters its contents/behaviour based on the current program being used.
5-10sec total boot time
32bit Journalled Filesystem
Just some of the things i'd like, haven't really sat down to flesh the whole system out ;D


Top
  
 
 Post subject: Re:Your OS design
PostPosted: Thu Jan 23, 2003 3:16 pm 
Offline
Member
Member

Joined: Wed Oct 18, 2006 11:59 am
Posts: 1600
Location: Vienna/Austria
code slasher *gg* If i derived the manner you write code from your nickname, i would have to be in fear of your operating system.

But please please tellme how would you implement an event for MOUSE MOVED LEFT/RIGHT ...????

and aren't you a little bit inspired by java?

One remark: No need to CRY around , gosh. stay tuned. No one intends to raise arms against thee!

stay safe

_________________
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image


Top
 Profile  
 
 Post subject: Re:Your OS design
PostPosted: Thu Jan 23, 2003 3:51 pm 
Not crying out, just trying to stress keywords ;D, have changed them to bold font 8)
The Event Manager is based on my Game programming background (been reading books and trying stuff).
The idea is to provide a level of abstraction for those that want to use it. It is still possible for the user to directly ask for input from the keyboard/mouse etc. But for programs that don't need the details of the source of the input, just need to find out if an action was taken eg left button press (which the program through a setup could assign to the enter key too) could be checked by using check_event_left_button which the Event Manager will responde to by returning True if the user presses the left mouse button or enter key on the keyboard in this example.
On the JAVA issue, i haven't looked at how it works internally except that i know that is uses byte codes. The idea for the scripting lanugage came from my studies of compiler construction which always starts with interpreters and the moves on to compilers. I like the idea of writing a program once and then being able to run it on any OS. Traditional compiled programs will still work too, thats a plus.


Top
  
 
 Post subject: Re:Your OS design
PostPosted: Thu Jan 23, 2003 8:16 pm 
im also planning on making a highly modular kernel. everythign will be a module, its supposed to be slower, but its so beautiful. and i have one thing to ask you guys talking abtou desktops. have you got a working kernel yet so that you CAN use a command line? btw Clicker, thats so freikin nice, the desktop pic that is. but what exactly is the time wrapping camera?


Top
  
 
 Post subject: Re:Your OS design
PostPosted: Fri Jan 24, 2003 1:20 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5964
Location: In a galaxy, far, far away
time-wrapping camera: this is about moving your mind in the future, viewing your finished program, how u use it, etc (preferably dreaming :p) and then come at a image program like The GiMP and re-draw what you saw :)

That's something my "Object-Oriented Software Engineering" teacher was always talkin' about ...

_________________
Image May the source be with you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 237 posts ]  Go to page 1, 2, 3, 4, 5 ... 16  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: FrankRay78, Majestic-12 [Bot] and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group