1 of 14

21CA1205

Operating Systems

Session 2

Operating System Functionalities

© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED

1

2 of 14

Operating Systems Functions

3 of 14

Operating Systems Functions

  • Memory Management
  • Processor Management
  • File Management
  • Device Management
  • I/O Management
  • Secondary storage Management
  • Security …
  • Command Interpretation
  • Networking
  • Communication Management
  • Job Accounting

© 2016 KL University – The contents of this presentation are an intellectual and copyrighted property of KL University. ALL RIGHTS RESERVED

3

4 of 14

Process Management

  • A process is a program in execution. It is a unit of work within the system.
  • Program is a passive entity, while process is an active entity.
  • Process needs resources to accomplish its task
    • CPU, memory, I/O, files, etc.
    • Initialization of data
  • Process termination requires reclaim of any reusable resources
  • A thread is a basic unit of CPU utilization within a process.
    • Single-threaded process. Instructions are executed sequentially, one at a time, until completion
    • Process has one program counter specifying location of next instruction to execute
  • Multi-threaded process has one program counter per thread

5 of 14

Process Management Activities

  • Creating and deleting processes
  • Suspending and resuming processes
  • Providing mechanisms for process synchronization
  • Providing mechanisms for process communication
  • Providing mechanisms for deadlock handling

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

6 of 14

Memory Management

  • To execute a program all (or part) of the instructions must be in memory
  • All (or part) of the data that is needed by the program must be in memory.
  • Memory management determines what and when - in memory
    • Optimizing CPU utilization and computer response to users

  • Memory management activities

    • Keeping track of which parts of memory are currently being used and by whom
    • Deciding which processes (or parts thereof) and data to move into and out of memory
    • Allocating and deallocating memory space as needed

7 of 14

Storage Management

  • OS provides uniform, logical view of information storage
  • Abstracts physical properties to logical storage unit - file
  • Files are stored in a number of different storage medium.
    • Disk – the various types of disk are - hard disk drive (HDD) containing a non-removable disk, the floppy disk drive (FDD), and various optical disc drives (ODD)
    • Flash Memory is an EEPROM (electronically erasable programmable read-only memory) form of memory which does not require a power source to retain the data.  It’s a data-storage medium used with computers and other electronic devices.
    • Tape - is a data storage device that reads and writes data on a magnetic tape.
  • Each medium is controlled by device drivers (i.e., disk drive, tape drive)
    • Varying properties include access speed, capacity, data-transfer rate, access method (sequential or random)

8 of 14

File System Management

  • Files usually organized into directories
  • Access control on most systems to determine who can access what
  • OS activities include
    • Creating and deleting files and directories
    • Primitives to manipulate files and directories
    • Mapping files onto secondary storage
    • Backup files onto stable (non-volatile) storage media

9 of 14

Secondary-Storage Management

  • Usually disks used to store data that does not fit in main memory or data that must be kept for a “long” period of time
  • Proper management is of central importance
  • Entire speed of computer operation hinges on disk subsystem and its algorithms
  • OS activities
    • Free-space management
    • Storage allocation
    • Disk scheduling
  • Some storage need not be fast
    • Tertiary storage includes optical storage, magnetic tape
    • Still must be managed – by OS or applications

10 of 14

��Device Management, Security, �I/O System Management ��

  • Device Management: Device management keeps tracks of all devices. This module also responsible for this task is known as the I/O controller. It also performs the task of allocation and de-allocation of the devices.

  • Security: Security module protects the data and information of a computer system against malware threat and authorized access.

  • I/O System Management: One of the main objects of any OS is to hide the peculiarities of that hardware devices from the user.

11 of 14

Command Interpretation, Networking, Job Accounting, Communication Management

  • Command interpretation: This module is interpreting commands given by the user and acting on system resources to process that commands.
  • Networking: A distributed system is a group of processors which do not share memory, hardware devices, or a clock. The processors communicate with one another through the network.
  • Job accounting: Keeping track of time & resource used by various job and users.
  • Communication management: Coordination and assignment of compilers, interpreters, and another software resource of the various users of the computer systems.

12 of 14

Services of Operating System

  • Operating systems provide an environment for the execution of programs.
  • Operating systems provides certain services to:
    • Programs
    • Users of those programs
  • Basically two types of services:
    • Set of operating-system services provides functions that are helpful to the user:
    • Set of operating-system functions for ensuring the efficient operation of the system itself via resource sharing

13 of 14

OS Services Helpful to the User

  • File-system manipulation - Programs need to read and write files and directories, create and delete them, search them, list file Information, permission management.
  • Communications – Processes may exchange information, on the same computer or between computers over a network
    • Communications may be via shared memory or through message passing (packets moved by the OS)
  • Error detection – OS needs to be constantly aware of possible errors
    • May occur in the CPU and memory hardware, in I/O devices, in user program
    • For each type of error, OS should take the appropriate action to ensure correct and consistent computing
    • Debugging facilities can greatly enhance the user’s and programmer’s abilities to efficiently use the system

14 of 14

OS Services for Ensuring Efficient Operation

  • Resource allocation - When multiple users or multiple jobs are running concurrently, resources must be allocated to each of them
    • Many types of resources - CPU cycles, main memory, file storage, I/O devices.
  • Accounting - To keep track of which users use how much and what kinds of computer resources
  • Protection and security - The owners of information stored in a multiuser or networked computer system may want to control use of that information, concurrent processes should not interfere with each other
    • Protection involves ensuring that all access to system resources is controlled
    • Security of the system from outsiders requires user authentication, extends to defending external I/O devices from invalid access attempts