PDA

View Full Version : How Many Lines of Code Would A Starship Need?



Palanan
2018-09-30, 08:25 AM
This will depend on the starship, of course, and “code” will probably mean something unrecognizable after another century or two, if not earlier.

So what I’m thinking (optimistically) is a non-FTL starship in the mid- to late 21st century, something ponderous that takes decades to cruise between each star, most likely fitted out with sleeper pods or some other form of suspended travel. This would be at least as complex as an aircraft carrier, if not more so by an order of magnitude, and probably the same size or larger.

Given this, and assuming the “code” is something close to what we work with now, how many lines are we talking about? I know this can’t be answered precisely without actually designing and building a starship, but I’m looking for a ballpark estimate, just to get a feel for what might be involved.

halfeye
2018-09-30, 08:33 AM
This will depend on the starship, of course, and “code” will probably mean something unrecognizable after another century or two, if not earlier.

So what I’m thinking (optimistically) is a non-FTL starship in the mid- to late 21st century, something ponderous that takes decades to cruise between each star, most likely fitted out with sleeper pods or some other form of suspended travel. This would be at least as complex as an aircraft carrier, if not more so by an order of magnitude, and probably the same size or larger.

Given this, and assuming the “code” is something close to what we work with now, how many lines are we talking about? I know this can’t be answered precisely without actually designing and building a starship, but I’m looking for a ballpark estimate, just to get a feel for what might be involved.

Supposedly, Windows was a million lines of source code a while ago, and it almost certainly hasn't shrunk, and is unlikely to do so in the future. So, for every PC on board, and we're probably talking thousands, a million lines. Then there are the special purpose computers, call that another billion. Unless you intend to print the source code out (which would be a monumental, probably physically impossible task), it probably doesn't matter.

GloatingSwine
2018-09-30, 08:50 AM
Supposedly, Windows was a million lines of source code a while ago, and it almost certainly hasn't shrunk, and is unlikely to do so in the future.

"Lines of code" is a somewhat irrelevant measure because what counts as a "line" is arbitrary and fungible.

That said, on that arbitrary and irrelevant measure apparently Google is about two billion lines to run all the search and datacenter stuff. A modern desktop operating system like Windows 10 or Mac OS is about 60-80 million.

shawnhcorey
2018-09-30, 08:59 AM
A few thousand lines. All it has to do is accelerate and decelerate. The life-support modules would take less than 10,000.

wumpus
2018-09-30, 09:26 AM
Two schools of thought:
"Software Engineering" becomes a real thing, and is engineered like any other engineering discipline. Actually this is already a real thing in highly regulated industries (Aerospace, medical, nuclear power) where waterfall is not only used but the only effective means of development (if you have to change the requirements, something is seriously wrong).

In this case it would be likely less than a modern windows box. Just many well crafted layers, with almost no bugs.

The other school of thought: "current software practice". This is what I'd expect baring some sort of religious crackdown/revolution/rebirth. I think Vernor Vinge included "Software Archaeologists" who could trace codebases all the way back to the mythical "DOS". In this case "LOC" would be as many as could be made, possibly limited only by how many an AI could produce.

This makes sense if you already expect to lose starships for absolutely no known reason, a software glitch destroying the thing and/or the crew would be acceptable. If you think this is unlikely, Tesla recently pushed a patch for the braking system on their cars. On the other hand, I'd expect enough cyberwars to occur before a real starship is produced that this method of engineering will be long since dead.

Berserk Mecha
2018-09-30, 12:25 PM
https://www.youtube.com/watch?v=T4kBRC2co7Y

" 'Bout two million " lines of code are mentioned in the first Jurassic Park movie. Not sure how 'complex' a fictional theme park in 1993 compares to an interplanetary spaceship a century from now, but I'm sure that dozens of millions of lines of code are believable for a starship's computer systems.

GloatingSwine
2018-09-30, 12:56 PM
The other general rule of thumb to consider is that the faster you want code to be, the bigger the codebase will be.

That happens because a lot of runtime optimisation is based on finding cases where the code is being inefficient by running through loops more times than necessary and writing a specific process for dealing with those cases.

The more such cases you find, and the more priority you place on execution speed, the bigger the code will get.

