Operating System Basic Concepts


Operating System Concepts

                                                                                    By:  Jayant Sharma
                                                                                    
An Operating System acts as an interface between computer user and computer hardware. An operating system is software which performs all the basic tasks like file management, memory management, process management, handling input and output, and controlling peripheral devices such as disk drives and printers. It controls the execution of all kinds of programs. Since, it is possible for an application to interface directly with hardware, but the vast majority of applications are there, so they are directly written for an OS, which allows them to take advantage of common libraries and we didn’t have to worry about specific hardware details. The OS also provides services to facilitate the efficient execution.

 














The Figure 1 shows the application of operating system in various components of a computer. While, Figure 2 shows a layered structure for operating system.
The operating systems were developed in the 1950's, when computers could only execute one program at a time. Later, computers included many software programs, sometimes called libraries, which were linked together to create the beginning of today's operating systems.


Components of Operating System
The OS consists of many components and features. The three defined components are:
  • Kernel: This provides basic-level control over all of the computer hardware devices. It is a bridge between applications and the actual data processing done at the hardware level. It manages input/output requests from software and translates them into data processing instructions for the central processing unit and other electronic components of a computer.
  • User Interface: This component allows interaction with the user, which may occur through graphical icons and a desktop or through a command line. It allows a user to enter and receive information. 
  • Application Programming Interfaces: API is a set of defined functions and methods for interfacing with the underlying OS or another program or service running on the computer. This component allows application developers to write modular code.
Functions of Operating System
Following are some of important functions of an operating System.
  • Memory Management
  • Processor Management
  • Device Management
  • File Management
  • Security
  • Error detecting
Memory Management in Operating System
Memory management refers to management of Primary Memory or Main Memory. Main Memory refers to a physical memory that is the internal memory to the computer. The word main is used to distinguish it from external mass storage devices such as disk drives. Main memory is also known as RAM. It is a large array of words or bytes where each word or byte has its own address. All the programs are loaded in the main memory for execution. Sometimes complete program is loaded into the memory, but sometimes a certain part or routine of the program is loaded into the main memory only when it is called by the program, this mechanism is called Dynamic Loading, this enhance the performance. In some cases, rather than loading all the dependent programs, CPU links the dependent programs to the main executing program when its required. This mechanism is known as Dynamic Linking.
Main memory provides a fast storage that can be accessed directly by the CPU. For a program to be executed, it must in the main memory. An Operating System does the following activities for memory management −
·      Keeps tracks of primary memory, i.e., what part of it are in use by whom, what part are not in use.
·      In multi programming, the OS decides which process will get memory when and how much.
·      Allocates the memory when a process requests it to do so.
·      De-allocates the memory when a process no longer needs it or has been terminated.
Process Management in Operating System
In this, it involves the execution of various tasks such as creation of processes, scheduling of processes, management of deadlock, and termination of processes. It is responsibility of operating system to manage all the running processes of the system. There are number of concepts associated with the process management function of an operating system. Some of those concepts are given as following:
  1. Process State
  2. Process Control Block (PCB)
  3. Process Operations
  4. Process Scheduling
  5. Process Synchronization
  6. Inter process Communication
  7. Deadlock and Handling
In multi programming environment, the OS decides which process gets the processor when and for how much time. This function is called process scheduling. An Operating System does the following activities for processor management −
·      Keeps tracks of processor and status of process. The program responsible for this task is known as traffic controller.
·      Allocates the processor (CPU) to a process.
·      De-allocates processor when a process is no longer required.

Figure shows the process states
File Management System in Operating System
A file is a collection of related information that is recorded on secondary storage. Or file is a collection of logically related entities. A file system is normally organized into directories for easy navigation and usage. These directories may contain files and other directions. Collection of files is a file directory. The directory contains information about the files, including attributes, location and ownership. 
Information contained in a device directory is:
·        Name
·        Type
·        Address
·        Current length
·        Maximum length
·        Date last accessed
·        Date last updated
·        Owner id
·        Protection information

Operations performed on directory are:
·        Search for a file
·        Create a file
·        Delete a file
·        List a directory
·        Rename a file
·        Traverse the file system
An Operating System does the following activities for file management −
·      Keeps track of information, location, uses, status etc. The collective facilities are often known as file system.
·      Decides who gets the resources.
·      Allocates the resources.
·      De-allocates the resources.
Understanding Directory
SINGLE-LEVEL DIRECTORY
In this, a single directory is maintained for all the users.
·        Naming problem: Users cannot have same name for two files.
·        Grouping problem: Users cannot group files according to their need.


TWO LEVEL DIRECTORY
In this separate directories for each user is maintained.
·        Path name: Due to two levels there is a path name for every file to locate that file.
·        Now, we can have same file name for different user.
·        Searching is efficient in this method.
TREE-STRUCTURED DIRECTORY: 
Directory is maintained in the form of a tree. Searching is efficient and also there is grouping capability.




 

Cloud Operating System
A cloud operating system is a type of operating system designed to operate within cloud computing and virtualization environments. A cloud operating system manages the operation, execution and processes of virtual machines, virtual servers and virtual infrastructure, as well as the back-end hardware and software resources.  A cloud operating system may also be called a virtual operating system.




Comments

Popular posts from this blog

AWS CloudWatch: Creating Billing Alarms

Cloud Computing: Introduction in a simple way

AWS CloudWatch: Introduction