The operating system is an example of system software. The primary role of an operating system is to manage the computerās resources. This includes both physical (hardware) resources and abstract resources.
As a computer runs, it is either executing user level processes or the kernel of the operating system. Application programs run with the CPU inĀ
userĀ mode, while the OS kernel runs with the CPU inĀ
supervisoryĀ mode. In user mode, the CPU is restricted in terms of what instructions will execute and what memory addresses may be referenced. No restrictions are placed on the CPU when it is in supervisory mode.
The mechanism that forces aĀ
context switchĀ from running user code to running the operating system is an interrupt. Hardware interrupts invoke device handlers in the OS. Software interrupts are special assembly language instructions issued by application programs to invoke system calls. A trap interrupt is issued by the CPU in response to some error. Interrupts allow the operating systemās kernel to execute. The kernel itself, may be interrupted by another interrupt. The interrupted handler must be scheduled to finish later. This feature is calledĀ
re-entrantĀ interrupt handling.
The major components of an operating system are: process manager, memory manager, file system manager and I/O manager.
1.Process Management
The process is one of the fundamental concepts of operating systems. A process is an instance of a program in execution. A process consists of a set of memory addresses to hold data and instructions, the set of resources allocated to the process and a Process Control Block (PCB) to hold the properties of the process. Processes are created by another process (the parent) issuing a special system call to create a child process. When an operating system boots, the kernel starts one user process. All other user processes are descendants of this one process.
2.Synchronization
Whenever processes or threads share data, there is a need to synchronize access to the data. The operating system itself is a heavy user of synchronization concepts and correct implementation of synchronization primitives, such as semaphores, requires supervisory CPU permission, thus it is necessary that the operating system implement and provide synchronization services to the processes.
3.Memory Management
The memory addresses that each process uses to reference its memory is called the logical address, while the physical address refers to the actual memory of the computer. The CPUās memory management unit does the address translation between logical or virtual memory addresses and physical addresses. The paged memory management scheme, where the physical memory is divided into relatively small frames, and a table is used to translate logical memory addresses to physical addresses, is used in modern operating systems. An extension to paged memory is demand paging with virtual memory. In this approach, a back-up copy of the memory is held on the hard drive. When memory is in short supply, some areas of memory may be removed from the RAM memory. If memory is requested that is presently not in physical memory, a trap interrupt known as a page fault occurs and the OSās page fault handler is invoked. The operating system must find room for the missing page (frame), load it into memory and update the processās page map table before the process may resume. Too many page faults to the point degraded performance is called thrashing.
4.File Management
The concept of the file is one of the most widely used abstracts with computers. Physically, the hard drive is an ordered collection of blocks of data. However, the user of the computer sees a file system consisting of a directory tree and individual files. Modern file systems, such as Unix inode and Windows NTFS, contain a data structure for each file that lists its name, owner, modified times, access permissions, size and the ordered list of data blocks for the file. These file systems use an indexed approach to tracking the data blocks as opposed to the linked approach, which was used by older file systems, such as the DOS file allocation table (FAT) file system.
Different Operating systems:
LINUX:
Just like Windows, iOS, and Mac OS, Linux is an operating system. In fact, one of the most popular platforms on the planet, Android, is powered by the Linux operating system. An operating system is software that manages all of the hardware resources associated with your desktop or laptop. To put it simply, the operating system manages the communication between your software and your hardware. Without the operating system (OS), the software wouldn?t function.
The Linux operating system comprises several different pieces:
Bootloader ā The software that manages the boot process of your computer. For most users, this will simply be a splash screen that pops up and eventually goes away to boot into the operating system.
Kernel ā This is the one piece of the whole that is actually called ?Linux?. The kernel is the core of the system and manages the CPU, memory, and peripheral devices. The kernel is the lowest level of the OS.
Init system ā This is a sub-system that bootstraps the user space and is charged with controlling daemons. One of the most widely used init systems is systemd? which also happens to be one of the most controversial. It is the init system that manages the boot process, once the initial booting is handed over from the bootloader (i.e., GRUB or GRand Unified Bootloader).
Daemons ā These are background services (printing, sound, scheduling, etc.) that either start up during boot or after you log into the desktop.
Graphical server ā This is the sub-system that displays the graphics on your monitor. It is commonly referred to as the X server or just X.
Desktop environment ā This is the piece that the users actually interact with. There are many desktop environments to choose from (GNOME, Cinnamon, Mate, Pantheon, Enlightenment, KDE, Xfce, etc.). Each desktop environment includes built-in applications (such as file managers, configuration tools, web browsers, and games).
Applications ā Desktop environments do not offer the full array of apps. Just like Windows and macOS, Linux offers thousands upon thousands of high-quality software titles that can be easily found and installed. Most modern Linux distributions (more on this below) include App Store-like tools that centralize and simplify application installation. For example, Ubuntu Linux has the Ubuntu Software Center (a rebrand of GNOME Software? Figure 1) which allows you to quickly search among the thousands of apps and install them from one centralized location.
WINDOWS:
Windows is a series of operating systems developed by Microsoft. Each version of Windows includes a graphical user interface, with a desktop that allows users to view files and folders in windows. For the past two decades, Windows has been the most widely used operating system for personal computers PCs.
Microsoft Windows is designed for both home computing and professional purposes. Past versions of Windows home editions include Windows 3.0 (1990), Windows 3.1 (1992), Windows 95 (1995), Windows 98 (1998), Windows Me (2000), Windows XP (2001), and Windows Vista (2006). The current version, Windows 7, was released in 2009.
The first business-oriented version of Windows, called Windows NT 3.1, was in 1993. This was followed by Windows 3.5, 4.0, and Windows 2000. When Microsoft released Windows XP in 2001, the company simply created different editions of the operating system for personal and business purposes. Windows Vista and Windows 7 have followed the same release strategy.
Windows is designed to run on standard x86 hardware, such as Intel and AMD processors. Therefore, it can be installed on multiple brands of hardware, such as Dell, HP, and Sony computers, as well as home-built PCs. Windows 7 also includes several touchscreen features, that allow the operating system to run on certain tablets and computers with touchscreen displays. Microsoft's mobile operating system, Windows Phone, is designed specifically for smartphones and runs on several brands of phones, including HTC, Nokia, and Samsung.
MAC OS:
This is the operating system that runs on Macintosh computers. It is pronounced, "mack-oh-es." The Mac OS has been around since the first Macintosh was introduced in 1984. Since then, it has been continually updated and many new features have been added to it. Each major OS release is signified by a new number (i.e. Mac OS 8, Mac OS 9).
Since the core of the Mac OS was nearly decades old, Apple decided to completely revamp the operating system. In March of 2001, Apple introduced a completely new version of the Mac OS that was written from the ground up. The company dubbed it "Mac OS X," correctly pronounced "Mac OS 10." Unlike earlier versions of the Mac OS, Mac OS X is based on the same kernel as Unix and has many advanced administrative features and utilities. Though the operating system is much more advanced than earlier versions of the Mac OS, it still has the same ease-of-use that people have come to expect from Apple software.