Operating System Tutorial: What is OS, Introduction, Features & Types, Multiprogramming, Multitasking, Multiprocessing Operating System and More - CodeTextPro | Web Tutorial | Technology

CodeTextPro.com Provides - Web design, Technology gyan, Digital marketing, Online earnings, Seo, Adsense, Technology news, Motivation and inspiration, Latest Technology Affairs, Gadgets, Blogging

Friday, October 18, 2019

Operating System Tutorial: What is OS, Introduction, Features & Types, Multiprogramming, Multitasking, Multiprocessing Operating System and More

Operating System

Introduction to Operating System

What is an Operating System?
It is a system software which provides an interface between user and computer hardware.

An operating system (OS) is a collection of software that manages computer hardware resources and provides common services for computer programs.


Computer System with OS:

operating system tutorial
operating system tutorial



In this operating system tutorial, you will learn:

  • operating system concepts
  • What is an Operating System?
  • Examples of Operating System
  • History Of OS
  • Multiprogramming Operating System
  • Multitasking Operating System
  • Multiprocessing Operating System
  • Batch Processing System
  • Real-time Operating System
  • Time-sharing Operating System
  • Function of Operating System
  • Common System Components
  • System Calls
  • Features of Operating System
  • Functions of an Operating System
  • Types of Operating system
  • Difference between Firmware and Operating System
  • Difference between 32-Bit vs. 64 Bit Operating System
  • The advantage of using Operating System
  • Disadvantages of using Operating System






Types of Operating System:

 Batch System: FORTRAN
 Multiuser System: UNIX
 Multitasking System: Windows
 Network System: Windows NT, Windows 2000
 Distributed System: V system, Chorus
 Real-time System: pSOS, RTLinux
 Embedded system: Palm OS




Multiprogramming Operating System:

Multiprogramming is the ability of an operating system to execute more than one program on a single processor machine. More than one task/program/job/process can reside into the main memory at one point of time. A computer running excel and Firefox browser simultaneously is an example of multiprogramming.


Multiprogramming Operating System


Multitasking Operating System:

  • Multitasking has the same meaning of multiprogramming but in a more general sense, as it refers to having multiple (programs, processes, tasks, threads) running at the same time.
  • This term is used in modern operating systems when multiple tasks share a common processing resource (e.g., CPU and Memory). At any time the CPU is executing one task only while other tasks waiting for their turn. The illusion of parallelism is achieved when the CPU is reassigned to another task (i.e., context switch).
  • There are subtle differences between multitasking and multiprogramming. A task in a multitasking operating system is not a whole application program but it can also refer to a “thread of execution” when one process is divided into sub-tasks.
  • Each smaller task does not occupy the CPU until it finishes like in the older multiprogramming but rather a fair share amount of the CPU time called quantum.
  • Just to make it easy to remember, both multiprogramming and multitasking operating systems are (CPU) time-sharing systems. However, while in multiprogramming (older OSs) one program as a whole keeps running until it blocks, in multitasking (modern OSs) time-sharing is best manifested because each running process takes only a fair quantum of the CPU time.


Multitasking Operating System:


Multiprocessing Operating System:

  • Multiprocessing is the ability of an operating system to execute more than one process simultaneously on a multi-processor machine. In this, a computer uses more than one CPU at a time.
  • In fact, multiprocessing refers to the hardware (i.e., the CPU units) rather than the software (i.e., running processes).
  • If the underlying hardware provides more than one processor then that is multiprocessing. Several variations on the basic scheme exist, e.g., multiple cores on one die or multiple dies in one package or multiple packages in one system Anyway, a system can be both multi-programmed by having multiple programs running at the same time and multiprocessing by having more than one physical processor.

Multiprocessing Operating System


Batch Processing System:

A batch processing system is generally, non-interactive environment. Batch is a collection of jobs which requires similar types of resources.

The users of a batch operating system do not interact with the computer directly. Each user prepares his job on an off-line device like punch cards and submits it to the computer operator. To speed up processing, jobs with similar needs are batched together and run as a group. The programmers leave their programs with the operator and the operator then sorts the programs with similar requirements into batches.

More than one job can be stored in main memory. Batches of same type of jobs can be executed quickly.



The problems with Batch Systems are as follows:

  • 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.



Real-time System:

Some jobs such as flight control, telephone switching, and missile control etc. require a response to events within a certain amount of time. These time sensitive jobs are called real-time jobs or process. An operating system that can service these processes in real time is called a Real-time Operating System.



