Sunday, February 26, 2017

Multiprocessing

    In the last blog, we have discuss Multithreading. In this blog, we will discuss Multiprocessing in Operating System.


What is Processing?
process

         A process is an instance of a computer program that is being executed. It contains the program code and its current activity. Depending on the operating system (OS), a process may be made up of multiple threads of execution that execute instructions concurrently.


Multiprocessing:
Multiprocessing

       System with two or more CPUs having ability to execute multiple processes concurrently. Multiple CPUs are used in process either instructions from different and independent programs or different instructions from the same program simultaneously. It is a general term that can mean the dynamic assignment of a program to one of two or more computers working in tandem or can involve multiple computers working on the same program at the same time (in parallel).

      There are two types of Multiprocessing:
  • Tightly Coupled:
    Tightly Coupled System
    Single system wide primary memory shared by all processors.
  • Loosly Coupled:
    Loosely Coupled System
    Each processor has its own local memory.

Multithreading

          In the last blog, we have discuss Multitasking.In this blog, we will discuss Multithreading in Operating System. It is not easy for some people to differentiate between Multi-threading, Multi-tasking and Multi-programming, but these are completely different ideas.

What is a thread?


Single and Multi Thread Process

     A thread is a basic unit of CPU utilization. Threads share a CPU in the same way as process do. All threads of a processes also share the same set of Operating System resources. All threads of a process inherit parent's address space and security parameters. Each thread of a process has its own program counter, its own register states, and its own stack. Thread is referred as mini-process or lightweight process

Multi-threading:


Multithreading

    Multithreading is the ability of an operating system process to manage its use by more than one user at a time and to even manage multiple requests by the same user without having to have multiple copies of the programming running in the computer. Each user request for a program or system service and here a user can also be another program, is kept track of as a thread with a separate identity. As programs work on behalf of the initial request for that thread and are interrupted by other requests, the status of work on behalf of that thread is kept track of until the work is completed.


Multitasking

      In the last blog, we have discuss Multi-Programming. In this blog we will discuss Multitasking in Operating System.

Multi-tasking:
Multi Tasking

      Multitasking Operating Systems interleaved execution of multiple job i.e often referred to as tasks of same user, in a single user System. Computer Systems used for multitasking are Uni-processor systems i.e having only one CPU. Multitasking is treated differently from multi-programming that refers to interleaved execution of multiple jobs in a multi-user systems.

   
Mutitasking Mechanism
 Multitasking Operating System allowing a user to perform more than one computer task at a time. These Operating Systems are able to keep track of where you are in these tasks and go from one to the other without losing information.

     Now a days all Operating Systems are multitasking  i.e Microsoft Windows, Linux etc. are examples of Multi tasking OS.
Multitasking Example
When you at a same time open Notepade and then open Internet Explorer, you are doing Multitasking.


Saturday, February 25, 2017

Multiprogramming


In last blogs, we have discuss Process Management and Mechanism used in Early System. In this blog, we will discuss Multi-programming, but before this we will briefly discuss Uni-programming.

Uni-Programming:
Uni-programming

              In uni-programming system, only one job is processed at a time and all system resources are available exclusively for the job until its completion.

Multi-Programming:
Multi-programming

            In multi-programming system, interleaved execution of two or more different and independent programs by a computer.
            There are two types of Multi programming:
  • With Fixed Tasks (MFT): Fixed number of jobs can be processed concurrently.
  • With Variable Tasks (MVF): Number of jobs vary.
          Are occupied by each job residing simultaneously in the Main memory is known as a Memory Partition.


Process States in Multiprogramming:

States of processing
        In Multi-programming system, there are three states of process which are:
  1. Ready: In this state process is occupied in Random Accessing Memory (RAM) and wait for execution.
  2. Running: In this state process allocated the CPU and execution is start on the process.
  3. Blocked: In Running state if process need any I/O operation, it goes to Blocked state and when I/O operation is completed it goes to Ready state.

Requirements of Multi programming:

  • Large Memory
  • Memory Protection
  • Job Status Preservation
  • Proper Job Mix
  • CPU Scheduling

Process Management Mechanisms in Early Systems

                    In my last blog, we have briefly discuss Process Management. In this blog, we will briefly discuss the Process Management Mechanism in Early System.

So we will discuss two types of Mechanism.

  • Manual Loading Mechanism
  • Batch Processing Mechanism
1) Manual Loading Mechanism:
Manual Loading

                  In manual loading mechanism, a computer operator was needed to manually loaded the processes/jobs one after another in a computer.

