Saturday, 6 May 2017

Operating System - System Software that Manages Computer Hardware And Software Resources

         
         An operating system (OS) is a collection of software that manages computer hardware resources and provides common services for computer programs. The operating system is a vital component of the system software in a computer system.
            An Operating System (OS) is an interface between a computer user and computer hardware. An operating system is a 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.
  Some popular Operating Systems include Linux, Windows, OS X, VMS, OS/400, AIX, z/OS, etc.

  Following are some of the important functions of an operating System.

  • Memory Management
  • Processor Management
  • Device Management
  • File Management
  • Security
  • Control over system performance
  • Job accounting
  • Error detecting aids
  • Coordination between other software and users
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 multiprogramming, 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.

Processor Management

·        Keeps tracks of processor and status of the process. The program responsible for this task is known as the traffic controller.
·        Allocates the processor (CPU) to a process.
·        De-allocates processor when a process is no longer required.

Device Management

·   Keeps tracks of all devices. The program responsible for this task is known as the I/O controller.
·        Decides which process gets the device when and for how much time.
·        Allocates the device in an efficient way.
·        De-allocates devices.

File Management

·       Keeps track of information, location, uses, status etc. The collective facilities are often known a file system.
·        Decides who gets the resources.
·        Allocates the resources.
·        De-allocates the resources.

Types of Operating System

Batch operating system

  • Lack of interaction between the user and the job.
  • CPU is often idle because the speed of the mechanical I/O devices is slower than the CPU.
  • Difficult to provide the desired priority.

Time-sharing operating systems

 The advantages of network operating systems are as follows −
  • Centralized servers are highly stable.
  • Security is a server managed.
  • Upgrades to new technologies and hardware can be easily integrated into the system.
  • Remote access to servers is possible of different locations and types of systems.
The disadvantages of network operating systems are as follows −
  • The high cost of buying and running a server.
  • Dependency on a central location for most operations.
  • Regular maintenance and updates are required.
Real Time operating System
        A real-time system is defined as a data processing system in which the time interval required to process and respond to inputs is so small that it controls the environment. The time taken by the system to respond to an input and display of required updated information is termed as the response time.

Services

     An Operating System provides services to both the users and to the programs.
  • It provides programs an environment to execute.
  • It provides users the services to execute the programs in a convenient manner.
Following are a few common services provided by an operating system −
  • Program execution
  • I/O operations
  • File System manipulation
  • Communication
  • Error Detection
  • Resource Allocation
  • Protection
Process
       A process is basically a program in execution. The execution of a process must progress in a sequential fashion.

    A process is defined as an entity which represents the basic unit of work to be implemented in the system. To put it in simple terms, we write our computer programs in a text file and when we execute this program, it becomes a process which performs all the tasks mentioned in the program.
   When a program is loaded into the memory and it becomes a process, it can be divided into four sections ─ stack, heap, text, and data. The following image shows a simplified layout of a process inside main memory.
Program
    A program is a piece of code which may be a single line or millions of lines. A computer program is usually written by a computer programmer in a programming language. For example, here is a simple program is written in C programming language −
#include <stdio.h>

int main() {
printf("Hello, World! \n");
return 0;
}

Process Scheduling Queues

The Operating System maintains the following important process scheduling queues −
·        Job queue − This queue keeps all the processes in the system.
·        Ready queue − This queue keeps a set of all processes residing in main memory, ready and waiting to execute. A new process is always put in this queue.
·        Device queues − The processes which are blocked due to unavailability of an I/O device constitute this queue.
        A Process Scheduler schedules different processes to be assigned to the CPU based on particular scheduling algorithms. There are six popular process scheduling algorithms which we are going to discuss in this chapter −
  • First-Come, First-Served (FCFS) Scheduling
  • Shortest-Job-Next (SJN) Scheduling
  • Priority Scheduling
  • Shortest Remaining Time
  • Round Robin(RR) Scheduling
  • Multiple-Level Queues Scheduling

What is Thread?

           A thread is a flow of execution through the process code, with its own program counter that keeps track of which instruction to execute next, system registers which hold its current working variables, and a stack which contains the execution history.
      A thread is also called a lightweight process. Threads provide a way to improve application performance through parallelism. Threads represent a software approach to improving the performance of the operating system by reducing the overhead thread is equivalent to a classical process.

I/O Hardware

         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

I/O Softwares

I/O software is often organized in the following layers −
·        User Level Libraries − This provides a 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.

File System

File

          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.

File Structure

A File Structure should be according to a required format that the operating system can understand.
·        A file has a certain defined structure according to its type.
·        A text file is a sequence of characters organized into lines.
·        A source file is a sequence of procedures and functions.
·        An object file is a sequence of bytes organized into blocks that are understandable by the machine.

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.
  • Authentication
  • One Time passwords
  • Program Threats
  • System Threats
  • Computer Security Classifications
   Linux is one of the popular version of UNIX operating System. It is open source as its source code is freely available. It is free to use. Linux was designed considering UNIX compatibility. Its functionality list is quite similar to that of UNIX.

Components of Linux System

 Linux Operating System has primarily three components
·      Kernel − Kernel is the core part of Linux. It is responsible for all major activities of this operating system. It consists of various modules and it interacts directly with the underlying hardware. The kernel provides the required abstraction to hide low-level hardware details to system or application programs.
·       System Library − System libraries are special functions or programs using which application programs or system utilities accesses Kernel's features. These libraries implement most of the functionalities of the operating system and do not requires kernel module's code access rights.
·        System Utility − System Utility programs are responsible to do specialized, individual level tasks.

No comments:

Post a Comment

Popular Posts