There are two types of real-time operating systems:

Hard real-time systems:
Hard real-time systems guarantee that critical tasks complete on time. In hard real-time systems, secondary storage is limited or missing and the data is stored in ROM. In these systems, virtual memory is almost never found.


Soft real-time systems:
Soft real-time systems are less restrictive. A critical real-time task gets priority over other tasks and retains the priority until it completes. Soft real-time systems have limited utility than hard real-time systems. For example, multimedia, virtual reality, Advanced Scientific Projects like undersea exploration and planetary rovers, etc.



Time-sharing Operating Systems:

Time-sharing is a technique that enables many people, located at various terminals, to use a particular computer system at the same time. Time-sharing or multitasking is a logical extension of multiprogramming. The processor's time which is shared among multiple users simultaneously is termed as time-sharing. The main difference between Multi programmed Batch Systems and Time-Sharing Systems is that in the case of Multi programmed batch systems, the objective is to maximize processor use, whereas, in Time-Sharing Systems, the objective is to minimize response time.

Multiple jobs are executed by the CPU by switching between them, but the switches occur so frequently. Thus, the user can receive an immediate response. For example, in transaction processing, the processor executes each user program in a short burst or quantum of computation. That is, if n users are present, then each user can get a time quantum. When the user submits the command, the response time is in a few seconds at most. 

The operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of the time. Computer systems that were designed primarily as batch systems have been modified to time-sharing systems.




Advantages of Timesharing operating systems are as follows:

1. Provides the advantage of quick response
2. Avoids duplication of software
3. Reduces CPU idle time




Function of Operating System:

User view:

User Interface 
Program development and execution
Accessing I/O operations 
Accessing File systems 
Error detection


System view:

Resource manager 
Control Program 
Virtual machine manager



Common System Components:
• Process Management
• Main Memory Management
• File Management
• I/O System Management
• Secondary Storage Management
• Networking
• Protection System
• Command-Interpreter System



Process Management:
 A process is a program in execution.
 A process needs certain resources:
 CPU time, memory, files, and I/O devices, to accomplish its task.

The operating system is responsible for the following activities in connection with process management.

 Process creation and deletion.
 Process suspension and resumption.

Provision of mechanisms for:

 Process synchronization
 Communication between processes.



Main-Memory Management:

• Memory is a large array of words or bytes, each with its own address.
• It is a place of quickly accessible data shared by the CPU and I/O devices.
• Main memory is a volatile storage device. It loses its contents in the case of system failure.
• It is also costly.
• So the OS is responsible with memory management:

• It should keep track of which parts of memory are currently being used and by whom.
• It should decide which processes to load when memory space becomes available.
• It should allocate and DE allocates memory space as needed.



File Management:

A file is a collection of related information defined by its creator. Commonly, files represent programs (both source and object forms) and data.

The OS also is responsible for file management efficiently:
 File creation and deletion.
 Directory creation and deletion.
 Read, write & reposition control for multiple use of files.
 Support for manipulating files and directories attributes.
 Mapping files onto secondary storage.
 Efficient file backup in storage media.



I/O system management:

The main objective of OS should be to hide peculiarities of different I/O devices from users.

For this OS has an I/O subsystem which consists of:

 Buffer, caching, Spooling system which does memory management.
 A general device-driver interface which handles specifically each device.



Protection System:

Protection refers to a mechanism for controlling access to programs, processes, files.

In fact only authorized users should be allowed to gain access to the above resources.

The protection mechanism must:

 distinguish between authorized and unauthorized usage.
 specify the controls to be imposed.
 provide a means of enforcement.



System Calls:

System calls provide the interface between a running program and the operating system.

Generally available in assembly-language instructions.

But some High level languages (C,C++, etc.) also allows system calls to be made directly, through functions. System calls require a lot parameter passing and control but these are taken care by OS.



Different types of System Calls:

1. Process control:

 end, abort;
 load, execute:
 create process, submit job:
 getting and setting of attributes;
 terminate process
 wait
 signal event
 allocate and free memory



2. File Manipulation:

 Create and delete file;
 open, close;
 read, write, reposition;
 File attributes;



3. Device manipulation:

 request and release device;
 read, write;
 get and set device attributes;
 logically attach and detach devices.

4. Information Maintenance:

 get & set time & date.
 get & set process, file or device attributes.

No comments:

Post a Comment