How could the early Unix OS comprise so few lines of code?
retrocomputing.stackexchange.com
How could the early Unix OS comprise so few lines of code?
1–10 of 170 posts
Re: How could the early Unix OS comprise so few lines of code?
#2The original Unix provided one implementation for each subsystem. They relentlessly simplified the problem they were solving to make it doable.
Re: How could the early Unix OS comprise so few lines of code?
#3Re: How could the early Unix OS comprise so few lines of code?
#4This idea is completely gone from the world of software engineering. Systems become overloaded with the implementation of every crappy idea under the sun -- if a PM in a fever dream can think of it, and an overworked dev can hack it together, it goes in.
Re: How could the early Unix OS comprise so few lines of code?
#5I think mindset plays a role as well. Back in the day, there was a restraint on adding features, at least when they would make the logic more complicated for only a tiny or imagined benefit. Part of that was memory/storage limitations. But I think the pursuit of an abstract idea of elegance was equally important. After all, these systems were primarily written for other computer people. This idea is completely gone f…
Re: How could the early Unix OS comprise so few lines of code?
#6I think mindset plays a role as well. Back in the day, there was a restraint on adding features, at least when they would make the logic more complicated for only a tiny or imagined benefit. Part of that was memory/storage limitations. But I think the pursuit of an abstract idea of elegance was equally important. After all, these systems were primarily written for other computer people. This idea is completely gone f…
Re: How could the early Unix OS comprise so few lines of code?
#7Answer: smaller target to cover! Modern Linux has most code in device drivers to support so many different devices. Then, it supports many targets for other subsystems, like file systems. The original Unix provided one implementation for each subsystem. They relentlessly simplified the problem they were solving to make it doable.
Or to be more precise, they had very different trade-offs to make. Back then, you could have a system call and context switch for every read and live with the overhead.
Today we have something like io_uring.
Re: How could the early Unix OS comprise so few lines of code?
#8Answer: smaller target to cover! Modern Linux has most code in device drivers to support so many different devices. Then, it supports many targets for other subsystems, like file systems. The original Unix provided one implementation for each subsystem. They relentlessly simplified the problem they were solving to make it doable.
Re: How could the early Unix OS comprise so few lines of code?
#9Answer: smaller target to cover! Modern Linux has most code in device drivers to support so many different devices. Then, it supports many targets for other subsystems, like file systems. The original Unix provided one implementation for each subsystem. They relentlessly simplified the problem they were solving to make it doable.
39,000 certs 0.0%
40,000 usr 0.0%
164,000 init 0.0%
240,000 virt 0.0%
250,000 ipc 0.0%
459,000 io_uring 0.0%
664,000 rust 0.1%
980,000 samples 0.1%
1,885,000 block 0.1%
2,850,000 scripts 0.2%
2,953,000 security 0.2%
3,609,000 crypto 0.3%
5,165,000 mm 0.4%
7,156,000 lib 0.5%
12,420,000 kernel 1.0%
33,047,000 net 2.5%
39,916,000 include 3.1%
43,224,000 fs 3.3%
45,001,000 sound 3.4%
54,988,000 tools 4.2%
107,971,000 arch 8.3%
943,527,000 drivers 72.2%
Based on rough byte count (total 1,306,548,000 bytes in the above).Re: How could the early Unix OS comprise so few lines of code?
#10It was essentially a "time-sharing" system that multiplexes interactive sessions of multiple users on teletype terminals. The "shell" handles such a session by waiting for user input on the terminal, interpreting it and starting external programs as a sub-hierarchy of user processes. On a teletype terminal, you couldn't even have a cursor-oriented editor like vi, but had to rely on line-oriented editors like ed and s…