You can easily imagine systems that will want execution speed on even quite a "slow" starship. Most of the systems devoted to keeping a cargo of tinned monkeys alive in space will probably want to do their job pretty fast, for instance.

Telok
2018-09-30, 02:44 PM
I'll try to find the link later but NASA has a fair amount of open source stuff. Including the code for the Apollo missions. It's quite interesting, if you're a coder.

Generally it's going to depend on the complexity of the system that the code will control and the amount of flexability that system needs. For example life support could be quite simple if it's designed to monitor sensors, trigger alarms, and be an interface for users to control what are essentially a series of heat pumps and valves. If you want it to regulate some of that automatically I'd say it increases complexity by a factor of x3 to x10, depending on the level of automation. However that's considering only a single species environment and only using a single central system for control. Setting up for a distributed system of control nodes, each with it's own area but capable of taking over for others would probably be a x3 complexity factor (mostly for correctly figuring out that the other node is malfunctioning and taking over for that node). Having multiple different environments would depend on how it's set up, a generic system with setting files being run as it's own independent program for each environment may only be x2 or x3 the complexity again.

But again this is just considering life support as heat, air flow, a gas mix, and some gas tanks. That's only slightly more complex than an AC/heating system for a large office building and we're already at a range from 100k lines to 10 million lines. Oh, want a help system too? Remember Clippy? That was something like 25,000 lines and almost completely useless.

Next, hardening and security for your lifesupport system. Just because you can pretty much guarantee someone will fat finger a 50 ℃ or 90% O2 mix at some point or try to circumvent the website blacklist by going through a different system network.

Lvl 2 Expert
2018-09-30, 03:34 PM
If either a skeleton crew is awake or the hardware was designed well enough it could be done without any code. At the very least the long boring parts in between the stars.

If you gave every system its own AI because that makes it run at 100% efficiency, a lot of lines.

