Sage-Code Laboratory

Operating Systems

An operating system is a special kind of computer program that manage computer resources and is the first program that run automatically when a computer is starting. More precise, an operating system is a platform that is preinstalled on your computer when you buy it from the store.

Features

We use an operating system for its features and functionality. Without an operating system the computer is stupid and difficult to use. The only thing you can do if a computer do not have an operating system is to install one. This is happening if you just made a computer or if your computer is a professional server not a PC.

Inventory:

Next there are some important features every operating system must have. Some operating systems have more features than others, but most features are common. They may be implemented differently, using different encoding techniques and may not be compatible to each other.

Feature Description
File system A database used to organize data storage
Graphic system Used to display information on screen
Network Used for communication between computers
Device drivers Used for managing internal and external devices
Tools Utility programs for managing files, folder and configuration
Applications User-created programs or scripts
Package managers Used to install/uninstall programs

Graphic

A graphic system consist of video card, display and software that can display pictures, graphics and text fonts. This can make a computer screen look great and easy to use. We interact with graphic system using keyboard and mouse.

Most operating systems have a graphic system. This is what user can see after the operating system is fully loaded. Android, Chrome, Windows, MacOS by default load a graphic system. Linux server usually start in command prompt or console. However a Linux desktop edition usually have Gnome or KDE graphic system installed.

Mac OS

On Apple laptops and also on desktops, if you are curious to go to a Mac shop you will see that it looks very differed than Windows. This is because Mac OS is using a proprietary graphic system: Mac OS X. It looks a little strange for a Windows or Linux user. Not necessary better but different.

Windows

Mac OS

Windows

In the Windows the file system can be observed and organize using Windows Explorer. In Windows you can have several disks, each disk has associated a letter: (C: D: E: F: G: H:). Each disk is organized in folders similar to a file cabinet used in older offices. This is why we call things folders and files. There are no drawers but every disk could be considered like a drawer.

Windows

Windows

Gnome:

This is an open source graphic system used by many Linux distributions. That is curious no? Linux operating system has this ability to use common subsystems because all distributions are using the same "kernel". Linux kernel is a small part of Linux that do not have a graphic system.

Gnome

Ubuntu Gnome

Boot sequence

A new computer has a special program that is called BIOS. This program is stored in electronic components installed on motherboard. You know probably that BIOS = Basic Input Output System.

Once the BIOS is started computer can do basic input and output operations. So the computer can search the storage devices: CD-ROM, DVD, PEN-DRIVE, HARD-DRIVE.

Operating system is stored on one of this devices. The computer can look for the operating system on any of this devices and if it found one it is loading the operating system in memory and execute the operating system. Then the computer become really smart.

Storage

One of the most important job of the operating system is to organize information on storage. This can be internal storage or external storage. The storage is permanent and do not lose information when the computer is off power.

On a computer you can have multiple storage devices and each device can have a different file system. For example CD-ROM or DVD- have a special file system and is different from HARD-DISK or Floppy-DISK.

File system

Operating systems organize files using an internal embedded database. Files are organized into a tree that has a root and folders. Folders can have other folders and files. File names are registered as records in this tree.

The most common file systems are known as:

My favorite FS is XFS and most popular is EXT4. This is for stability and good performance with reduced resources.

Security

File system is secured against unauthorized access. An administrator can create roles and users. Then can grant or deny access to folders and files. The security system is depending on the operating systems.

Linux has better security than Windows. Operating systems have predefined folders with different security properties. For example every user can write only in its own home folder but can read all other folders.

Password

Users must use a password to access a computer. When computer start or exit from sleep mode user may be asked to Log In using his password. Unauthorized users can’t have access if they do not know this password.

One user is the administrator. On Linux there is a super administrator with name: root If someone know root password can have access to all files in the computer. Therefore the administrator must keep the root password always safe.

Popular systems

In the list below, I have ordered operating systems by popularity. Notice, for commercial purposes Windows may have different features by the price you pay. Other operating systems usually have only one distribution, except Linux that have many distributions and versions.

  1. Windows
  2. Linux
  3. Mac OS
  4. Chrome OS
  5. Android
  6. Free BSD

Linux Distributions

Linux distributions are so many I can not count. When you chose a distribution you must be a Linux guru. So I will not recommend any distribution since I do not know what is going your use-case. Usually a Linux is installed on a server but there are laptops with Linux pre-installed.

