• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

What is the Operating System?

amirm

Founder/Admin
Staff Member
CFO (Chief Fun Officer)
Joined
Feb 13, 2016
Messages
44,602
Likes
239,921
Location
Seattle Area
You have heard the names: Windows, MacOS, iOS, Android, Linux. These are all examples of very popular operating systems. Question is, what is the function of an operating system? Why have they become the essential component of our computing world and more so, our home electronics?

The operating system is specialized software that sits between your computer hardware and the applications that run on top of it. The motivation for creating it was to make it easier for software developers to write their programs. By isolating the programs from the hardware, the job of the software developer was made easier. And importantly, programs could more readily be moved from one hardware platform to another. Think of how you can install the same software on multitudes of Mac or PC hardware. Without the operating system, the application would have had to know how to “talk” to each specific piece of hardware and if you changed that, it would stop working.

165px-Operating_system_placement.svg.png

Even though the operating system is a fundamental part of your computer, it is not the first thing that runs. That job falls on another piece of code built into your computer hardware called the “boot loader.” The boot loader’s essential function is to locate the operating on the default storage device (hard disk or flash). Once there, it loads it into memory and then passes the control to it. At this point you usually see the logo of the operating system as it goes through its housekeeping chores before giving you control to use the system.

Modern operating systems allow multiple concurrent applications to load and be active at the same time. We call this “multi-tasking.” One of the key requirements here is to make sure each application thinks it has the entire computer dedicated to it. That way, if one program crashes, it can’t bring down the rest with it. And importantly, not allow a program to peer into another as to steal any sensitive information (think your password as you type it into another program). This partitioning is an important feature provided by the operating system.

Understanding the operating system requires knowledge of the hardware and more specifically, that of your computer CPU. The CPU has what is called a privileged mode which is active by default as your computer boots. This means that the operating system runs its code as privileged. The best way to understand what this mode does is to look its opposite. If the privileged mode is off, the software that is running cannot communicate with the computer hardware. If it for example attempts to directly read the bits from the hard disk rather than nicely asking the operating system, the CPU stops it and complains to the operating system. This in turn will cause the application to be shut down. We call this a “program fault.”

In addition to above restriction, non-privileged application code can only see the memory that it occupies. If it attempts to peer into the memory that it does not own, such as that of the operating system or other applications, it will again be forcefully shut down. Sometimes this occurs not because the application is trying to be malicious but due to some bug (software defect) that causes the application to access memory it doesn’t own resulting in its demise.

As implied, the operating system has none of these bounds. It can freely access all the hardware as it pleases. It is also all-seeing in that it can peer into any application that is running although it does not usually attempt to do that.

You may know that DVD copy protection was breached years ago. It is reported that the motivation for doing so was to enable playback of DVD on the Linux operating system. No, I did not change topics all of a sudden. Believe it or not, the reason DVD was hacked this way was due to the explanation I just gave on how the operating system can see application data. The reason requires digging a bit deeper into this story.

Content on DVD is “scrambled.” A key is used to reverse this scrambling allowing the player to get at the audio and video streams to decode and play them. It is the responsibility of the DVD playback application to hide this key sufficiently from the people trying to discover it. The second part to the story is the Linux operating system. Linux is “open source” meaning anyone can download the pieces to it and create their own version of it. Now let’s put these two pieces together. If the operating system can see inside any application it runs – such as the DVD player – and I am allowed to build my own version of the OS as is the case with Linux, there is no effective security. I can easily make those modifications to Linux, steal the key and distribute it to the world to bypass DVDs.

Because of this known limitation of Linux, no implementation existed for a DVD player on top of it due to liability arising from its secrets getting out. The story goes that the Norwegian programmer Jon Lech Johansen was frustrated by this fact and went searching to find the keys as to enable anyone then to build a DVD player for Linux. Turns out the job was not that hard as a software DVD player called Xing had done little to hide the key allowing him to discover it. He published the keys he discovered and with it, enabled an army of underground software developers building all manner of DVD “rippers” and players. Just when you thought the topic of operating system had nothing to do with audio/video!

Sometimes an operating system is not what it seems. Case in point is Android. You probably think Android is an operating system but it actually is not. If you have an Android device, the operating system is actually Linux underneath! Linux performs all the core functionality that I described earlier. What you know as Android is “middleware” which is yet another software layer between your applications and the Linux operating system. Linux by itself does not have a graphical interface, has no support for touch or voice interface, marketplace for downloading applications, etc. All of this is and then some is provided by Android. Think of Linux as the engine the in the car, quietly powering the system, and Android as everything else that makes a car. The terminology we use in the industry is to refer to the role Linux plays as the “kernel.” This is to distinguish it against the system applications and middleware running above it.