I think a good example of this kind of stuff is Deltar (https://en.wikipedia.org/wiki/Deltar), a computer used in the design of the Dutch dike works starting from 1960. It has no lines of code. It's an analog modeling station where electrical currents are used as a simulation of water currents. If the project had started in 1980 they would have used a normal computer, probably with tens to hundreds of thousands of lines of code. If they had started the project today they would start off with giving every employee a windows laptop and booking some time on a supercomputer, all in all involving hundreds of millions of lines of code. And that's actually the cheaper and faster solution now that those flexible systems exist. But you don't need them for complex tasks. If they had started in the 1930's they would have used scale models in tanks of water and gotten roughly the same results. A starship would be a big project, it costs a lot of money already, you could reasonably argue that a custom system, designed from the ground up, not relying on millions of lines of pre-existing code and possibly running no code at all, could be the preferred solution. As a bonus the ship is now unhackable.

But the most realistic bet might be to make an estimate of how much computing power and storage space an affordable system at that time would have, and assume they are going to fill that up with anything they can think of. Because if you can bring a holodeck, why not?

BeerMug Paladin
2018-09-30, 08:55 PM
This could vary quite a bit, from extremely huge because the code is meant to be utilized by any computerized technology which could be run on everything from coffee machines to starships. To entirely purpose-made code written only for starship hardware and thus excises of a lot of code that a starship would never use.

Although your question seems to imply that you're looking for a lowball estimate. That seems a lot harder to say, specifically because you'd have to ask what ship systems absolutely require computers to operate them. And in my view at least, the fewer systems you have that require computers to operate, the higher chance you have of still possessing a working starship at the end of your trip. So I'd heavily prioritize de-computerizing a starship's core functions.

So I'd want to design a starship with as many ship functions as possible operated by purely mechanical means. I would thus highly prefer the starships envisioned by sci-fi writers in ages before the electrical computer. Yes, zero lines of code is my answer. For a generation ship, at least.

Gnoman
2018-09-30, 10:14 PM
Pure mechanicals aren't necessarily more reliable than electronics. After a certain level of complexity, they become much less reliable.

OracleofWuffing
2018-09-30, 10:24 PM
Depending on the language used, the entire thing could be displayed on a single line. Practically any programmer would want to stab your eyes out if you did it like that, though, and good luck if you wanted to maintain that code. :smalltongue:

Anymage
2018-09-30, 11:37 PM
To add another wrinkle to this, our best AI nowadays doesn't really operate on lines of code because it's effectively grown in a way that our computer scientists can't easily follow what's going on inside it. It'd be like asking how many lines of code the brain runs on. You could get an idea how much memory an AI would take up, but it isn't in anything we can comprehend.

So for any important AIs, the answer is not applicable. Even if you try to run the whole ship on one overarching program, that would be rather silly; there's no reason for, say, propulsion and life support to be that strongly intertwined. So overall, it depends. If it's a subsystem complicated enough that someone would want to brag about its size and complexity, I'd say tens to hundreds of millions of lines sounds like impressive futuristic technobabble without being sprawling spaghetti code. The ship as a whole sounds more impressively large if nobody knows how everything works because no one person could possibly be involved with every subsystem. And for the really impressive stuff, "we don't know how it works, it just does" is simultaneously realistic and pregnant with plot possibilities.

BeerMug Paladin
2018-09-30, 11:40 PM
Pure mechanicals aren't necessarily more reliable than electronics. After a certain level of complexity, they become much less reliable.
I should have specified trying to limit complexity in general as the goal. Certainly, if a system cannot be simplified by de-computerizing it, then a computer (probably preferably without software) would be favorable. If that doesn't make it simpler, then opt for code.

jayem
2018-10-01, 01:37 AM
My post from yesterday didn't make it through, but I was guessing around 10million (with a lot of duplication) for basic functionality (I got that on the basis of 10,000 devices each with 10,000 lines of code). More or less giving you the equivalent of power steering and primitive cruise control on everything.
Putting them each on a future-Windows and allowing for a bit more functionality gives about 20million unique lines of code and 101 billion lines of code somewhere.

High level functions I think would be neural netty. We have 100 billion neurons, so is we give them a Tera-Neuron that should be a decent Andromeda esque computer. We can design it, make the neurons more analogue*, allow parts of it to be reconfigurable on the fly* and farm things that can be done more efficiently away (notably memory). So it would probably be able to be the equivalent of 100 full people.

Meanwhile for other info Wiki is 30Tb for everything (it's a few Gb for the current text). So that gives a decent memory of precedent, etc... for making decisions based on.

*both partially true for biological ones.

gomipile
2018-10-01, 01:40 AM
Depending on the language used, the entire thing could be displayed on a single line. Practically any programmer would want to stab your eyes out if you did it like that, though, and good luck if you wanted to maintain that code. :smalltongue:

"Well, good news, bad news. The good news is that the entire ship's operating system is condensed into 255 bytes of code."

"Holy hell, that small? What's the bad news?"

"It's written in Perl."

Telok
2018-10-01, 10:12 AM
I would suggest not using the Windows OS as a baseline. It's heavily bloated with a large number of things people rarely or never use, automated stuff that would be perfectly fine as manual choices, and putting things into different gui sets adds more code that does nothing but look different.

A better baseline would be a smartphone OS. It does everything an OS needs to do (plus a fair bit extra too) with less code, complexity, and lighter hardware requirements.

wumpus
2018-10-01, 10:42 AM
I would suggest not using the Windows OS as a baseline. It's heavily bloated with a large number of things people rarely or never use, automated stuff that would be perfectly fine as manual choices, and putting things into different gui sets adds more code that does nothing but look different.

A better baseline would be a smartphone OS. It does everything an OS needs to do (plus a fair bit extra too) with less code, complexity, and lighter hardware requirements.

Why in the world would you compare it to a smartphone? A starship is unlikely to be limited by power (especially if limited by the speed of light and current assumptions about momentum), and is likely to piled on centuries upon centuries of cruft.

Your real available models are:
windows, Solaris, and other old standbys that have accumulated tons of cruft over the years.
FAA (and similar) approved software that has harsh regulations making excessive features a real pain, but probably builds cruft upon cruft in that using previously approved features is cheap, writing (and getting approved) new features is not.

The scary thing is as the cruft and layers pile up, human written software will eventually approach more or less randomly evolved software (call it modern AI) in that the human written software relies on so many bugs that weren't intentionally put there that the humans don't really know how it works (I assume this won't be true for centuries, but it is certainly possible. It might even be coming close to possible with the google codebase).

Grey_Wolf_c
2018-10-01, 11:18 AM
This will depend on the starship, of course, and “code” will probably mean something unrecognizable after another century or two, if not earlier.

So what I’m thinking (optimistically) is a non-FTL starship in the mid- to late 21st century, something ponderous that takes decades to cruise between each star, most likely fitted out with sleeper pods or some other form of suspended travel. This would be at least as complex as an aircraft carrier, if not more so by an order of magnitude, and probably the same size or larger.

Given this, and assuming the “code” is something close to what we work with now, how many lines are we talking about? I know this can’t be answered precisely without actually designing and building a starship, but I’m looking for a ballpark estimate, just to get a feel for what might be involved.

...

Honestly, this question can be answered, but I suspect that the answer is meaningless to the intended use. Why do you want to know this? Is it to put in a novel, as a measure of the complexity of the task? Is it to ballpark the cost of programming the spaceship?

The bottom line is that there is no reason I can think of why this particular metric would ever be relevant. We don't measure code on the basis of the number of lines anymore, if we ever did. For one thing, as others have pointed out, some languages - such as C, and all the ones in its family - don't require new lines for operations. You can take a C program, remove all new lines, and it'll still compile and work. Total number of lines: 1. Heck, you might be better off counting number of rows of comments as a measure of complexity, if it weren't for the fact that I'm a cynic, and I expect that the more complex the code, the less the bastard that wrote it will have bothered to comment it.

So, if you tell us what this is for, we might be able to help a bit more. Complexity? I'd measure it in the number of subroutines, or the max size of the subroutine stack. Its memory requirements. The number of parallel threads it requires for operation. The number of operations per second. But not the number of lines of code. That is close to meaningless.

Grey Wolf

Lord Torath
2018-10-01, 01:33 PM
Why in the world would you compare it to a smartphone? A starship is unlikely to be limited by power (especially if limited by the speed of light and current assumptions about momentum), and is likely to piled on centuries upon centuries of cruft.

Your real available models are:
windows, Solaris, and other old standbys that have accumulated tons of cruft over the years.
FAA (and similar) approved software that has harsh regulations making excessive features a real pain, but probably builds cruft upon cruft in that using previously approved features is cheap, writing (and getting approved) new features is not.

The scary thing is as the cruft and layers pile up, human written software will eventually approach more or less randomly evolved software (call it modern AI) in that the human written software relies on so many bugs that weren't intentionally put there that the humans don't really know how it works (I assume this won't be true for centuries, but it is certainly possible. It might even be coming close to possible with the google codebase).The starships in All the Weyrs of Pern ran on DOS... And having just come out of an Orbital Mechanics class when I first read that book, the plan to stop the Red Star makes very little sense. The chemistry of the anti-matter drives also seems a bit off, both as to quantity and storage/extraction.

Psionic Dog
2018-10-01, 02:01 PM
Technically a starship wouldn't doesn't even need an operating system. If each system runs lean dedicated flight code where every function and conditional has been reviewed and justified you could have flight programs with just 1K-100K lines per system and perhaps a million lines total (maybe 2-3 million if redundant systems running the same code count twice).

For reference I work in the aviation industry and our (legacy) multi-function display doesn't use an operating system (or libraries) and at ~250,000 lines has the largest (legacy) flight program. Even then half the code exists to support custom configurations for every client who has ever paid extra for their favorite weather radar, display layout, etc to be supported. On the other hand our newest state-of-the-art solution has an order of magnitude more code.

A starship that runs systems-as-applications on shared computer(s) complete with an operating system will use several orders of magnitude more code, particularly if using machine generated code. If you add state of the art situational display rendering, in-flight entertainment for the maintenance shifts, and advanced machine intelligence(s) for biometic monitoring or what not then ten billion code lines would be a plausible count.

Tyndmyr
2018-10-01, 02:33 PM
Zero.

Seriously, the biggest function of a starship is to hold together for a long, long period of time. You don't technically need any lines of code for that...the biggest obstacle is getting the obscene amount of materials out of the gravity well.

Acceleration and deceleration timetables are fixed. You don't really need anything like code to interact with them. Likewise, on those timescales, you're relying on a homeostasis maintaining closed ecosystem, not code-based release of chemicals from tanks. If you've failed to balance the ecosystem, the people will die regardless of stockpile sizes or codebase.

Communication really doesn't matter. The time lag rapidly grows too large for it to be meaningful. Once you're on an interstellar voyage, there's nothing relevant to your trip that earth can convey to you. Anything visible to earth is visible to you far sooner.

Now, the actual number probably won't be zero. But the quantity actually necessary will be.

wumpus
2018-10-01, 02:48 PM
...
Honestly, this question can be answered, but I suspect that the answer is meaningless to the intended use. ...
Grey Wolf

Lines of code may tell you a lot about the culture that wrote it, how they wrote it, how concerned they were about bugs, but absolutely zero about how much work the computer is doing. MIPS isn't any better.


Technically a starship wouldn't doesn't even need an operating system. If each system runs lean dedicated flight code where every function and conditional has been reviewed and justified you could have flight programs with just 1K-100K lines per system and perhaps a million lines total (maybe 2-3 million if redundant systems running the same code count twice).

For reference I work in the aviation industry and our (legacy) multi-function display doesn't use an operating system (or libraries) and at ~250,000 lines has the largest (legacy) flight program. Even then half the code exists to support custom configurations for every client who has ever paid extra for their favorite weather radar, display layout, etc to be supported. On the other hand our newest state-of-the-art solution has an order of magnitude more code.

A starship that runs systems-as-applications on shared computer(s) complete with an operating system will use several orders of magnitude more code, particularly if using machine generated code. If you add state of the art situational display rendering, in-flight entertainment for the maintenance shifts, and advanced machine intelligence(s) for biometic monitoring or what not then ten billion code lines would be a plausible count.

Of course, it isn't unthinkable that the software development culture that builds a starship descends from the "build an app" culture and not yours. After hearing that Tesla pushed a patch on their ABS, I really wouldn't be surprised if SpaceX uses operating systems and similar "unnecessary" features.


The starships in All the Weyrs of Pern ran on DOS... And having just come out of an Orbital Mechanics class when I first read that book, the plan to stop the Red Star makes very little sense. The chemistry of the anti-matter drives also seems a bit off, both as to quantity and storage/extraction.

While DOS wasn't exactly designed with real time in mind, it is probably pretty effective as a real-time OS (largely because it *isn't* an OS, just a nonreentrant* interrupt handler). Not my first (or twelth) choice, but probably better than most of the OSes I've heard suggested by programmers who couldn't imagine programming a control computer without an OS (see psychic dog as to why you don't need them).

Thinking through the details, no, just no. You don't want to store your data on FAT. DOS machines tended to crash hard and often, leaving no reason for Microsoft to care about their own bugs. Nobody who had to deal with DOS and 16 bit Intel programming would ever suggest that the future would be DOS (even with a 32 bit extender it wasn't something you would want).

Storm_Of_Snow
2018-10-01, 04:01 PM
If you're going with a vessel maintaining itself while the crew is in hibernation, you'll need automated systems everywhere, to maintain life support on the pods, to maintain the power plant, for navigation and course adjustments, and so on.

If it's relatively easy to get the crew in and out of hibernation (say, hypersleep from Alien/Aliens), then you might be able to have the ship handle basic functionality, and wake the crew if there's anything that's outside it's capabilities (on the basis that if there's no information available, humans can and will take a guess, while computers will start throwing things like null pointer errors) - if it's a lot harder, you'll need to handle a lot more potential scenarios in code, you may need autonomous maintenance robots (whether that's something as complicated as R2D2, Skutters from Red Dwarf, DRDs from Farscape and so on, or multiple types of single function droids), which themselves would need code written, or likely a small crew awake while the bulk of the crew is in hibernation, or possibly all three.

There's also a question of what other systems the vessel has - for instance, is it taking astronomical observations during the voyage? Is it armed? If so, can it autonomously protect itself from anything, or is it only able to pick off navigational obstacles, while putting up shields and waking the crew as fast as possible in the event of hostile forces? Are there crew entertainment systems, that, while unconnected to the main control systems, still need to be included in the total code count? Is it (going back to Alien) also running some raw material processing systems or a manufacturing plant while in transit (the Nostromo's hauling an ore processing platform in the film, and a petrochemical refinery in the novel, but a colony ship might launch with raw materials loaded in order to get out to the world quickly in order to lay claim to it, and manufacture all of the tools, prefab-building components and so on, the colony needs en route).

And finally, system redundancy will multiply the amount of code - for example, aircraft autopilots are multiple systems, written independantly on different hardware to minimise the chances of a bug taking all of them out at the same time. Life support systems would likely need that kind of redundancy, but something like crew entertainment systems wouldn't.

Tyndmyr
2018-10-01, 04:09 PM
And finally, system redundancy will multiply the amount of code - for example, aircraft autopilots are multiple systems, written independantly on different hardware to minimise the chances of a bug taking all of them out at the same time. Life support systems would likely need that kind of redundancy, but something like crew entertainment systems wouldn't.

Generally not the case. Having five copies of a given system doesn't mean you write the code five times. You run the same code on each, with probably a bit extra for the failover system itself. An increase, but not one that scales linearly with the number of systems running it.

BeerMug Paladin
2018-10-02, 01:13 AM
I question what a life support system would even be on a spaceship meant to take a century transporting colonists to a planet.
Ventilation ducts connecting a hydroponics/farm chamber with living spaces and fans?

Rockphed
2018-10-02, 01:52 AM
Of course, it isn't unthinkable that the software development culture that builds a starship descends from the "build an app" culture and not yours. After hearing that Tesla pushed a patch on their ABS, I really wouldn't be surprised if SpaceX uses operating systems and similar "unnecessary" features.

This is part of why I dislike Tesla; they approach problems like computer scientists, not like engineers. If your program crashes, you might be out a significant amount of time to fix it and lost data from the crash, but it typically can't do any damage beyond that. If a vehicle has an error, it might take out 3 stop signs and a school bus.

As for computers on a starship, I imaging that at least some of them will be PLCs. Depending on what you want to control with them, PLC programs range from very simple to fairly complex. In my experience, it generally takes about 10 lines of code for every output from a PLC and about 5 for every input. So if you have a half dozen shuttles/landers docked with the starship, and each is held in place by 3 hydraulic clamps, you would need about 90 lines for telling if the clamps are in position, 60 for telling the clamps to open and close, and another 30 to tell if the shuttles are in position. Now, PLC programs are fairly simple, so that 180 lines of code is really not much, but it will add up fairly quickly. The nice thing, however, is that they are fairly good at monitoring things and throwing errors if things aren't working right (though most of those errors tend to be along the lines of "a sensor is bad").

Grey_Wolf_c
2018-10-02, 07:22 AM
This is part of why I dislike Tesla; they approach problems like computer scientists, not like engineers. If your program crashes, you might be out a significant amount of time to fix it and lost data from the crash, but it typically can't do any damage beyond that. If a vehicle has an error, it might take out 3 stop signs and a school bus.

Tesla is hardly the only car company that is approaching car manufacturer as a software business (https://www.wired.com/2015/07/hackers-remotely-kill-jeep-highway/). Most cars now have sufficient electronics that OS are needed, and the moment you have programmable code, you're going to have bugs, which means the need for updates. Tesla has just been the first one to set it up so the upgrades can happen over your house wi-fi - but I remember having to take in my old car (a Toyota) in to the shop for a recall that was literally just "we'll plug the car into a computer to update the code; done; you may go".

And honestly, you are being too generous with car design people. Old car pre-computers had significant design flaws that also could (and did) cause them to take out 3 stop signs and a school bus.

Grey Wolf

Frozen_Feet
2018-10-02, 07:27 AM
I found this handy graph. (https://goo.gl/images/fS3uFs)

Long story short, you probably could run a starship with few hundred thousand lines of code and processing power equivalent to a couple of Commodore 64s.

Even if you programmed the starship systems as applications for a general computer, done competently, you could probably do it with a few million lines of code, with processing power of a single Huawei smartphone.

pendell
2018-10-02, 08:25 AM
And honestly, you are being too generous with car design people. Old car pre-computers had significant design flaws that also could (and did) cause them to take out 3 stop signs and a school bus.

Grey Wolf

No Kidding (https://www.youtube.com/watch?v=-9GGDOUDLhc)

That was a joke in the 1970s but it was a joke about a serious problem (https://auto.howstuffworks.com/1971-1980-ford-pinto12.htm). I remember our 1978 Impala and the thing was utter garbage.

As to the OP, I think Psionic Dog's first post and Tyndmyr have the best answer: Surprisingly few if all you want them to do is actual flight control and other mission critical tasks. A modern PC is not a good comparison because a modern PC is a jack of all trades designed to support many different tasks by a general user. Even if you wanted Windows, you'd use something like Windows IoT (https://en.wikipedia.org/wiki/Windows_IoT), not the full Windows 10 OS. The difference between them is that with IOT you only deploy those features of the OS you really need to run, say, a Point-of-sale cash register or a refrigerator. That's assuming, as others have said, you need an OS at all.

I can well see carrying fully-functional computers on the spacecraft of the future but I'm not convinced they should be the flight control software, as opposed to merely connected to it. I would want the spaceship to be able to run in degraded mode, which should mean an absolute minimum computing capacity.

Respectfully,

Brian P.

Lvl 2 Expert
2018-10-02, 09:08 AM
And honestly, you are being too generous with car design people. Old car pre-computers had significant design flaws that also could (and did) cause them to take out 3 stop signs and a school bus.

Still, I can't get over this. There used to be a joke that went:
"If Microsoft built cars they would be twice as fast with half the fuel. They'd also stop working at completely random moments, but you'd just turn the engine off and on again and you could keep going."
And now that's actually how cars work. It's completely real.

(In a variant of the joke you close and open the windows. That one was slightly less accurate.)

Tyndmyr
2018-10-02, 09:56 AM
I question what a life support system would even be on a spaceship meant to take a century transporting colonists to a planet.
Ventilation ducts connecting a hydroponics/farm chamber with living spaces and fans?

Pretty much. Though you may want to rely on temperature, etc for circulation instead of fans. Most fans ain't gonna survive a century, so significant maint would be necessary. The more active systems you can replace with passive systems, the better.

Life is pretty good at passively acting as a gas exchange, but has the disadvantage of being reasonably complicated. Setting up a long term self sufficient ecosystem is a fairly significant problem. Still, when you're talking journeys of that length, simply taking all the air with you isn't reasonable, and active systems also get complex, and are not self replacing.

Rockphed
2018-10-02, 12:44 PM
Pretty much. Though you may want to rely on temperature, etc for circulation instead of fans. Most fans ain't gonna survive a century, so significant maint would be necessary. The more active systems you can replace with passive systems, the better.

Life is pretty good at passively acting as a gas exchange, but has the disadvantage of being reasonably complicated. Setting up a long term self sufficient ecosystem is a fairly significant problem. Still, when you're talking journeys of that length, simply taking all the air with you isn't reasonable, and active systems also get complex, and are not self replacing.

There is a vast gulf between "take all your air with you" and "set up a completely self-sustaining ecosystem". Active components to control gas levels is one option. Having a bank of plants that you feed to your crew is another. I think for any system that isn't a completely self sustaining ecosystem you will want and need a computer to keep watch on gas levels and temperature and sound an alarm if things start to leave normal levels. Actually, even for a self sustaining ecosystem you probably want a monitoring computer.

Sermil
2018-10-02, 09:52 PM
In the International Space Station’s U.S. segment alone, more than 1.5 million lines of flight software code run on 44 computers communicating via 100 data networks transferring 400,000 signals (e.g. pressure or temperature measurements, valve positions, etc.).

Source: https://www.nasa.gov/feature/facts-and-figures

It's not going to be less than that.


After hearing that Tesla pushed a patch on their ABS, I really wouldn't be surprised if SpaceX uses operating systems and similar "unnecessary" features.


SpaceX uses Linux (https://space.stackexchange.com/questions/9243/what-computer-and-software-is-used-by-the-falcon-9). Why not? You need some framework to deal with all the processes and drivers running, and Linux is a pretty solid system. (And can be modified if necessary)