5

I'm wondering if it's possible to run a computer program without an operating system. Is there any way that this can be done?

  • 5
    The operating system is a computer program. So, yes. – Oliver Salzburg Aug 08 '12 at 17:20
  • Now I wonder if it's possible to run multiple programs simultaneously without an operating system. – Anderson Green Aug 08 '12 at 17:24
  • There have also been some experiments in "megalithic kernel" design. – Anderson Green Aug 08 '12 at 17:25
  • 1
    Can you be a bit more specific? Define programs. – CharlieRB Aug 08 '12 at 17:25
  • Which definitions of "computer program" did you have in mind? – Anderson Green Aug 08 '12 at 17:26
  • I mean "a sequence of instructions written to perform a task for a computer": the most general sense of the word. – Anderson Green Aug 08 '12 at 17:27
  • 2
    The answer is "yes". However your question isn't really a good fit for the site, since it's theoretical and not based on an actual issue that you're having. If you have something in particular in mind, please consider editing your question to provide that information. – Michael Hampton Aug 08 '12 at 17:53
  • Early in the PC's history some games were released on floppies - they didn't contain DOS or any other operating system, but controlled the hardware directly. Known as "booters." These games of course would probably work improperly if at all on modern hardware, assuming you could even boot it. – LawrenceC Mar 14 '14 at 12:22
  • http://stackoverflow.com/questions/22054578/how-to-run-a-program-without-an-operating-system | http://softwareengineering.stackexchange.com/questions/171127/how-do-operating-systems-run-without-having-an-os-to-run-in – Ciro Santilli OurBigBook.com Mar 31 '17 at 07:28
  • 1
    https://stackoverflow.com/a/57000737/4217744 – simhumileco Jul 12 '19 at 05:43

1 Answers1

4

"Normal" Computers

Without an operating system, You cannot run a program that was written to be run in an operating system. Most programs are of this sort.

You could write a program that runs without an operating system but this would be a very hard task, mainly because the operating system provides drivers for all the hardware. Without the OS, your program would have to drive the specific hardware directly. Not all hardware makers release details of how to do this (e.g. nVidia) but only provide drivers for specific operating systems.

You'd also have the problem of how to get the computer to load and run your program. With most desktop computers you'd have to place the program where the BIOS would expect to find an OS loader.

It is likely you'd have to write the program in a low level language - assembler or perhaps something like C without any standard libraries that are OS dependent.

Microcontrollers

You can write programs for things like the Arduino without any OS on the Arduino. there are development kits that allow you to write code in relatively high level languages, the development kits usually provide the equivalent of drivers for the specific hardware.

Operating System

You can redefine "Operating System" in a way that invalidates all the above. I am assuming you mean software comparable to the Windows or Linux operating systems.

  • Do you mean that I could somehow redefine "operating system" in a way that is inconsistent with the word's standard definition? – Anderson Green Aug 08 '12 at 17:44
  • I've lost count of the times I've seen or heard people redefine X in a way that is inconsistent with the world's standard definition† (for many different values of X). So yes, go for it. †As if such a thing existed! – RedGrittyBrick Aug 08 '12 at 18:34