In the old days the kernel was “pure” in that it provided the core functionality that was needed but no more. This provided rock solid isolation between the hardware and applications resulting in high level of reliability as applications could never cause the system to crash. That line has been blurred in the case of features such as graphics and video decoding/display support in Windows. There, in the interest of providing maximum performance for games and multimedia applications such as video, direct access is allowed to the hardware for application programs. The down side is that applications can perform functions that could cause the entire computer to crash.

The kernel software is written in a programming language just like the applications. Its functionality though is quite specialized and requires extensive knowledge of its architecture and that of hardware. Modifications of it is challenging in that slightest mistake can cause the system to crash altogether. Contrast that with bugs in the application programs where just that program dies and your computer keeps going. Not so when the kernel faults.

Complicating the life of the kernel developer is that when something goes wrong there, it can manifest itself sometimes days or even months later! Imagine if you print one document and some piece of memory is corrupted after the printing is done. Nothing goes wrong then until you try to print another document a week later and bam, the kernel crashes. You think that is what caused the crash but in really it was an operation much earlier. I say that from personal experience, having had to trace kernel failures that took me weeks to trace.

How about a bit more on the history of operating systems? As I mentioned earlier, Android is based on Linux. Turns out because of that, it is actually a cousin of MacOS! The kernel that MacOS is based on is called Mach. Mach was developed at Carnegie Mellon University as a derivative of another operating system called UNIX. When the late Steve Jobs left Apple years ago, he started a company called NexT which used Mach for the workstations they were designing. Later when his company was bought and he returned to Apple, Mach became the kernel for the Mac OS, modernizing it and giving it such essential features as multi-tasking. For its part, Linux was also a variation of UNIX written from scratch to avoid needing a license to the original source code for UNIX which at the time, belonged to the then dominant phone company in US called AT&T. So putting it altogether, both operating systems trace their roots to UNIX.

I started my career in 1982, working on the UNIX kernel just as the operating system was taking off to power computers from mid-tier to high-end. I remember printing out its almost entirely undocumented source code and studying every line of trying to understand it. The listing was 250,000 lines of code and created one massive book, probably weighing some 20 to 30 pounds. I would carry that under my arm to work and home every day. I would spend most of my free time hand documenting its secret on that printed book. Thankfully I was married by then so I did not have to worry about looking like a textbook geek! As challenging as that work was, it was extremely rewarding both from the thrill of fixing and optimizing it but also giving me a solid foundation to understand the operation of our computers.

By the way, 250,000 lines may sound like a large program but in today’s world, it is nothing. The “little” media player application that ships as part of your operating system likely clocks at a million lines of code! Modern operating systems are beasts and have incredible breath of functionality and code to support them. With literally thousands of people working on them every year, they keep growing in an attempt to keep up with the latest hardware technologies and expectations for what an operating system should do. Despite that, the core concept of what they do is not hard to comprehend as I just explained.

An interesting development in operating systems is extensive use of them in consumer electronics devices. It used to be that TVs and DVD players were pretty simply devices and did not have an operating system. Today, they have so much functionality akin to a smaller computer that they almost always run an operating system with that choice almost always being Linux. This is why it takes a while for your equipment to turn on and shut off. It is the kernel booting and shutting down!
 

dallasjustice

Major Contributor
Joined
Feb 28, 2016
Messages
1,270
Likes
907
Location
Dallas, Texas
Are drivers like ASIO, a kernel software? Is that a different type of code from the OS itself?
 
OP
amirm

amirm

Founder/Admin
Staff Member
CFO (Chief Fun Officer)
Joined
Feb 13, 2016
Messages
44,602
Likes
239,921
Location
Seattle Area
ASIO is an interface specification for a driver. The driver itself would be in the kernel and it would expose this language or method of calling it to send or receive data. An appropriate application that understands the same interface can then play music or capture music with it.

ASIO was the property of Steinberg. As such, despite is popularity we could not ship it as a standard default in Windows (i.e. patent/IP issues). So we designed a new interface called WASAPI.
 

Blumlein 88

Grand Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
20,706
Likes
37,449
Kudos on WASAPI. It does allow me to easily get bit perfect output with several pieces of software in Windows and various devices for outputting audio.
 

600_OHM

Active Member
Joined
May 19, 2022
Messages
162
Likes
119
Very nice writeup. For us *nix nerds, I still like to put a shout-out to the microsoft engineer (at the time doing Xenix) who brought us the simplicity of muxing terminals by just ALT-F1, ALT-F2 and so forth.

I like to remind guys that go on an anti-microsoft rant that when they switch VT's, a little bell goes off at that engineers desk somewhere. :)

OR, go back to the days of putting processes in the background and foreground in the only single terminal available to you - in and out, in and out, what a pain.

One of my all time favorites is going back to the birth of timesharing at MIT, with CTSS operating system. Imagine that, YOU interacting with the computer directly, instead of handing cards to an operator and coming back - the NEXT day - to see if your program ran! :)