Name Link Description Use-cases
Linux Mint Linux Mint is a Linux distribution based on Ubuntu. It is a popular choice for users who want a stable and user-friendly operating system. Linux Mint is a good choice for users who are looking for a Linux distribution that is easy to use and has a wide range of software available. Desktop
Ubuntu Ubuntu is a Linux distribution based on Debian. It is one of the most popular Linux distributions. Ubuntu is a good choice for beginners and experienced users alike. It is easy to use and has a large community of users and developers. Desktop, server, cloud
openSUSE openSUSE is a Linux distribution that is developed by the openSUSE community. It is known for its stability and its large community of users and developers. openSUSE is a good choice for users who want a stable and reliable Linux distribution. It is also a good choice for developers who want to contribute to the openSUSE project. Desktop, server
Debian Debian is a free and open-source operating system based on the Linux kernel. Debian is a good choice for servers and embedded systems. It is also a good choice for users who want a stable and reliable operating system. Server, embedded
Fedora Fedora is a Linux distribution developed by Red Hat. It is known for its cutting-edge software and its focus on innovation. Fedora is a good choice for users who want to try out the latest and greatest Linux software. It is also a good choice for developers who want to test their software on a variety of hardware platforms. Desktop, server
Arch Linux Arch Linux is a rolling release distribution, which means that it is constantly being updated with new software. It is a popular choice for experienced Linux users. Arch Linux is a good choice for users who want the latest and greatest software and who are comfortable with a command-line interface. Desktop
Manjaro Manjaro is a Linux distribution based on Arch Linux. It is designed to be easy to use and stable, while still providing the latest software from Arch. Manjaro is a good choice for users who want the latest and greatest software from Arch, but who don't want to deal with the complexity of Arch itself. Desktop
Elementary OS Elementary OS is a Linux distribution that is designed to be user-friendly and beautiful. It is based on Ubuntu, but it uses its own desktop environment, called Pantheon. Elementary OS is a good choice for users who want a Linux distribution that is easy to use and looks great. Desktop
Zorin OS Zorin OS is a Linux distribution that is designed to be user-friendly and familiar to Windows users. It is based on Ubuntu, but it uses a desktop environment that is similar to Windows. Zorin OS is a good choice for users who are new to Linux and want an operating system that is easy to use and familiar. Desktop

Reference: There is a website that you can use to compare most popular distributions:

https://distrowatch.com/

Note: You can download Linux from internet. Most distributions are fee. There are options to download a DVD image and make your own DVD to install Linux from it. Most laptops do not have DVD device so you must use an external device. A second option to install from USB pen drive. You can burn a pen-drive if it has at least 8GB from ISO immage. There are special tools available on windows and linux that can create this usb drive for you.

Multiple OS

On one computer you can have one single operating system running at one time. This is the host operating system and is the first program that start when you start the computer.

Multiple HDD

However you can have installed on a computer one or more operating systems. If you have multiple hard drive available you can install one operating system on each hard drive.

Multiple Partitions

If you have a single hard drive you can partition the hard drive into multiple logical segments named "disk partitions". Then on each partition you can have a different operating system and different file systems.

Live CD/DVD

You can download and create a Live CD or DVD from internet and use this special CD or DVD to start and try an operating system. This require a bit of extra work to download a file from internet named .iso image. Then you must know how to burn a DVD.

Virtual BOX

You can download from internet a special program that is a virtual machine. Then you can use this program to make a simulation of a new computer.

This simulator is also called virtual machine. Once you create a virtual machine you can install an operating system from a DVD or you can download an image from internet.

System Programming

System programming is usually referring to script files. A classic operating system like Windows, Linux, UNIX have a console. This is a black window that is sometimes called command window. In this window can run special programs called scripts. A script is a text file that operating system can execute. On Windows this file has extension .bat and is called batch file. On Linux this file has extension .sh and is call shell script.

Command Window

On the command window the operating system display a prompt or cursor. At this prompt you can type a command and the operating system can execute this command. If you type the name of a script file this file is parsed and executed.

Programming Concepts

Cat McGee (8 min)

Run command is different in different operating systems. Linux, MacOS have a "Terminal" app you can start. Windows, have a command that you can run. To open this you use: mouse right click over the menu window icon and select option: "run". If your keyboard have a window button, press "window button + r" in the same time. Then type "cmd" or "python" or any other command you want to run.

Programming Concepts

run cmd

If you type "cmd" and press button "ok" then you have done a good job. Now you can see a black window where you can type commands like a hacker. This is very useful for programmers to start applications and install components. In the picture below, I have used command "cd" and command "dir". This is how I display content from a folder.

Command Console

Windows Terminal
(Command Prompt)

System programming does not necessary mean you create a new computer language or a new command or a new driver. It means you know how to make a script that can run operating system commands. This can be on the cloud, on a server or on your own computer.

Performance Tips

There are some significant performance tips you can use for speading up an operating system. Some of these tips are related to storage and hardware. If you use a fast small storage you can have a cache or a faster boot partition. Also it helps to have a faster swap and temporary disk. Usually these tips require multiple storage solutions.

