Jump to content

Own OS?

derrickd241

I'm a computer science student and I'm currently taking C++ and I know that a person can author their own OS or linux distro you could call it from just using the source code from the Linux kernel which as a geek I think it would be amazing to use something everyday that you created with your own 2 hands and gaining the knowledge of how an os works inside and out and the challenge however not having even taken computer architecture yet this is probably going to be just a dream before id even consider taking on such a task.  But, you would learn absolutely a lot of something that not many people have the knowledge to do.  Anyone on here done this before?

Link to comment
Share on other sites

Link to post
Share on other sites

I'm personally thinking about doing something similar in C#

Link to comment
Share on other sites

Link to post
Share on other sites

I mean what would a company tell you if you had on a resume that you authored an operating system with just the kernel id hire that guy and give him whatever they wanted to work at my company right?

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, VAkena said:

I'm personally thinking about doing something similar in C#

An operating system written in C#? You clearly have absolutely no idea what's going on here.

 

As for OP, this is not something you just do. You can compile your own kernel for sure, this is not something that's considering particularly impressive but rather something most Linux enthusiasts have done in their life. You can indeed write your own operating system, but it is in no way feasible at all, nor will you be anywhere near the low level capabilities you need if you haven't taken computer architecture yet. If however you want to make a system feel truly like your own, and without burying yourself in a massive amount of work that will eventually turn out to yield a worse result than what you can get off the shelf, take a look at Arch Linux.

Link to comment
Share on other sites

Link to post
Share on other sites

11 minutes ago, Hans Christian | Teri said:

An operating system written in C#? You clearly have absolutely no idea what's going on here.

 

As for OP, this is not something you just do. You can compile your own kernel for sure, this is not something that's considering particularly impressive but rather something most Linux enthusiasts have done in their life. You can indeed write your own operating system, but it is in no way feasible at all, nor will you be anywhere near the low level capabilities you need if you haven't taken computer architecture yet. If however you want to make a system feel truly like your own, and without burying yourself in a massive amount of work that will eventually turn out to yield a worse result than what you can get off the shelf, take a look at Arch Linux.

Well, many Android ROMs (which are technically operating systems, mind you) are written in C and sometimes C++, so he's not far off.

My rig: Intel Core i7-8700K OC 4.8 | NZXT Kraken X62 | ASUS Z370-F | 16 GB Trident Z RGB 3000 (2x8) | EVGA 1070 SC | EVGA SuperNova NEX650G1 | NZXT H700 | Samsung 250GB 850-EVO | 2x 2TB Seagate Barracuda HDDs 

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, The Cool n00B said:

Well, many Android ROMs (which are technically operating systems, mind you) are written in C and sometimes C++, so he's not far off.

He's absolutely so very very very far off. C and C++ are both fairly low level languages, C# is high level.

Link to comment
Share on other sites

Link to post
Share on other sites

10 minutes ago, Hans Christian | Teri said:

He's absolutely so very very very far off. C and C++ are both fairly low level languages, C# is high level.

I really don't know anything about any of the C's.

My rig: Intel Core i7-8700K OC 4.8 | NZXT Kraken X62 | ASUS Z370-F | 16 GB Trident Z RGB 3000 (2x8) | EVGA 1070 SC | EVGA SuperNova NEX650G1 | NZXT H700 | Samsung 250GB 850-EVO | 2x 2TB Seagate Barracuda HDDs 

Link to comment
Share on other sites

Link to post
Share on other sites

46 minutes ago, derrickd241 said:

I mean what would a company tell you if you had on a resume that you authored an operating system with just the kernel id hire that guy and give him whatever they wanted to work at my company right?

A good employer should ask what makes your OS different from all the rest. If you can't give a good answers to that then what you did was completely insignificant and meaningless to an employer. 

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, VAkena said:

 

I'm personally thinking about doing something similar in C#

 

C# and Java are JIT languages that rely on being able to task the operating system to do things for them. So while it is theoretically possible to build enough of an OS to build the rest of your OS in a JIT language, what you would actually be doing is having enough OS written in assembly language and C to handle all of your system calls and hardware control requirements and writing your "OS" like an application. In other words, it would be very hard and it would have very crappy performance. Not to mention the fact that the way C# and Java work is pretty complex and getting them to run on your own custom OS wouldn't be as easy as say, building a BASIC or GCC compiler...

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

There are native compilers for e.g. Java, so it could work on some (special?) hardware. You just really shouldn't.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

6 hours ago, Dat Guy said:

There are native compilers for e.g. Java, so it could work on some (special?) hardware. You just really shouldn't.

Java compilers compile java source code to Java Virtual Machine byte instructions.

These cannot run directly on your machine but run in a virtual machine (JVM).

Java is a managed programming language and requires garbage collection.

Further more, java's instructions are stack based, unlike real hardware which are register based.

These are all reasons why you cannot write a Operating System in Java.

Desktop: Intel i9-10850K (R9 3900X died 😢 )| MSI Z490 Tomahawk | RTX 2080 (borrowed from work) - MSI GTX 1080 | 64GB 3600MHz CL16 memory | Corsair H100i (NF-F12 fans) | Samsung 970 EVO 512GB | Intel 665p 2TB | Samsung 830 256GB| 3TB HDD | Corsair 450D | Corsair RM550x | MG279Q