I'll spare everyone the whole history of CTSS > Multics > Unix...


Actually another treasured one - from ATT, here some of the major players are shown - the guys who brought us "Research Unix", (Dennis Ritchie, Ken Thomson, Douglas McIlroy + a few more) and the other guys doing internal forks like PWB (Brian Mashey) - who had "real work" to do beyond the research version, and Lorinda Cherry who worked on the BC and DC calculators with Bob Morris. Much of this a bit before the split.

Anway, this should be 27 pages long but not appropriate for here. It's a neat vibe. It's about how much they left-out (a jab at multics) as it is as much as they put in.

 

600_OHM

Active Member
Joined
May 19, 2022
Messages
162
Likes
119
Another operating system that gets overlooked and lost in history: DTSS - the Dartmouth Time Sharing System

Most closely associated with the BASIC language. DTSS, written by *undergrads* was the support system for wide-area campus and remote use of that language. At that time, it wasn't a commercial consideration, but an educational one and wasn't "protected". Many manufacturers snapped it up and put it into their products and tweaked it (Wang, DEC, GE, et al) long before Bill and Paul got to play with the internals on a PDP-10 mainframe at C-Cubed. Ahem. It wasn't *meant* to be turing complete, but something us coffee-sipping, finger-snapping, bongo-playing readers of Jack Kerouac could relate to, and get our man-machine thoughts together with.

BASIC (and DTSS OS) is widely misunderstood for the cultural impact it had on us. Not just because of BASIC, but the mere fact peasants and non-computer specific people were allowed to program and interact with it. Heresy! Only white robed priests and priestesses were allowed to use computers!

Had this not happened, culturally today you would have had to present your Doctoral Phd thesis to Armin before being allowed access to ASR!


Power To The People !!

It is along these lines that what YOU are interacting with now, owes part of it's existence to a long ago progenitor called "Community Memory". Basically a remote SDS 940 computer initially set up for this communal crew by non other than L. Peter Deutsch (mr ghostscript among other things). The SDS 940 was *also* famous for being the machine that was part of the canonical "Mother of all demos". Again, a bunch of liberal thinkers that were trying to bring computers to YOU, and not have them live behind corporate glass doors.

 

NiagaraPete

Major Contributor
Forum Donor
Joined
Jun 23, 2021
Messages
2,193
Likes
1,961
Location
Canada
Awesome, thanks for sharing.
 

600_OHM

Active Member
Joined
May 19, 2022
Messages
162
Likes
119
Awesome, thanks for sharing.
Please don't encourage me or you'll get more! :)

These days we are so market driven (this vs that, what is best or better), that the cultural significance can get lost. Especially when the TWO tracks of professional vs amateur were on a converging path...
 

600_OHM

Active Member
Joined
May 19, 2022
Messages
162
Likes
119
The historical significance of CP/M operating system ..

Yeah we all know this history right? Prof Kildall vs Gates the businessman yadda yadda....

True enough, the guys at the homebrew computer club were doing outstanding things. BASIC of course was right there, whether it was Gates' mbasic, Eubanks C-basic, or Tom Pittman's tiny basic. Still this was the realm of the nerds like me. See the link between say Lee Felsenstein and Community Memory mentioned above? It's those ideals of the early-mid 60's still living on!

But had it not been for Gary Kildall, who had the will to drive micro-processers (as compared to say DEC mini-computers of the era which were unobtainium to you and me) forward beyond just being used for calculators, clocks, microwave ovens and so forth, we might still be living with computers for the average person behind glass doors again.

There is way more to the story than can said here, but the point was that culturally, many realized that the underlying operating system was more important to being used as an "application launcher", rather than being the ideal dream world of people writing their own basic programs or shell scripts. Yeah, you could write in basic, but that was comparatively small to marketing which was pushing games or apps like Wordstar and proclaiming that you were now computer literate. Or at least your grandma thought so. :)


I even had some OG's looking down on me. How DARE you have fun!