What is ReadyBoost?

You can improve Windows performance using a small SSD as secondary disk. You can use up to 32 GB of SSD disk to be used as cache using windows ReadyBoost technology. For this you select an empty SSD and format as NTFS. Then you use disk/properties/readyBoost to set-up the disk for cache. This may improve performance only if your primary disk is not already SSD.

Picture

LINUX BOOT DISK

If you have a small SSD for Linux this is great. You can install / (root) on SSD format using EXT4 and use /noatime option for mounting. Then you have a very fast boot time.

If you have more then one HDD in your computer or you use a RAID array then you can use SSD to store /boot partition (up to 200 ~ 500 mb). This can be formatted EXT3 or EXT4.

Use secondary disk or RAID array to mount / (root) partition. This will allow you to store larger amount of data on the computer or server.

BOOT PARTITION

It is problematic to install boot loader for operating system on a software based RAID. Therefore usually the primary disk on Windows operating system is not RAID based.

On Linux you can have a very small partition for /boot (~ 256 mb < 512 mb) then the root partition "/" can be installed on software RAID array. However if you create a boot partition on one of the RAID disks then this disk will have less space then the other disks. On RAID it is preferred to have the same disk size. The new memory SD card can have a large capacity it is not sensitive to light or mechanical damage if you drop it and can be used to store data for a long time.

Cloud Platforms

A cloud platform is a collection of cloud computing services that are hosted on the Internet and can be accessed by users through a web browser or an application programming interface (API). Cloud platforms offer a variety of services, including computing power, storage, databases, networking, and software.

Cloud platforms are often used by businesses to run their applications and store their data. They can also be used by individuals to create websites, store photos, and run applications.

There are many different cloud platforms available, including Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform. Each platform offers its own set of services and features.

Cloud platforms offer a number of advantages over traditional on-premises infrastructure, including:

If you are considering using a cloud platform, there are a few things you should keep in mind:

Cloud platforms offer a number of advantages over traditional on-premises infrastructure. If you are considering using a cloud platform, be sure to compare the different options available to find the one that is best for you.

Cloud Templates

On the Cloud you can "rent" a virtual machine and you can start and stop this virtual machine. This is like a server computer and it can be pre-loaded with a specific operating system that you order. Usually this do not have a GUI (Graphic Interface) but only a Terminal window.

This kind of machines are based on specific template images that are special design for the cloud and can be pre-configured with important software to create a "platform". It is most likely you will need to use the Terminal to run programs, configure files and install things.

Popular platforms

Here's an example HTML table for top cloud-based resource websites for developers, with links to their homepages, descriptions, and plan types (free or commercial):

Resource Website Description Plan Type
Amazon Web Services (AWS) AWS provides a wide range of cloud-based computing resources and services such as EC2, S3, Lambda, and more for developers and businesses. Free and commercial plans available
Google Cloud Platform Google Cloud Platform offers cloud services such as Compute Engine, Cloud Storage, and Kubernetes to help developers quickly build, test, and deploy applications. Free and commercial plans available
Heroku Heroku provides a cloud-based platform for developers to build, deploy, and run applications using a wide range of programming languages and tools. Free and commercial plans available
Microsoft Azure Azure provides cloud-based services such as virtual machines, containers, and serverless computing to help developers and businesses scale and manage applications. Free and commercial plans available
DigitalOcean DigitalOcean provides developers with a cloud-based platform to deploy and scale applications quickly, with plans optimized for web and mobile apps. Free and commercial plans available
Oracle Cloud Oracle Cloud offers a wide range of cloud services and solutions for developers and businesses, including infrastructure and platform services, database and data management, and more. Free and commercial plans available
Replit Replit is an online code editor and development environment that supports over 50 languages, allowing developers to write, collaborate, and deploy code for web and mobile apps. Free and commercial plans available
Vercel Vercel is a cloud platform for deploying and serving web and serverless applications, with features such as automatic scaling, continuous deployment, and real-time collaboration. Free and commercial plans available
IBM Cloud IBM Cloud provides a wide range of cloud services and solutions for developers and businesses, including AI and machine learning, data and analytics, and more. Free and commercial plans available
Alibaba Cloud Alibaba Cloud offers a wide range of cloud services and solutions for developers and businesses, including storage and CDN, database and analytics, and more. Free and commercial plans available

Note: this is just a table with some of the top resource websites for developers. There are many other great options out there that you can include in your own table depending on your specific needs and requirements.

External Resources

You can learn specifics of an operating system from Internet or you can ask ChatGPT specific questions, as I do. I have created a series of articles generated using prompt engineering. You can learn from these articles. Also you can learn Bash programming languages and Linux commands on Programming course.


Read next: Developer Tools