Your computer can have an expensive motherboard, the fastest processor, lots of memory, and superior graphics, but it is completely useless without an operating system (OS). Every computer must have one. What is the operating system? You can look at it as being the “middle man”. Application software such as a spreadsheet cannot communicate directly with hardware. Whether pressing a key on your keyboard or clicking your mouse, it’s the computer operating system that provides the interface between software and hardware. It handles all of the computer’s resources and has the ability to support devices from many different vendors via device drivers. All these tasks are quietly working behind the scenes without the user’s knowledge. [Source: Learning about Computers]
An Introduction to Operating Systems
The 1960’s definition of an operating system is “the software that controls the hardware”. However, today, due to microcode we need a better definition. We see an operating system as the programs that make the hardware useable. In brief, an operating system is the set of programs that controls a computer. Some examples of operating systems are UNIX, Mac, MS-DOS, MS-Windows, Windows/NT, Chicago, OS/2, MacOS, VMS, MVS, and VM. [Source: Kent State University]
An operating system is a collection of system programs that manages all the other programs (i.e, application programs) in a computer as well as the allocation and use of hardware resources such as the CPU (central processing unit), memory and the hard disk drive (HDD). It controls and facilitates the overall operation of a computer. It acts as an interface between the hardware and the user level program.
Any operating system can be conceptually divided into three sets of components: a kernel, low level utilities and other system programs, and a user interface(s). The kernel is the most important and basic part of any operating system. It has complete control over everything that occurs in it and communicates directly with the hardware. Kernel controls low-level processes that the average user usually cannot see: it controls how memory is read and written, the order in which processes are executed, how information is received and sent by devices like the monitor, keyboard and mouse, and decides, how to interpret information received from networks. Kernel of an operating system is copied from storage (hard disk) into a computer’s memory (RAM) as the computer boots by a boot program and remains there until the computer is shut down.
An important feature of Unix-like operating systems is that these components are completely separate entities, thus enabling users to run various combinations of kernels, user interfaces and utility programs. In other operating systems the separation is only conceptual
Whether it’s Windows, Mac, or Linux, operating systems have a Kernel. The Kernel is the heart of an operating system, the part that does the invisible work such as allowing user applications access to hardware, managing resources like the memory and CPU, scheduling tasks, and storing device drivers.It is usually the first part of the OS that is loaded after you turn on your computer and it completes the POST (Power On Self Test). If a problem occurs at any point when the OS is loading, usually an error message appears on the screen.
Utilities are small programs that are used to help manage the operating system and hardware. System programs also include daemons, which monitor the system for certain types of events and respond to them.
The user interface is a component that interacts with the computer user directly, allowing them to control and use programs. The user interface may be graphical with icons and a desktop, or textual, with a command line. The most basic, but also the most powerful, type of user interface is a shell, which, as its name implies, is an outer wrapper to the kernel that enables users to interact with computers in a text-only mode. Most modern operating systems also have a graphical user interface (GUI), which provides windows, icons and menus in a desktop metaphor that are easily manipulated with a mouse or similar pointing device. GUIs have the advantage of being much more intuitive and enjoyable for most new users.
The operating system is usually stored on a HDD (hard disk drive), but it can also be stored on other media, including a CDROM (or even a single floppy disk in the case of some very small operating systems such as muLinux).
Whereas users interact with the system through a shell or a GUI, application programs make use of the operating system and communicate with each other by making requests for services through application program interfaces (APIs) that are defined by the operating system.
Application programming interfaces provide services and code libraries that let applications developers write modular code reusing well defined programming sequences in user space libraries or in the operating system itself. Which features are considered part of the operating system is defined differently in various operating systems. For example, Microsoft Windows considers its user interface to be part of the operating system, while many versions of Linux do not. [Source: Wikipedia]
Since Windows ME, the Windows family has been based on the WinNT architecture. The first version was NT 3.1, and there were other versions in the 3.x group which was followed by NT 4.0. Linux and Mac are based on Unix. Both the Windows and Linux/Mac architecures consist of a layered structure with User mode sitting on top of the Kernel. In order to make user applications work it takes an API (Application Program Interface) & libraries. An API consists of pre-made tools that aid in writing software. A library is a collection of often used functions or other code that can be implemented by various programs. That way, a programmer doesn’t have to rewrite the same code every time it’s needed. Windows uses Dynamic Link Libraries, which simply means the library is called during run time, i.e. when a program is actually running. Another way of looking at it is the library is used only when needed. Dynamic Link Libraries usually have a .dll extension. [Source: Learning about Computers]
Kernel (the core component), Shell (the user interface) and File System are the major 3 components of operating system.
Numerous operating systems have been developed over the years, but only a few are widely used. Microsoft Windows is the dominant family of operating systems for personal computers, with a share generally estimated at in excess of 90 percent worldwide. However, its shares are much smaller for other types of applications, such as mainframes, servers and embedded devices. An embedded device is a combination of computer hardware and software that is built into some other product, such as an electric appliance, industrial production equipment, cell phone or disk drive.
For a list of the most commonly used operating systems along with a brief description of each, see The Most Popular Operating Systems, by The Linux Information Project, May 2006
In the opinion of many computer experts, the best and most successful (as measured in terms of such criteria such as stability, efficiency, flexibility and longevity) operating systems that have been developed to date are UNIX and its various descendants (such as Linux and Mac OS X), commonly referred to as Unix-like operating systems. This is largely a result of their emphasis (although not always fully achieved) on simplicity, modularity and transparency.
The first computers did not have operating systems. Rather, a user would typically load punched paper tape or cards containing a program and data directly into a tape reader or card reader connected to the computer. The computer would then commence work and continue until the program was completed or until it crashed (which was even more common then than now).
The development of operating systems represented a major improvement in the efficiency of computer utilization. However, the early operating systems were not standardized, with each computer manufacturer developing one or more specific to its particular computer models. This situation continued into the 1960s, when IBM developed the System/360 series of mainframe computers, all of whose models ran a single basic operating system, referred to as OS/360.
UNIX, the first version of which was developed in 1969 at Bell Labs by Ken Thompson, represented a major advance over earlier operating systems because of its simplicity and portability (i.e., ability to be used on a wide variety of computers). This, together with the facts that it was initially essentially free as well as easily obtainable and easily modified, led to its widespread acceptance by universities and businesses. It also resulted in its serving as the starting point for the development of other operating systems.
UNIX was so successful, in fact, that it was difficult for any subsequently developed systems, including MS-DOS and the other Microsoft systems, to not be influenced by it.
Although many people have attempted to develop new operating systems, very few have met with any success. The reason is that it is an extremely complicated project and it can take years to complete even a most basic version. Moreover, it would become an even more difficult and time-consuming project if the system were to incorporate some truly novel features. For example, it took Linus Torvalds more that a year of to make Linux even marginally useful despite the fact that it was basically just a clone of existing operating systems, and it took many more years for Linux to take off and become truly useful.
Types of Operating Systems
There are four major types of computer operating systems: A Real Time OS is for industry and machines. There’s basically no user involvement. A single-user single task operating system is for one person to do one thing at a time. A single-user multitask OS allows one person to run more than one application on a computer simultaneously. A multi-user operating system permits multiple users to access a single computer. [Source:Learning about Computers]
Batch Operating Systems
A batch operating system is a single stream system that processes the data and program submitted in a group or batch.
Batch processing requires the program, data and appropriate system commands to be submitted together in the form of a job to the computer operator. The job is usually in the form of punch cards. A computer executes the submitted commands and data to process and after some time the computer produces output. The output consists of the result of the program as well as a dump of the final memory and register contents for debugging.
Batch Operating system allow little or no interaction between users and executing programs. Programs that do not require interaction and programs with long execution times may be served well by Batch Operating System .
A real-time operating system is a multitasking operating system that aims at executing real-time applications. Real-time operating systems often use specialized scheduling algorithms so that they can achieve a deterministic nature of behavior. The main objective of real-time operating systems is their quick and predictable response to events. They have an event-driven or time-sharing design and often aspects of both. An event-driven system switches between tasks based on their priorities or external events while time-sharing operating systems switch tasks based on clock interrupts.
A multi-user operating system allows multiple users to access a computer system concurrently. Time-sharing system can be classified as multi-user systems as they enable a multiple user access to a computer through the sharing of time. Single-user operating systems, as opposed to a multi-user operating system, are usable by a single user at a time. Being able to use multiple accounts on a Windows operating system does not make it a multi-user system. Rather, only the network administrator is the real user. But for a Unix-like operating system, it is possible for two users to login at a time and this capability of the OS makes it a multi-user operating system.
Multi-tasking vs. Single-tasking
When only a single program is allowed to run at a time, the system is grouped under a single-tasking system. However, when the operating system allows the execution of multiple tasks at one time, it is classified as a multi-tasking operating system. Multi-tasking can be of two types: pre-emptive or co-operative. In pre-emptive multitasking, the operating system slices the CPU time and dedicates one slot to each of the programs. Unix-like operating systems such as Solaris and Linux support pre-emptive multitasking, as does AmigaOS. Cooperative multitasking is achieved by relying on each process to give time to the other processes in a defined manner. 16-bit versions of Microsoft Windows used cooperative multi-tasking. 32-bit versions, both Windows NT and Win9x, used pre-emptive multi-tasking. Mac OS prior to OS X used to support cooperative multitasking.
A distributed operating system manages a group of independent computers and makes them appear to be a single computer. The development of networked computers that could be linked and communicate with each other gave rise to distributed computing. Distributed computations are carried out on more than one machine. When computers in a group work in cooperation, they make a distributed system.
Embedded operating systems are designed to be used in embedded computer systems. They are designed to operate on small machines like PDAs with less autonomy. They are able to operate with a limited number of resources. They are very compact and extremely efficient by design. Windows CE and Minix 3 are some examples of embedded operating systems.
Functions of Operating Systems
Operating system performs various tasks such as Process Management, Memory Management, File Management, IO Management, Secondary Storage Management, Networking and Protection System.
The operating system manages many kinds of activities ranging from user programs to system programs like printer spooler, name servers, file server etc. Each of these activities is encapsulated in a process. A process includes the complete execution context (code, data, PC, registers, OS resources in use etc.).
It is important to note that a process is not a program. A process is only ONE instant of a program in execution. There are many processes can be running the same program. The five major activities of an operating system in regard to process management are
- Creation and deletion of user and system processes.
- Suspension and resumption of processes.
- A mechanism for process synchronization.
- A mechanism for process communication.
- A mechanism for deadlock handling.
Primary-Memory or Main-Memory is a large array of words or bytes. Each word or byte has its own address. Main-memory provides storage that can be access directly by the CPU. That is to say for a program to be executed, it must in the main memory.
The major activities of an operating in regard to memory-management are:
- Keep track of which part of memory are currently being used and by whom.
- Decide which process are loaded into memory when memory space becomes available.
- Allocate and deallocate memory space as needed.
A file is a collection of related information defined by its creator. A computer can store files on the disk (secondary storage), which provides long-term storage. Some examples of storage media are magnetic tape, magnetic disk, and the optical disk. Each of these media has its own properties like speed, capacity, data transfer rate and access methods.
A file system normally organized into directories to ease their use. These directories may contain files and other directions.
The five main major activities of an operating system in regard to file management are
- The creation and deletion of files.
- The creation and deletion of directions.
- The support of primitives for manipulating files and directions.
- The mapping of files onto secondary storage.
- The back up of files on stable storage media.
I/O System Management
I/O subsystem hides the peculiarities of specific hardware devices from the user. Only the device driver knows the peculiarities of the specific device to whom it is assigned.
Generally speaking, systems have several levels of storage, including primary storage, secondary storage, and cache storage. Instructions and data must be placed in primary storage or cache to be referenced by a running program. Because main memory is too small to accommodate all data and programs, and its data are lost when power is lost, the computer system must provide secondary storage to back up main memory. Secondary storage consists of tapes, disks, and other media designed to hold information that will eventually be accessed in primary storage (primary, secondary, cache) is ordinarily divided into bytes or words consisting of a fixed number of bytes. Each location in storage has an address; the set of all addresses available to a program is called an address space.
The three major activities of an operating system in regard to secondary storage management are:
- Managing the free space available on the secondary-storage device.
- Allocation of storage space when new files have to be written.
- Scheduling the requests for memory access.
A distributed system is a collection of processors that do not share memory, peripheral devices, or a clock. The processors communicate with one another through communication lines called network. The communication-network design must consider routing and connection strategies, and the problems of contention and security.
If a computer systems have multiple users and allow the concurrent execution of multiple processes, then the various processes must be protected from one another’s activities. Protection refers to a mechanism for controlling the access of programs, processes, or users to the resources defined by a computer system.
Command Interpreter System
A command interpreter is an interface of the operating system with the user. The user gives commands with are executed by operating system (usually by turning them into system calls). The main function of a command interpreter is to get and execute the next user-specified command. Command-Interpreter is usually not part of the kernel, since multiple command interpreters (shell, in UNIX terminology) may be supported by an operating system, and they do not really need to run in kernel mode. There are two main advantages to separating the command interpreter from the kernel.
- If we want to change the way the command interpreter looks, i.e., I want to change the interface of command interpreter, I am able to do that if the command interpreter is separate from the kernel. I cannot change the code of the kernel so I cannot modify the interface.
- If the command interpreter is a part of the kernel it is possible for a malicious process to gain access to certain part of the kernel that it showed not have to avoid this ugly scenario it is advantageous to have the command interpreter separate from kernel.
Points to Remember
- I found many students gets confused with multiprogramming and multiprocessing. A trick to remember would be to look on the word itself. multiprogramming means multiple programs, so if an operating system can execute multiple programs in one processor, it is multiprogramming. Similarly, multiprocessing is multiple processing, so if an operating system can use multiple processors to run one program, it is multiprocessing operating system.
- Operating system can have graphical user interface (GUI) or character user interface (CUI). Windows is GUI operating system and DOS is CUI operating system. GUI offers desktop, icons and menus to click, drag and drop to issue commands where as CUI offers a command line where you will type the command in correct syntax.
- Batch Operating System, Real Time Operating System, Single User Single Tasking Operating System, Single User Multi Tasking Operating System, Multi-User Operating System, Distributed Operating System, Embedded Operating System are the different types of operating systems.
Operating Systems are responsible to:
- Provide the instructions to display the on-screen elements. These elements are collectively known as user interface.
- Load programs into computer memory so that users can use.
- Control the flow of data in and out of computer as well as to and from peripheral devices.
- Manage the data stored in secondary storage
- Provide security by preventing unauthorized access to the computer’s resources.
- Monitor the status of critical computer components to detect failures that affect processing.
- Assign processors to different tasks being performed by the computer system.
- Windows operating system supports multitasking, multithreading and multiprogramming.
- DOS supports only single user and single tasking.
- Operating system works like an air traffic controller to coordinate the activities within the computer.
- CP/M is the first PC operating system developed by Dr. Gary A. Kildall in 1974.
- In 1981 Microsoft purchased an unauthorized clone of CP/M from Seattle Software Works and licensed this clone to IBM. IBM marketed it as PC-DOS on the first IBM PC in 1981. Microsoft marketed it to all other PC as MS-DOS.
- In Windows XP, the term XP stands for eXPerience.
- Windows XP was first released on 25th October 2001.
- Windows Vista released on 30th January 2007.
- Windows 7 is released on 22nd July 2009.
- Windows CE is an operating system developed by Microsoft for embedded systems. Windows CE are used in industrial controllers, communication hubs, POS terminals, cameras, tablets, interactive televisions.
- Pointer, pointing device, icons, desktop, windows, menus, buttons, toolbars etc are the basic components of GUI (Graphical User Interface).