Friday, Aug 7 2020

Embrace the Penguin Within

Learning Linux is a wonderful thing, it is second only to mastering it. Aside from challenging yourself to newer heights, you will acquire some universal concepts and ideas that are fundamental to computer scientists (a good example of this is Regular Expressions which will be addressed in later articles). Let’s begin! We do this by forgetting everything you know about Linux and prepare to do some deep thinking as you read through the next few articles.

Linux as a Platform-Independent Operating System

I am a Linux user and administrator; I am not a Linux historian. If you want some history about how the OS came into existence or want to complete your little school project about Linus Torvalds then you will need to look elsewhere. Having said that, we can begin praising this OS by understanding its advantages. For example, we can be happy that Linux will run on a multitude of families of processors. If you are a Windows user, you are probably running your Windows on an Intel clone CPU. This means that your Central Processing Unit (most likely an Intel or AMD processor) is backwards compliant with the original 8086 processor that Intel designed almost 2 decades ago. This is by far the most famous series of microprocessors used today. Any CPU that is backwards compatible with the original 8086 is classified as an “x86” CPU. The x in x86 is a pseudo-wildcard used to imply any chip that came after the 8086 (they include 8088, 80286, 80386, 80486, Pentium, Pentium II, Pentium III, and Pentium 4. This also includes the AMD chips and other Intel spin-offs such as the Pentium Pro and the Celeron). The x86 family of chips is in no way the only set of chips available out there. Other families include Alpha (a chip designed by Digital Equipment Corporation and that is powerful enough to run Windows NT), the m68k, the infamous Motorolla chip that powered years of Apple Macintosh, the MIPS, the PowerPC, and last but not least, the SPARC processor that is commonly used by Sun Microsystems which powered the UNIX Solaris Operating System for so long. The vast majority of people will neither own nor hear of any chip other than the x86 family. The x86 is responsible for powering all home PC’s and the majority of Internet servers out there. The x86 family is an ideal choice for a platform because of the abundance of hardware and inexpensive price. This means that anyone with a pile of x86 junk in their closet can build a low-end machine that can power their home practice server. This concept was the driving force behind the design of Linux.

We promised no history but we had to give a little background on where the important chips that power Linux came from. A few weeks or months down the road, when you’re compiling your first kernel, you will probably wonder which architecture your server is based on. Only then will you remember that educational article you read on

What does having a platform-independent Operating System really mean anyway and why should you have to care? The answer is easy, platform-independent OS means that you can install and administer your favorite OS and applications across all sorts of hardware! More simply put, you can run Linux on anything. Once you master it, you shouldn’t care about what CPU you are running it on, it’s all the same to you – the end user.

Linux as a 32-bit Operating System

Many skeptics would think that a platform-independent OS must imply sacrifices. Usually the sacrifice comes in the form of performance degradation. Not true with Linux as it is a full fledged 32-bit OS. Be warned that this concept will be very confusing to many and does not need to be fully understood to have a practical knowledge of Linux. Nevertheless, for those willing to expand their knowledge of computer in general, it is a must have. I bet a few might be salivating from the anticipation. To unveil the mystery behind this, the concept of 32-bit will be addressed and clarified once and for all. A typical modern x86 chip such as the Pentium family is a 32-bit CPU. This means that each internal register (smallest data storage units achievable that are lightning fast and extremely small – they are built right inside the CPU core) are 32 bits long. This means you can store 32 bits of data in each register. What is a register used for and what can you do with a measly 32 bits anyway? Well, registers are most commonly used to store the memory address of relevant data. In other words, the CPU needs scrap paper (System RAM) to do all its work and it needs to remember where it is writing things so it can look them up and read them later. To do this, it read/writes data to the memory that is pointed to by the location stored inside the CPU registers. Think of it this way, imagine having a notebook where you will be writing all your stuff. Now as you write your information on that notebook, you remember the page numbers of the pages you need frequently so you can easily flip through them and find your data quickly. If you could remember up to ten page numbers in your head, you would be the equivalent of a CPU with ten registers, each one able to remember one page number. The bigger the registers are, the bigger the page numbers it can remember. This does not mean that it can remember more pages, only that it can remember higher page numbers. In other words, a 16-bit processor will remember pages 0 through 65536 (216) while a 32-bit processor can remember page numbers in a book with over 4 billion pages (232)! Back to reality where our notebook is really RAM, we were taught that more RAM in a system leads to better performance. That concept can make more sense now because we know that a 16-bit CPU can only make use of 65536 bytes of RAM (yes, that’s only 64k of RAM) while a 32-bit CPU can address the full 4 Gb of RAM.

Of course older 16-bit OS’s such as DOS did manage to address more than just 64k of RAM using segment/offset techniques (which is not very relevant right now) but being able to naturally talk to up to 4Gb of memory is a definite advantage. Our CPU can flow better by having thicker datapaths and our OS knows how to make use of them to maximize efficiency.

Closing Words

Being platform-independent and being a 32-bit OS are two huge and often neglected strengths of Linux. Your job today is to know of them for your future cocktail party. I recommend you these facts deep in the back of your head for that one day where everything comes together into a giant intellectual fireworks display.

Article by