Sunday, 7 June 2020

Unit-2 : Operating System (Notes of TU BSc. 4th Year Computer Science)

Operating System

Syllabus : What is an Operating System? Functions of Operating System (Process Management, Memory Management, File Management, Device Management, Security Management); Examples of operating systems: UNIX, LINUX & Windows.  



It is a system software that is responsible for controlling and coordinating computer hardware and providing easy interface to the application programmers and users by hiding underlying complexities of computer hardware. Thus, operating system acts as an interface between users or application programs and computer hardware. Some examples are Windows, Unix, Linux, Mac OS, etc.

Objectives of OS
  1. To make a computer system convenient to use in an efficient manner.
  2. To hide details of the hardware resources from the users.
  3. To provide users a convenient interface to use the computer system.
  4. To act as an intermediary between the hardware and its users & making it easier for the users to access and use resources.
  5. To provide efficient and fair sharing of resources among users and programs.

Functions of operating system
Operating systems direct and control the allocation of processor, memory and peripheral devices to various programs that use it. Overall we can say OS is responsible for managing resources in the computer system. Some functions of OS are:
  1. Process Management
  2. Memory Management
  3. File Management
  4. Device Management
  5. Security Management

A) Process Management
A set of instruction stored in secondary storage device is called program. As CPU executes a large number of programs. While its main concerns is the execution of user programs, the CPU is also needed for other system activities. These activities are called process management. Likewise,
  • Batch job is a process.
  • A time shared user program is a process.
  • A system task such as spooling is a process.
The OS is responsible for following activities in connection with process management.
  1. The creation and deletion of both user and system processes.
  2. The suspension and resumption of processes.
  3. The provision of mechanism for process synchronization.
  4. The provision of mechanism for dead lock handling.

B) Memory Management
Refers to management of primary memory or main memory. Memory is the most expensive part in the computer system. Memory is a large array of words or bytes, each with its own address. Interaction is achieved through sequence of reads and writes of specific memory address.
CPU fetches from and stores in memory. There are various algorithm that depend on the particular situation to manage the memory. 
OS is responsible for the following activities in connection with memory management.
  1. Keep track of which parts of memory are currently being used and by whom.
  2. Decide which processes are to be loaded into memory when memory space becomes available.
  3. Allocate and deallocate memory space as needed.

C) File Management
A file system is normally organized into directories for easy navigation and usage. File management is one of the most visible services of an OS. Files are mapped by OS onto physical devices. A file is a collection of related information defined by its creator. Commonly files may be numeric, alphabetic or alphanumeric.
In general, a files is a sequence of bits, bytes, lines or records whose meaning is defined by its creator and user.
The OS implements the abstract concepts of the file by managing mass storage device, such as types and disks.
The OS is responsible for the following activities in connection to the file management:
  1. Creation and deletion of files
  2. Creation and deletion of directory
  3. Support of primitives for manipulating files and directories
  4. Mapping of files onto disk storage
  5. Backup of files onto stable storage
  6. Protection and security of the files

D) Device Management
Hardware devices typically provide the ability to input data into computer or output data from the computer.
One of the purpose of an OS is to hide the peculiarities or specific hardware devices form the user. For example: in UINX, the peculiarities of I/O devices are hidden from the bulk of OS itself by I/O system.
The operating system is responsible for the following activities in connection to I/O management.
  1. A buffer caching system
  2. To activate a general device driver code
  3. To run the driver software for specific hardware devices as and when required

E) Security Management
Various processed in an OS must be protected from each  other’s activities. For that purpose, various mechanisms which can be used to ensure that the files, memory segment, CPU and other resources can be operated only by those processed that have gained proper authorization from the OS.
Protection refers to a mechanism for controlling the access of programs, processes or user to the resources define by a computer controls to be imposed together with some means of enforcement.

Examples of Operating System

  1. UNIX : It is a multi-user time sharing operating system. It is developed in the early 1970s at Bell Laboratories by Ken Thompson and Dennis Ritchie for PDP-11 computers.
    - It was the first operating system to be written in a high level language C.
    - It is easily portable to multiple systems.
    - It can be used in various systems ranging from portable computers to super computers.
  2. LINUX : It is an open source operating system. It is a multitasking and multiprocessing OS designed for use on personal computers.
    - It was developed by Torvalds.
    - LINUX was designed considering UNIX compatibility. LINUX system architecture consists of the following layers,
    a) Hardware layer
    b) Kernel
    c) Shell
    d) Utilities
  3. Windows : It is meta-family of graphical operating systems developed, marketed and sold by Microsoft. It consists of several families of OS each of which related to a certain sector of the computing industry.
    Microsoft introduced an operating environment named Windows on November 20, 1985 as a graphical operating system shell for MS-DOS in response to the growing interest in graphical user interface (GUIs).
    The most version of windows for personal computers, smartphones are respectively Windows 10, Windows Phone 10 and Windows Embedded 10.
    Features of using Windows:
    - easier to learn
    - allows the user to work on a number of application.
    - failure to any application don’t harm computer system
    - has many built in programs
    - has fast processing capability
    - helps to run multiple application at a time
    - it is GUI based software
Here is the Downloadable PDF of Unit-2 : Operating System

Click here for 2073-Long Answer Question


Click here for 2074-Long Answer Question


Click here for 2075-Long Answer Question


Click here for 2076-Long Answer Question



1 comment: