Jump to content

How hard is it to create a functional operating system?

I was just wondering, how hard is it to create a fully functional OS from scratch where all the drivers also work and it can boot successfully. I don't mean an edited version of Linux, I mean a full one made from scratch, what is required and how hard is it?

"Your most unhappy customers are your greatest source of learning." - Bill Gates

Link to comment
Share on other sites

Link to post
Share on other sites

if you wanna go ahead and start from pretty much bare metal, you gonna be learning assembly, so yeah pretty damn hard.

mY sYsTeM iS Not pErfoRmInG aS gOOd As I sAW oN yOuTuBe. WhA t IS a GoOd FaN CuRVe??!!? wHat aRe tEh GoOd OvERclok SeTTinGS FoR My CaRd??  HoW CaN I foRcE my GpU to uSe 1o0%? BuT WiLL i HaVE Bo0tllEnEcKs? RyZEN dOeS NoT peRfORm BetTer wItH HiGhER sPEED RaM!!dId i WiN teH SiLiCON LotTerrYyOu ShoUlD dEsHrOuD uR GPUmy SYstEm iS UNDerPerforMiNg iN WarzONEcan mY Pc Run WiNdOwS 11 ?woUld BaKInG MY GRaPHics card fIX it? MultimETeR TeSTiNG!! aMd'S GpU DrIvErS aRe as goOD aS NviDia's YOU SHoUlD oVERCloCk yOUR ramS To 5000C18

Link to comment
Share on other sites

Link to post
Share on other sites

18 minutes ago, akram03 said:

I was just wondering, how hard is it to create a fully functional OS from scratch where all the drivers also work and it can boot successfully. I don't mean an edited version of Linux, I mean a full one made from scratch, what is required and how hard is it?

It’s basically like building a house by yourself with no blueprints 

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, Ausfernando said:

It’s basically like building a house by yourself with no blueprints 

With the added problems of a badger in your pants, and not the cute kind the angry kind 

Silent build - You know your pc is too loud when the deaf complain. Windows 98 gaming build, smells like beige

Link to comment
Share on other sites

Link to post
Share on other sites

27 minutes ago, akram03 said:

I was just wondering, how hard is it to create a fully functional OS from scratch where all the drivers also work and it can boot successfully. I don't mean an edited version of Linux, I mean a full one made from scratch, what is required and how hard is it?

It's literally years of hard work.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

Depends on how many features and what hardware compatibility you aim for.

Ditch complicated stuff like graphical interfaces, audio, user management and focus on working on one architecture in a limited virtualised environment and a single capable dev could probably whip up something that's not terrible in a few years.

Link to comment
Share on other sites

Link to post
Share on other sites

If you don't know the answer to that question, you probably are not anywhere close to being capable of creating one. Just sayin'.

Make sure to quote me or tag me when responding to me, or I might not know you replied! Examples:

 

Do this:

Quote

And make sure you do it by hitting the quote button at the bottom left of my post, and not the one inside the editor!

Or this:

@DocSwag

 

Buy whatever product is best for you, not what product is "best" for the market.

 

Interested in computer architecture? Still in middle or high school? P.M. me!

 

I love computer hardware and feel free to ask me anything about that (or phones). I especially like SSDs. But please do not ask me anything about Networking, programming, command line stuff, or any relatively hard software stuff. I know next to nothing about that.

 

Compooters:

Spoiler

Desktop:

Spoiler

CPU: i7 6700k, CPU Cooler: be quiet! Dark Rock Pro 3, Motherboard: MSI Z170a KRAIT GAMING, RAM: G.Skill Ripjaws 4 Series 4x4gb DDR4-2666 MHz, Storage: SanDisk SSD Plus 240gb + OCZ Vertex 180 480 GB + Western Digital Caviar Blue 1 TB 7200 RPM, Video Card: EVGA GTX 970 SSC, Case: Fractal Design Define S, Power Supply: Seasonic Focus+ Gold 650w Yay, Keyboard: Logitech G710+, Mouse: Logitech G502 Proteus Spectrum, Headphones: B&O H9i, Monitor: LG 29um67 (2560x1080 75hz freesync)

Home Server:

Spoiler

CPU: Pentium G4400, CPU Cooler: Stock, Motherboard: MSI h110l Pro Mini AC, RAM: Hyper X Fury DDR4 1x8gb 2133 MHz, Storage: PNY CS1311 120gb SSD + two Segate 4tb HDDs in RAID 1, Video Card: Does Intel Integrated Graphics count?, Case: Fractal Design Node 304, Power Supply: Seasonic 360w 80+ Gold, Keyboard+Mouse+Monitor: Does it matter?

Laptop (I use it for school):

Spoiler

Surface book 2 13" with an i7 8650u, 8gb RAM, 256 GB storage, and a GTX 1050

And if you're curious (or a stalker) I have a Just Black Pixel 2 XL 64gb

 

Link to comment
Share on other sites

Link to post
Share on other sites

check out http://www.linuxfromscratch.org/

 

but if you mean from the beginning, without any pre written code then you would need a very good knowledge on cpu and memory architecture. There was a youtube series i was watching a long time ago where someone was explaining how to get a basic "hello world" os going. cant remember the name of the channel

Link to comment
Share on other sites

Link to post
Share on other sites

You could apply the same question to pretty much any complicated system

Take for example a car... you would have to mine your own raw materials, then figure out how to create glass, rubber, metal etc

 

 

Still an interesting thought process :-)

 

Link to comment
Share on other sites

Link to post
Share on other sites

10 hours ago, akram03 said:

I was just wondering, how hard is it to create a fully functional OS from scratch where all the drivers also work and it can boot successfully. I don't mean an edited version of Linux, I mean a full one made from scratch, what is required and how hard is it?

hard enough that most people dont bother. you can start by coding for the minix operating system if you wanna learn. coding from scratch though? you can be the next bill gates if you are successful in creating something that even remotely works. 

Sudo make me a sandwich 

Link to comment
Share on other sites

Link to post
Share on other sites

Creating something that boots isn't that hard, and no, you don't need assembly - you can use C or really any other compiled language (though you may lose performance the higher level you go). If you add POSIX system calls and a decent scheduler you may even be able to run some gnu utilities on it, which is not too shabby. Going farther than that is probably too much work for a single person and if you think you can write a competitor to linux by yourself you're wrong, but for personal interest it's definitely a cool project.

 

Drivers are another matter entirely and, depending on what you intend to support, it may not be feasible by a single person outside of extremely generic I/O drivers and basic video output.

On 7/9/2018 at 3:12 PM, Levent said:

if you wanna go ahead and start from pretty much bare metal, you gonna be learning assembly, so yeah pretty damn hard.

Linux is written in C for crying out loud...

On 7/10/2018 at 1:39 AM, wasab said:

hard enough that most people dont bother. you can start by coding for the minix operating system if you wanna learn. coding from scratch though? you can be the next bill gates if you are successful in creating something that even remotely works. 

Coding something that would be considered functional in the early '80s was much easier than it would be now, and to be the "next Bill Gates" even back then would have taken a lot of luck (which Gates and Allen themselves benefitted from). It's not that hard to make something that "works", it's much harder to make something that is marketable.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

If you are interested in that sort of thing then you might want to check out Redox: https://redox-os.org/

 

Its a project that has been going for a few years with the goal of writing a whole OS in Rust.  Last I checked it was more or less working on certain hardware and in VMs, but don't expect to be able to use things like wifi.

Link to comment
Share on other sites

Link to post
Share on other sites

Gates bought the OS from Seattle Computer Products .. so if you want to be like Gates have a rich dad.

 

If your interested in OS's check out the Illumos project.

"Only proprietary software vendors want proprietary software." - Dexter's Law

Link to comment
Share on other sites

Link to post
Share on other sites

22 hours ago, Sauron said:

Linux is written in C for crying out loud...

There are 1325 assembly language files in the kernel tree, and over 900 instances of inline asm calls. So no, it's not written in C - it's written in a mixture of C and assembly language. Most of that is probably optimisations, but almost certainly not all.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Sceptic said:

There are 1325 assembly language files in the kernel tree, and over 900 instances of inline asm calls. So no, it's not written in C - it's written in a mixture of C and assembly language. Most of that is probably optimisations, but almost certainly not all.

The vast majority of it is C and you could definitely get it to work in pure C, it would just be slower and missing some architecture specific features. 900 inline calls are nothing compared to over 10 million lines of code, and even if those files contained an average of 1000 lines of assembly (just... no) they would amount to less than 10% of the source... if you want an example of a working operating system that at one point was purely written in C look no further than UNIX.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

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

×