1. What is Operating System (OS)?
An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.
2. Why does a computer need an operating system?
Computing hardware needs to be controlled, and that’s the role of the operating system. The operating system (sometimes called the “OS”) provides a common set of controls for managing computer hardware, making it easier for users to interact with computers and for programmers to write application software.
Following are some of important functions of an operating System.
- Memory Management
- Processor Management
- Device Management
- File Management
- Control over system performance
- Job accounting
- Error detecting aids
- Coordination between other software and users
3. Types of Operating Systems
Single- and multi-tasking
A single-tasking system can only run one program at a time. A multitasking operating system can run more than one program at the same time. Multi-tasking is done by dividing processor time. The processor gives a little bit of its time to each program.
Single- and multi-user
Single-user operating systems cannot distinguish between users, but may allow multiple programs to run simultaneously. A multi-user operating system permits multiple users to interact with the system at the same time.
A distributed operating system manages a group of distinct computers and makes them appear to be a single computer. Distributed computations are carried out on more than one machine.
In an OS, distributed and cloud computing context, templating refers to creating a single virtual machine as a guest operating system, then saving it as a tool for multiple running virtual machines. The technique is common in large server warehouses.
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 and are able to operate with a limited number of resources. Windows CE and Minix 3 are some examples of embedded operating systems.
A real-time operating system guarantees processing of events or data by a specific moment in time. A real-time operating system may be single- or multi-tasking, but when multitasking, it uses specialized scheduling algorithms so that a deterministic nature of behavior is achieved. 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 library operating system is one in which the services that a typical operating system provides, such as networking, are provided in the form of libraries and composed with the application and configuration code to construct a unikernel: a specialized, single address space, machine image that can be deployed to cloud or embedded environments.
4. Operating System – Services
Following are a few common services provided by an operating system:
Operating systems handle many kinds of activities from user programs to system programs like printer spooler, name servers, file server, etc. Each of these activities is encapsulated as a process.
An I/O subsystem comprises of I/O devices and their corresponding driver software. Drivers hide the peculiarities of specific hardware devices from the users.
File system manipulation
A file represents a collection of related information. Computers can store files on the disk (secondary storage), for long-term storage purpose. Examples of storage media include magnetic tape, magnetic disk and optical disk drives like CD, DVD
In case of distributed systems which are a collection of processors that do not share memory, peripheral devices, or a clock, the operating system manages communications between all the processes.
Errors can occur anytime and anywhere. An error may occur in CPU, in I/O devices or in the memory hardware. Following are the major activities of an operating system with respect to error handling −
- The OS constantly checks for possible errors.
- The OS takes an appropriate action to ensure correct and consistent computing.
In case of multi-user or multi-tasking environment, resources such as main memory, CPU cycles and files storage are to be allocated to each user or job.
Considering a computer system having multiple users and concurrent execution of multiple processes, the various processes must be protected from each other’s activities.
5. Operating System – Processes
A process is basically a program in execution. The execution of a process must progress in a sequential fashion.
6. Process Life Cycle
When a process executes, it passes through different states. These stages may differ in different operating systems, and the names of these states are also not standardized.
In general, a process can have one of the following five states at a time.
|S.N.||State & Description|
|1||Start This is the initial state when a process is first started/created.|
|2||Ready The process is waiting to be assigned to a processor. Ready processes are waiting to have the processor allocated to them by the operating system so that they can run. Process may come into this state after Start state or while running it by but interrupted by the scheduler to assign CPU to some other process.|
|3||Running Once the process has been assigned to a processor by the OS scheduler, the process state is set to running and the processor executes its instructions.|
|4||Waiting Process moves into the waiting state if it needs to wait for a resource, such as waiting for user input, or waiting for a file to become available.|
|5||Terminated or Exit Once the process finishes its execution, or it is terminated by the operating system, it is moved to the terminated state where it waits to be removed from main memory.|
6. Operating System – Process Scheduling
The process scheduling is the activity of the process manager that handles the removal of the running process from the CPU and the selection of another process on the basis of a particular strategy.
7. Operating System – Memory Management
Memory management is the functionality of an operating system which handles or manages primary memory and moves processes back and forth between main memory and disk during execution. Memory management keeps track of each and every memory location, regardless of either it is allocated to some process or it is free. It checks how much memory is to be allocated to processes.
8. Operating System – I/O Hardware
One of the important jobs of an Operating System is to manage various I/O devices including mouse, keyboards, touch pad, disk drives, display adapters, USB devices, Bit-mapped screen, LED, Analog-to-digital converter, On/off switch, network connections, audio I/O, printers etc.
An I/O system is required to take an application I/O request and send it to the physical device, then take whatever response comes back from the device and send it to the application. I/O devices can be divided into two categories −
- Block devices − A block device is one with which the driver communicates by sending entire blocks of data. For example, Hard disks, USB cameras, Disk-On-Key etc.
- Character devices − A character device is one with which the driver communicates by sending and receiving single characters (bytes, octets). For example, serial ports, parallel ports, sounds cards etc
9. Operating System – I/O Softwares
I/O software is often organized in the following layers −
- User Level Libraries − This provides simple interface to the user program to perform input and output. For example, stdio is a library provided by C and C++ programming languages.
- Kernel Level Modules − This provides device driver to interact with the device controller and device independent I/O modules used by the device drivers.
- Hardware − This layer includes actual hardware and hardware controller which interact with the device drivers and makes hardware alive.
10. Operating System – File System
A file is a named collection of related information that is recorded on secondary storage such as magnetic disks, magnetic tapes and optical disks. In general, a file is a sequence of bits, bytes, lines or records whose meaning is defined by the files creator and user.
11. Operating System – Security
Security refers to providing a protection system to computer system resources such as CPU, memory, disk, software programs and most importantly data/information stored in the computer system. If a computer program is run by an unauthorized user, then he/she may cause severe damage to computer or data stored in it. So a computer system must be protected against unauthorized access, malicious access to system memory, viruses, worms etc. We’re going to discuss following topics in this chapter.
- One Time passwords
- Program Threats
- System Threats
- Computer Security Classifications
In this post, i have explained the installation of the Kubernetes cluster on Ubuntu using minikube.
If you have any questions or feedback, feel free to leave a comment.
As always, if you found this post useful, then click like and share it 🙂