(Get your total nerd award if you can answer this question: What language did Gary Kildall use in many of his projects, other than pure assembly language? Why PL/1 (subset g), which just so happens to be a subset of the PL/1 language used for Multics! Gary further refined that into the PL/M language for microprocessors. Initially spec'ed out by Doug McIlroy of ATT research unix fame!)

The total irony of using a mainframe high-level language like PL/1 used in Multics for system-level programming, and adapting it for microprocessers by whittling down subset-g didn't escape my attention. Brilliant.


 
Last edited:

600_OHM

Active Member
Joined
May 19, 2022
Messages
162
Likes
119
Things are starting to converge - the ITS or Incompatible Timesharing System.

Essentially the antithesis of the button-downed serious nature of the earlier CTSS (which morphed into multics) by a group of guys having none of this. ALL that mattered was you and the machine.

Simple common-man idealism from Dartmouth, or potential commercialism of Multics on the same campus at MIT (but on a different PDP-6/10 mainframe located nearby), ITS was attended to by guys on a whole different plane who simply didn't care about either.

We're talking guys doing Artificial Intelligence, getting their TRON on by becoming one with the machine and programming in assembly language or LISP. There was no "high level language portability" concern here.

One of whom was Richard Stallman, as a sysop and co-architect. Notable for Emacs, Lisp Machine fiasco, and the forthcoming GNU project. Sleeping behind the racks? Cool man.

 

NiagaraPete

Major Contributor
Forum Donor
Joined
Jun 23, 2021
Messages
2,193
Likes
1,961
Location
Canada
Please don't encourage me or you'll get more! :)

These days we are so market driven (this vs that, what is best or better), that the cultural significance can get lost. Especially when the TWO tracks of professional vs amateur were on a converging path...
I was referring to the OP. Sorry.
 

600_OHM

Active Member
Joined
May 19, 2022
Messages
162
Likes
119
And finally (yay!) the kernel-hackers.

Waaay too many offshoots, threads and people to cover this adequately to give them all their due. If you avoid the marketing and fan-boy'ism, it makes for an interesting historical thread to what's in front of you today. Most probably already know this.

Very quickly - and apologetically entirely incomplete - we've got the kernel hackers at OUR level. Not the guys still working with VAX/VMS / Unix minicomputers, but the lowly 386 uP.

First up: William Jolitz - 386BSD. (BSD being a Berkeley Software Distribution of the ATT research unix code), and kinda' sorta' like Gary Kildall trying to bring Unix to perhaps serious students, not necessarily gamers or app-launchers.


And of course Linus. Well known, but consider that when he started working on the kernel, this was pre-internet days. He may have had exposure to the BSD unix system binaries at university, but even then, access does not imply getting your hands on the source. Information could easily be haphazard or locked-down by system administrators protecting the source license.

"NO, you cannot see the BSD source - get away from me LUSER. Go back to Minix". (my quotes)

Anyway, we know where that led. A kernel hacker incorporating the gnu userland to make a working system. AND, unlike perhaps the desire for a more strict collegiate level user-submission process like in 386BSD, as long as your code works - it goes in!

Kind of the "ITS" o/s vibe. If you got the chops, you can play.

Whew - done. Sorry for all the hot air.
 

600_OHM

Active Member
Joined
May 19, 2022
Messages
162
Likes
119
Tip o' the hat to the PR1ME o/s and their beloved Australian commercials!

(and of course the AUUG. Simultaneously put Unix on an Interdata 7/32, while ATT was doing the same with an Interdata 8/32 proving the portability concept on alien hardware! Not knowing each was doing this!)

I suppose one could put RATFOR on the PRIME's and get their unix kicks that way, but we're going waaay off topic.

 

anmpr1

Major Contributor
Forum Donor
Joined
Oct 11, 2018
Messages
3,739
Likes
6,450
One of whom was Richard Stallman..., Notable for ...the forthcoming GNU project.
Is anyone still waiting for the latest version of HURD? Say what you will about him (and he is a polarizing figure), he's always been pretty consistent with his software oriented views. At least as far as I know.

Years ago I volunteered at GNU, updating their Website as required (I think we used Apache Subversion). My interactions with him (email) were always positive. I once misspoke, attributing something to Stallman that was actually from Eric Raymond, and he just let it pass without comment. For me it was easy to confuse RMS with ESR.

ep000.jpg
 

JeffS7444

Major Contributor
Forum Donor
Joined
Jul 21, 2019
Messages
2,363
Likes
3,547
Is there any reason why a future version of Windows couldn't have the look, feel and functionality that people expect from Windows, but be built upon the Linux kernel and other free software, much like Mac OS already is?
 

anmpr1

Major Contributor
Forum Donor
Joined
Oct 11, 2018
Messages
3,739
Likes
6,450
Is there any reason why a future version of Windows couldn't have the look, feel and functionality that people expect from Windows...
There are reasons, but they might have to kill you if they told you.

Latest MS earnings were down (what isn't?), and shares dipped. One of the 'investment' news sites I checked had some funny comments. Even if you're a MS fan, you'd have to agree they are pretty funny. And who can deny that we need more humor in the world? [Personally, with their cock-lock on the desktop OS and the Office apps, plus the government angle, I wouldn't be too worried about their 'long term' profitability. But who knows the future? Even Criswell didn't get it right all the time.]

Blue Screen of Death works both ways.

Microsoft... is that still a company...? Didn't they produce vaccines... something like that...

I think they only produce the virus.

They're still there. They used to write software. Now they sell advertising... everyone is advertising to everyone else.
 
Top Bottom