Laptop: Surface Pro 7 (i5, 16GB RAM, 256GB SSD)

Console: PlayStation 4 Pro

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Dat Guy said:

Sorry, but your POV is incomplete. Technically, you don't need a VM. 

 

http://www.excelsiorjet.com

Thats pretty cool stuff that I havent heard about.

Looking at their website it is actually not that far of the JVM and my points are still valid.

 

The JVM inteprets the byte code and when it recognizes it is in a loop it will compile that bit of code to native machine code, which is called JIT.

Excelsior JET compiles to machine code before the launch of the application (called AOT compiling).

But  the program can still not run by itself, it requires the Excelsior JET runtime which basically acts like the JVM when it has compiled code for JIT.

So in the end, it can still not be used for building an operating system as it requires the JET runtime to do stuff like garbage colection.

Both the program and the JET runtime also require an operating system to function, for stuff like memory and registers management.

 

Source:

http://www.excelsiorjet.com/internals#advanced

Desktop: Intel i9-10850K (R9 3900X died 😢 )| MSI Z490 Tomahawk | RTX 2080 (borrowed from work) - MSI GTX 1080 | 64GB 3600MHz CL16 memory | Corsair H100i (NF-F12 fans) | Samsung 970 EVO 512GB | Intel 665p 2TB | Samsung 830 256GB| 3TB HDD | Corsair 450D | Corsair RM550x | MG279Q

Laptop: Surface Pro 7 (i5, 16GB RAM, 256GB SSD)

Console: PlayStation 4 Pro

Link to comment
Share on other sites

Link to post
Share on other sites

Ah, thank you. I should have read the whole site. Now that would have made Java much more interesting. :(

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Dat Guy said:

 

There are native compilers for e.g. Java, so it could work on some (special?) hardware. You just really shouldn't.

 

Both .NET C# and Java are pretty much the same, when it comes to the basics anyway. They are both JITC languages that require a runtime to operate. JITC means Just In Time Compiler. When you compile source code you are actually generating an intermediate language, for C# this is MSIL or CIL (Microsoft Intermediate Language or Common Intermediate Language), for Java you generate ByteCode. The way they work is somewhat different, but somewhat the same. In both languages, when you launch the application the runtime (.NET framework for C# and JVM for Java) is launched first, and the runtime loads the intermediate code. It then looks forward and compiles the intermediate language to machine language Just In Time (or JIT) for execution. The reason these languages operate in a "runtime" is because they are managed languages. What that means is that the "runtime" is doing things like memory allocation and deallocation for you, as well as handling System Calls and other interrupts for you. The main benefit of a managed language is that it gives the developer more time to focus on solving complex problems by taking away all of the "backbone" stuff like memory management, interfacing with the OS, and interfacing with I/O. The downside is that you're pretty much stuck with whatever methods for accomplishing those tasks have been given to you by the authors of the "runtime", this is why you don't really see managed languages used in things like simulation or AAA games.

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

43 minutes ago, straight_stewie said:

Both .NET C# and Java are pretty much the same, when it comes to the basics anyway. They are both JITC languages that require a runtime to operate. JITC means Just In Time Compiler. When you compile source code you are actually generating an intermediate language, for C# this is MSIL or CIL (Microsoft Intermediate Language or Common Intermediate Language), for Java you generate ByteCode. The way they work is somewhat different, but somewhat the same. In both languages, when you launch the application the runtime (.NET framework for C# and JVM for Java) is launched first, and the runtime loads the intermediate code. It then looks forward and compiles the intermediate language to machine language Just In Time (or JIT) for execution. The reason these languages operate in a "runtime" is because they are managed languages. What that means is that the "runtime" is doing things like memory allocation and deallocation for you, as well as handling System Calls and other interrupts for you. The main benefit of a managed language is that it gives the developer more time to focus on solving complex problems by taking away all of the "backbone" stuff like memory management, interfacing with the OS, and interfacing with I/O. The downside is that you're pretty much stuck with whatever methods for accomplishing those tasks have been given to you by the authors of the "runtime", this is why you don't really see managed languages used in things like simulation or AAA games.

I'm gonna be the first to make one in python haha rofl while I love python and know the power behind it it's certainly not capable of that I don't think unless if it is that would be amazing since using eclipse for c++ and python are identical although c++ is compiled and python is an interpreted language I guess if you could somehow compile the interpretation that might work although unstable and probably not the greatest of ideas but in the world of programming you're only limited by your imagination :)

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, derrickd241 said:

python is an interpreted language

Python operates in a runtime, so you can't really use it for a GUIOS (well, as already discussed, you could, but actually what you would be doing is building an OS that the runtime can operate in as an application, then the GUI is that application). You can use interpreted languages for an OS. Remember the Apple I and II used Applesoft BASIC (modified Microsoft BASIC) as the primary language for the operating system, using a modified Microsoft BASIC interpreter. 

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×