|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Are you crazy about different operating systems like C++,
java in computers? If you want to check about that please visit http://operatingsys.blogspot.com/ |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
* George:
> Are you crazy about different operating systems like C++, > java in computers? > If you want to check about that please visit > [some blog page].com/ This is off-topic in comp.lang.c++. I'm not sure whether it's spam, although you've posted the same article under two different names. But if it isn't spam, please stop posting this message (and by the way, neither C++ nor Java are operating systems). - Alf |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Alf P. Steinbach wrote:
> * George: >> Are you crazy about different operating systems like C++, >> java in computers? >> If you want to check about that please visit >> [some blog page].com/ > > This is off-topic in comp.lang.c++. > > I'm not sure whether it's spam, although you've posted the same article under > two different names. > > But if it isn't spam, please stop posting this message (and by the way, neither > C++ nor Java are operating systems). Makes you wonder why the quantity of trolls lately. Used to be they showed up in force at the beginning of the school year, now the reason seems pretty hard to grok. Is someone having a big sale on computers? For a little on topic content, is there any operting system written in C++? I think parts of windows is C++ but is the whole thing? It's hard to seperate library and system at times, but here I'm wondering about the basic kernel in c++. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On Apr 7, 3:06 am, stan <smo...@exis.net> wrote:
> Alf P. Steinbach wrote: > > * George: > >> Are you crazy about different operating systems like C++, > >> java in computers? If you want to check about that please > >> visit [some blog page].com/ > > > This is off-topic in comp.lang.c++. > > > I'm not sure whether it's spam, although you've posted the > > same article under two different names. > > But if it isn't spam, please stop posting this message (and > > by the way, neither C++ nor Java are operating systems). > Makes you wonder why the quantity of trolls lately. Used to be > they showed up in force at the beginning of the school year, > now the reason seems pretty hard to grok. Is someone having a > big sale on computers? > For a little on topic content, is there any operting system > written in C++? I think parts of windows is C++ but is the > whole thing? It's hard to seperate library and system at > times, but here I'm wondering about the basic kernel in c++. At the very lowest level of the kernel, it has to be assembler. There's no way to write a context switch in C, let alone C++. With regards to C++, Symbian seems to be mostly C++. -- James Kanze (GABI Software) email:james.kanze@gmail.com Conseils en informatique orientée objet/ Beratung in objektorientierter Datenverarbeitung 9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34 |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
stan wrote:
> [...on spam...] > > For a little on topic content, is there any operting system written in > C++? I think parts of windows is C++ but is the whole thing? It's hard > to seperate library and system at times, but here I'm wondering about > the basic kernel in c++. BeOS/Haiku: http://www.haiku-os.org/documents/de...ing_guidelines Though I don't know what subset of C++ they use. Seeing what kind of code g++ produces for RAII and exceptions, I have to wonder about the suitability of C++ for low level OS functions. For example http://svn.berlios.de/viewcvs/haiku/...80&view=markup looks more like C with classes than C++ to me. |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
James Kanze wrote:
> On Apr 7, 3:06 am, stan <smo...@exis.net> wrote: <snip> >> For a little on topic content, is there any operting system >> written in C++? I think parts of windows is C++ but is the >> whole thing? It's hard to seperate library and system at >> times, but here I'm wondering about the basic kernel in c++. > > At the very lowest level of the kernel, it has to be assembler. > There's no way to write a context switch in C, let alone C++. I was allowing for some assembly, I should hve been clearer. > With regards to C++, Symbian seems to be mostly C++. Interesting, I've heard of it but I'm not very familiar with Symbian. All the operating system and driver stuff I've ever been involved with has been non object stuff and I was trying to imagine what an object oriented approach might look like. Actually, I worked a little with cygwin which isn't really an operating system and isn't really OO but it does head in that direction; it does have classes, inheritance, and polymorphic functions. Much past those points the cygwin code gets strange because of trying to harmonize the windows api and the linux system calls. The twists, turns, and kludges pile up quickly and your head starts to hurt on a casual reading. Not that the code is necessarily bad, it's just that the problems to be solved are ugly and the code follows. |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
Paul Brettschneider wrote:
> stan wrote: > >> [...on spam...] >> >> For a little on topic content, is there any operting system written in >> C++? I think parts of windows is C++ but is the whole thing? It's hard >> to seperate library and system at times, but here I'm wondering about >> the basic kernel in c++. > > BeOS/Haiku: > http://www.haiku-os.org/documents/de...ing_guidelines Interesting, that style guide actualy encourages including the old style headers <math.h> vs <cmath> and mentions they don't need the workarounds. > > Though I don't know what subset of C++ they use. Seeing what kind of code > g++ produces for RAII and exceptions, I have to wonder about the > suitability of C++ for low level OS functions. I hadn't actually given it a lot of thought; I was just pondering what more object like system code would look like. Your question about suitability is probably only the tip of the iceberg of issues that would surface. I realize that systems programming wasn't a particular design goal, but I wonder how suitable the STL is for systems and how much tweaking would be required. Given the tradeoffs to build a general purpose library, which parts would be useful as is and which parts would need mods. But, I think your original question makes the library a moot point. > > For example > http://svn.berlios.de/viewcvs/haiku/...80&view=markup > looks more like C with classes than C++ to me. |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
On Apr 8, 1:53 am, stan <smo...@exis.net> wrote:
> James Kanze wrote: > > On Apr 7, 3:06 am, stan <smo...@exis.net> wrote: > <snip> > >> For a little on topic content, is there any operting system > >> written in C++? I think parts of windows is C++ but is the > >> whole thing? It's hard to seperate library and system at > >> times, but here I'm wondering about the basic kernel in c++. > > At the very lowest level of the kernel, it has to be assembler. > > There's no way to write a context switch in C, let alone C++. > I was allowing for some assembly, I should hve been clearer. I understood that, but when you speak of "the basic kernel", how high do you go? A well designed OS will be extremely layered, and the "basic kernel" won't necessarily be much more than the scheduler lookup and context switch. (In the one OS I wrote, about 10 machine instructions in all.) > > With regards to C++, Symbian seems to be mostly C++. > Interesting, I've heard of it but I'm not very familiar with > Symbian. I've never programmed to either, but from what I gather, it's more wide-spread than Windows (since it is running on most of your cellular phones). There was also a distributed OS developed in France some 15 (or) more years ago that was largely written in C++. Chorus, or something like that. It was bought out by Sun, and presumably parts of it have made their way into Solaris. > All the operating system and driver stuff I've ever been > involved with has been non object stuff and I was trying to > imagine what an object oriented approach might look like. Interesting. Although it didn't go by that name, most OS's have been OO long before OO became popular. Think about it: the basic principle of OO is polymorphism, right? You call a function, and it's actual implemnetation and behavior depend on the type of object you call it on. In other words, when you call write(), if it is OO, the actual behavior will depend on whether the file descripter refers to a file, a console, a socket, or... The kernels of most OS's go back to before C++, but all of the ones I've worked on had a manually implemented vtable for the I/O. I'd say that C++ would be a natural for that part, at least. When I wrote my OS, I had one system request, respond, which depended on the type of object whose handle it got: if you passed it a process, it would start it; a message queue, it would send a message; etc. Originally, I implemented it as part of the timer queue: when you made a timer request, you'd pass it a handle and a "message", and what happened when the timer event occurred depended on the type the handle referred to. I then decided that it might be more generally interesting: you'd send a request to another process, with a handle where you wanted the response, and the other process didn't have to know how you wanted the response sent; the OS took care of it all. This was in 1979, and I'd never heard of OO or C++ at the time, so in fact, I implemented the polymorphism by means of a switch, but the idea was there. -- James Kanze (GABI Software) email:james.kanze@gmail.com Conseils en informatique orientée objet/ Beratung in objektorientierter Datenverarbeitung 9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34 |
|
![]() |
| Outils de la discussion | |
|
|