2) Batch Processing Mechanism:
Batch Processing


                  In batch processing mechanism,  a batch of processing was submitted together to the computer and job-to-job transition was done automatically by the Operating System.


 Job Control Language (JCL):

Use of Job control statements in Batch Processing

                 Job Control Language had a control statements which were used to facilitate job loading and unloading.


What is a Job?

             A  small program in execution which is called Job. We have two types of Job.
  • Central Processing Unit (CPU) Bound Job
  • Input/Output (I/O) Bound Job

1) CPU Bound: These Jobs are mostly perform computations with little I/O operations.
                e.g: Scientific and Engineering computations usually fall in this category.

2) I/O Bound: These Jobs are mostly perform Input/Output operations with little computations.
                e.g: Commercial data processing applications usually fall in this category.



What is Multi-programming?


Friday, February 24, 2017

Operating System Functions

In this blog we will briefly describe the Functions of an Operating System.

There are many functions those are performed by an Operating System, but the main goals of an OS are:

  • Process management
  • Memory management
  • File management
  • Security
  • Command interpretation

1) Process Management:


Process Management

            A process is a small program in execution which is also called Job. These processes/Jobs are submitted to a system. In system side it needs some management in a manner to minimize the idle time of a processors like CPU, I/O processors etc. These management are done in Process Management.


2) Memory Management:
Memory Management

            In Computer System, memory is important resource and it must be managed properly for all the overall system performance.
           We have two module for Memory management:

  • First one keeps track of parts of memory in use and parts not in use.
  • Second is allocates memory to processes when needed and deallocates memory when no longer needed.

3) File Management:
File Management

            A file is a collection of related information, it has a name, its data and its attributes. File's name uniquely identifies it in the system and is used by its users to access it. File's data is its contents and attributes contain information about date & time of its creation, date & time of last update, date & time of update, its current size and its protection features etc.
            File Management module of an Operating System takes care of file related activities such as structuring, accessing, naming, sharing and protection of files.


4) Security:
Security

          Various resources and information of a Computer System must be protecting against destruction and unauthorized access, as known as Security.
           There are two types of Computer System Security.

  • External Security: Securing Computer against external factors such as fires, floods, earthquakes, stolen disks/tapes, etc. by maintaining adequate backup, using security guards, allowing access to sensitive information to only trusted users, etc.
  • Internal Security: Securing Computer against user authentication, access control, and cryptography mechanism.

5) Command Interpretation: 
Command Interpretation

              Command Interpretation provides a set of commands using which the user can give instructions to the computer for getting some job done by it.
              Commands supported by the Command Interpretation module are known as System calls. Two types of user interfaces supported by various Operating Systems are:
  • Command line interface: User gives instructions to the computer by typing the commands.
  • Graphical User interface: User gives commands to the system by selecting icon or menu item displayed on the screen with the use of a point and draw device.

What is Operating System (OS)?

Operating system is an Integrated set of programs that control the resources of a computer system.OS provides its user with an interface or virtual machine that is more convenient to use then the bare machine.


OS-Types
Operating Systems

Objectives of  an OS are:

  1. Making a computer system convenient to use.
  2. Managing the resources of a computer.
  3. Provide an environment in which a user can execute a programs.
      4. Allow user to use the computer hardware in an efficient manner.

Types of operating System:
OS types
Types of operating system


Below is a basic list of the types of operating systems and a few examples of operating systems that fall into each of the types.
1)Graphical User Interface- 
OS with GUI
GUI Operating System
a GUI operating system contains graphics and icons and is commonly navigated by using a computer mouse. See the GUI definition for a complete definition. Examples of GUI operating systems are:
System 7.x
Windows 98
Windows CE
2)Multi-user -
Multi-user operating System
 A multi-user operating system allows for multiple users to use the same computer at the same time and different times. See the multi-user definition for a complete definition. Examples of operating systems that would fall into this category are:
Linux
Unix
Windows 2000
3)Multiprocessing - 
Multi-processing operating system
An operating system capable of supporting and utilizing more than one computer processor. Examples of operating systems that would fall into this category are:
Linux
Unix
Windows XP
4)Multitasking - 
Multi-tasking operating system
An operating system that is capable of allowing multiple software processes to run at the same time. Examples of operating systems that would fall into this category are:
Linux
Unix
Windows 8
5)Multithreading -
Multi-threading operating system
 Operating systems that allow different parts of a software program to run concurrently. Examples of operating systems that would fall into this category are:
Linux
Unix
Windows XP


Functions of Operating system