For more notes visit https://collegenote.pythonanywhere.
com
 Course Contents Course Contents
 Unit-06:Computer Software (6 Hrs.) Unit-06: Computer Software
  Introduction; Types of Software; System Software;  Introduction
 Application Software; Software Acquisition; Operating  Types of Software: System Software Vs Application Software
 System (Introduction, Objectives of Operating  Software Acquisition
 System, Types of OS, Functions of OS, Process
  Operating System
 Management, Memory Management, File Management,
 • Introduction
 Device Management, Protection and Security, User
 • Objectives of Operating System
 Interface, Examples of Operating Systems)
 • Types of OS
 • Functions of OS (Process Management, Memory Management, File
 Management, Device Management, Protection and Security, User
 Interface)
  Examples of Operating Systems
 Computer Software Computer Software
 Chapter Objectives: 2.1. Introduction to software
  The computer, as a machine, can do nothing without the  Computer is made with hardware and Software.
 software.
  Hardware is the physical equipments that are necessary
  Software is required for the functioning of computer. for performing various operations i.e. reading and
 processing data, storing results and providing output to
  Software programs instruct computer about the actions to
 the users in a desired form.
 be performed, so as to get the desired output.
  Hardware can’t perform any task on its own and needs to
 be instructed about the task to be performed.
 So purpose of this chapter is to introduce you to the different
  So to enable the hardware to work, a set of computer
 categories of software.
 programs are required and is called Computer Software.
 Computer Software Computer Software
 2.1. Introduction to software Software broadly classified in 2 categories:
  Software refers to a set of computer programs that are 1. System software
 required to enable the hardware to work and perform
 operations i.e. reading and processing data, storing 2. Application Software
 results and providing output effectively.
  A computer software(program) is basically a set of
 logical instructions written in a computer programming
 language that tells the computer how to accomplish a
 task.
  Different sets of software can be loaded on the same
 hardware to perform different kinds of tasks.
For more notes visit https://collegenote.pythonanywhere.com
 Computer Software Computer Software
 System Software: System software Vs Application Software:
 System sw is a group of programs that direct the internal
  System sw provides the basic function of the
 operations of computer system such as controlling I/O
 computer while application sw is used by the
 devices, managing the storage area within the computer
 users to perform specific tasks.
 etc.
 Functions of system software are:  The system sw interacts with hardware
  To provide basic functionality to computer, at one end and with application sw at
  To control computer hardware, and the other end. Application SW
  To act as an interface between user, application sw and  The application sw interacts with the
 computer hardware. system sw and the users of the System SW
 System sw also provides the services(tools) for the computer.
 development and execution of application software.
 Computer Software Software Hierarchy
 System software Vs Application Software: Types of computer Software:
 System Software (SS) Application Software (AS) Types of Computer Software
 SS is used for operating computer AS is used by user to perform specific
 hardware. task.
 System Software Application Software
 SS are installed on the computer when AS are installed according to user’s
 operating system is installed. requirements.
 For Computer For Developing Tailored Software Packaged
 In general, the user does not interact
 Management Software (Customized) Software
 with SS because it works in the In general, the user interacts with AS.
 background.
 SS can run independently. It provides AS can’t run independently. They can’t
 Programming Translator Linker Loader
 platform for running application run without the presence of system
 Languages Software
 softwares. software. Operating Device System
 Some examples of SS are OS, Some examples of AS are word System Drivers Utilities
 compiler, assembler, debugger, driver, processor, web browser, media player, Assembler Compiler Interpreter
 etc. etc.
 System Software Computer Software
 System software for Computer Management: System Software:
  System SW includes Operating system, device drivers, and
 system utilities. System Software
  System software is required for managing the operations
 performed by the components of computer (CPU, Memory, file For Computer For Developing
 Management Application Software
 storage) and Input-output devices attached to the computer.
  It provides services required for the development and execution
 of application software. Programming Translator Linker Loader
 Languages Software
  The programming language software, translator software, loader, System
 Operating Device
 and linker are also categorized as system software, and are System Drivers Utilities
 required for the application software development. Assembler Compiler Interpreter
For more notes visit https://collegenote.pythonanywhere.com
 Computer Software System Software
 SS for computer SS for Developing Application Operating System:
 management: Software:
  Different kinds of application software use
 1. Operating System 1. Programming Languages
 specific hardware resources of a computer
  High-level Language
 2. Device Driver like CPU, I/O devices and memory.
  Assembly Language
 3. System Utilities  OS controls and coordinates the use of
  Machine Language
 hardware among the different application
 2. Translator Software
 software and the users.
  Assembler
  Compiler  OS provides an interface that is convenient
  Interpreter for the user to use, and facilitates efficient
 operations of the computer system resources.
 3. Linker
 4. Loader
 System Software System Software
 Operating System: The key functions of OS are: Device Driver:
  A device driver acts as a translator between the hardware and the software
  It provides an environment in which users and application software can do
 work. that uses the devices.
  Devices(printer, speakers, microphone, webcam, scanner, digital camera
  It manages different resources of the computer like the CPU time, memory
 space, file storage, I/O devices etc. During the use of computer by other etc.) that are connected to the computer must be installed its corresponding
 programs or users, operating system manages various resources and device driver for proper working of a device.
 allocates them whenever required, efficiently.  For example, when we give a command to read data from the hard disk, the
 command is sent to the hard disk driver and is translated to a form that the
  It controls the execution of different programs to prevent occurrence of
 hard disk can understand. The device driver software is typically supplied by
 error.
 the respective device manufacturers.
  It provides a convenient interface to the user in the form of commands and
  Operating system comes preloaded with some commonly used device
 graphical interface, which facilitates the use of computer.
 drivers i.e. for mouse, webcam, and keyboard and the operating system can
 Some available operating systems are Microsoft Disk Operating System (MS-DOS), automatically detect the device when it is connected to the computer. Such
 Windows7, Windows XP, Linux, UNIX, and Mac OS X Snow Leopard. devices are called plug and play devices.
 System Software System Software
 Device Driver: System Utilities:
  Each device has its own device driver. System utility software is required for the maintenance of computer. System
 utilities are used for supporting and enhancing the programs and the data in
  Whenever a new device is connected to a computer, its device driver has to
 computer. Some system utilities may come embedded with OS and others may be
 be loaded in the computer’s memory, to enable use of the device. added later on. Some examples of system utilities are:
  When you buy a new printer, you get the device driver CD with it. You must  Anti-virus utility to scan computer for viruses (Figure 6.5).
 install the device driver on your computer, to use the new printer. Each  Data Compression utility to compress the files.
 printer comes with its own device driver.
  Cryptographic utility to encrypt and decrypt files.
  Device drivers can be character or block device drivers. Character device  Disk Compression utility to compress contents of a disk for increasing the
 drivers are for character based devices like keyboard, which transfer data capacity of a disk.
 character by character. Block device driver are for devices that transfer data  Disk Partitioning to divide a single drive into multiple logical drives. Each
 as a block, like in hard disk. drive is then treated as an individual drive and has its own file system.
  Disk Cleaners to find files that have not been used for a long time. It helps the
 user to decide what to delete when the hard disk is full.
For more notes visit https://collegenote.pythonanywhere.com
 System Software System Software
 System Utilities: Programming Languages:
  A Programming Language consists of a set of vocabulary and grammatical
 rules, to express the computations and tasks that the computer has to perform.
  Backup Utility to make a copy of all information stored on the disk. It also
  Programming languages are used to write a program, which controls the
 restores the backed up contents in case of disk failure.
 behavior of computer, codify the algorithms precisely, or enables the human-
  System Profiling Utility provides detailed information about the software computer interface.
 installed on the computer and the hardware attached to it.
  Each language has a unique set of keywords (words that it understands) and a
  Network Managers to check the computer network and to log events. special syntax for organizing program instructions.
  The programming language should be understood, both by the programmer
 (who is writing the program) and the computer.
  A computer understands the language of 0∙s and 1∙s, while the programmer is
 more comfortable with English-like language.
  Programming Language usually refers to high-level languages like COBOL,
 BASIC, FORTRAN, C, C++, Java etc. Programming languages fall into three
 categories
 System Software System Software
 Programming Languages: Programming Languages:
 Programming languages fall into three categories:
  Machine Language is what the computer can  Machine languages and assembly languages are also called low-level
 understand but it is difficult for the languages, and are generally used to write the system software.
 programmer to understand. Machine languages  Application software is usually written in high-level languages.
 consist of numbers only. Each kind of CPU has High level Program needs  The program written in a programming language is also called the source
 its own unique machine language. to be converted into code.
  Assembly Language falls in between machine machine language so that
 language and high-level language. They are the computer can
 similar to machine language, but easier to understand it. In order to
 program in, because they allow the do this a program is either
 compiled or interpreted.
 programmer to substitute names for numbers.
  High-level Language is easier to understand
 and use for the programmer but difficult for the
 computer.
 System Software System Software
 Machine Language: Machine Language:
 A program written in machine language is a collection of binary digits or bits  Computers may differ in other details, such as memory arrangement,
 that the computer reads and interprets. It is a system of instructions and data operating systems, and peripheral devices and a program normally relies on
 executed directly by a computer’s CPU. It is also referred to as machine code such factors. Different computer may not run the same machine language
 or object code. program, even when the same type of processor is used.
  The computer can understand the programs written in machine language  Most machine-level instructions have opcode fields which specify the basic
 directly. No translation of the program is needed. instruction type (such as arithmetic, logical, jump, etc) and operand, the
  Program written in machine language can be executed very fast (Since no actual operation to be performed on.
 translation is required).  It is difficult to write a program in machine language as it has to be written
  Machine language is defined by the hardware of a computer. It depends on in binary code. For e.g., 00010001 11001001. Such programs are also
 the type of the processor or processor family that the computer uses, and is difficult to modify.
 thus machine-dependent.
  Since writing programs in machine language is very difficult, programs are
  A machine- level program written on one computer may not work on
 hardly written in machine language.
 another computer with a different processor.
For more notes visit https://collegenote.pythonanywhere.com
 System Software System Software
 Assembly Language: Assembly Language:
  A program written in assembly language uses symbolic representation of  Assembly language programs are easier to write than the machine language
 machine codes needed to program a particular processor (CPU) or programs, since assembly language programs use short, English-like
 processor family. This representation is usually defined by the CPU representation of machine code.
 manufacturer, and is based on abbreviations (called mnemonics) that help  The program written in assembly language is the source code, which has to
 the programmer remember individual instructions, registers, etc. Small, be converted into machine code, also called object code, using translator
 English-like representation is used to write the program in assembly software, namely, assembler.
 language. Each line of the assembly language program is converted into one or more
 
 Some of the features of a program written in assembly language are as follows: lines of machine code. Hence assembly language programs are also
 machine-dependent.
  Although assembly language programs use symbolic representation, they
 are still difficult to write.
  Assembly language programs are generally written where the efficiency
 and the speed of program are the critical issues, i.e. programs requiring
 high speed and efficiency.
 Computer Software Computer Software
 System Software:  Programming Languages
  The programming language software, translator
 software, loader and linker are also categorized as
  Translator Software
 system software which are required for application
 1. Assembler
 software development.
 2. Compiler
 3. Interpreter
  Linker
  Loader
 Computer Software Computer Software
 Programming Languages: Translator Software:
  A programming language is a vocabulary and set of grammatical Every program must be translated into a machine language that the
 rules for instructing a computer to perform specific tasks. computer can understand. This translation is performed by.
 1. Compiler - (Use in High Level Language)
  A programming language is a computer language engineered to
 2. Interpreter - (Use in High Level Language)
 create a standard form of commands.
 3. Assembler - (Use in Assembly Language)
  There are many programming languages -- C, C++, Pascal, BASIC,  A program that executes instructions written in a high-level
 FORTRAN, COBOL, Java and LISP are just a few. These are all language. There are two ways to run programs written in a high-
 high-level languages. level language.
  Programs can also write in low-level languages called assembly  The most common is to compile the program; the other method is
 languages. to pass the program through an interpreter.
  Low-level languages are closer to the language used by a  Assembly is a programming language that consists of instructions
 computer, while high-level languages are closer to human in mnemonic codes and assembler convert the mnemonics codes
 languages. into machine language instruction.
For more notes visit https://collegenote.pythonanywhere.com
 Computer Software Computer Software
 Translator Software: Linker and Loader:
  An interpreter translates high-level instructions into an intermediate  Linker is a program that links several object modules and
 form, which it then executes. libraries to a single executable program.
  Compiler translates high-level instructions directly into machine
 language.  A source code may also include reference to libraries(header)
 and independent modules(functions) which may not be stored
  The interpreter does not need to go through the compilation stage
 during which machine instructions are generated. in a single object file. The code is broken down into many
 independent modules for easy debugging and maintenance.
  Interpreters are sometimes used during the development of a
 program, when a programmer wants to add small sections at a time
 Before execution of the program, these modules and the
 and test them quickly. required libraries are linked together using the linker software.
  In addition, interpreters are often used in education because they  The compiled and the linked program are called the executable
 allow students to program interactively. code.
 Computer Software Computer Software
 Linker and Loader: Linker and Loader:
  The loader software is used to load and re-locate the executable  The key difference between linker and loader is that
 program in the main memory. Software has to be loaded into the linker generates the executable file of a program
 the main memory during execution. Loader assigns storage whereas, the loader loads the executable file obtained
 space to the program in the main memory for execution. from the linker into main memory for execution.
  The linker intakes the object module of a program
 generated by the assembler.
 Computer Software Computer Software
 Application Software: Tailored Software (Customized):
 Software written by user to solve a specific user oriented Designed to meet the specific requirements of an
 problem using computer is known as application sw. organization or individuals and developed on demand of
 Software accomplishing a specific task is the application sw. customer by software contractor.
 Examples: Word processor, Spread sheet, Database,
 Engineering packages(CAD/CAM), etc.  Written using high level programming language such as
 c, C++, Java, VB etc.
 Further grouped into two types as follows:  Examples: Air traffic control system, school billing system
 1. Tailored Software (Customized) etc.
 2. Packaged Software
For more notes visit https://collegenote.pythonanywhere.com
 Computer Software Computer Software
 Packaged Software: Program Vs Software:
  Generalized set of programs designed and developed for
 general purpose.  Programs are developed by individuals for their
 personal use. They are generally, small in size and have
  Produced by development organization and sold on the
 limited functionality. The author of a program himself
 open market to any customer who is able to buy and use.
 uses and maintains his program, these usually do not
  Also called universal software as it can be used by users have a good user interface and lack of proper
 and organizations all over the world. documentation.
  Examples: Word processor, Spread sheet, Database,  Whereas Software products have multiple users and
 Engineering packages(CAD/CAM), etc. therefore should have a good user interface, proper
 operating procedures, and good documentation support.
 Computer Software Computer Software
 Program Vs Software: Program Vs Software:
  Programs are developed by individuals for their
 personal use. They are generally, small in size and have
 limited functionality. The author of a program himself
 uses and maintains his program, these usually do not
 have a good user interface and lack of proper
 documentation.
  Whereas Software products have multiple users and
 therefore should have a good user interface, proper
 operating procedures, and good documentation support.
 Computer Software Computer Software
 Software Acquisition: Software Acquisition:
 The Software Acquisition is a computer-aided system that  Retail software: is off-the-shelf software sold in retail stores. It comes
 supports the improvement of an organization's software with printed manuals and installation instructions.
 acquisition process capability and performance.  OEM: “Original Equipment Manufacturer” refers to software which is
 sold, and bundled with hardware. Microsoft sells its operating system as
  Retail software OEM software to hardware dealers. OEM software is sold at reduced price,
  OEM (Original Equipment Manufacturer) software without the manuals, packaging and installation instructions.
  Shareware : is a program that the user is allowed to try for free, for a
  Shareware specified period of time, as defined in the license. It is downloadable from
  Freeware the Internet. When the trial period ends, the software must be purchased or
  Open source software uninstalled.
  Public Domain software
  Demo software
For more notes visit https://collegenote.pythonanywhere.com
 Computer Software Computer Software
 Software Acquisition: Software Acquisition:
  Freeware : is software that is free for personal use. It is downloadable  Public Domain Software: is free software. Unlike freeware, public
 from the Internet. The commercial use of this software may require a paid domain software does not have a copyright owner or license restrictions.
 license. The author of the freeware software is the owner of the software, The source code is publicly available for anyone to use. Public domain
 though others may use it for free. The users abide by the license terms, software can be modified by the user.
 where the user cannot make changes to it, or sell it to someone else.  Demo Software: is designed to demonstrate what a purchased version of
  Open source software : is software whose source code is available and the software is capable of doing and provides a restricted set of features. To
 can be customized and altered within the specified guidelines laid down by use the software, the user must buy a fully- functional version.
 the creator. Unlike public domain software, open-source software has
 restrictions on their use and modification, redistribution limitations, and
 copyrights. Linux, Apache, Firefox, OpenOffice are some examples of
 open-source software.
 Course Contents Course Contents
 Unit-06: Computer Software
  Introduction
  Types of Software: System Software Vs Application Software
  Software Acquisition
  Operating System
 • Introduction
 Operating System
 • Objectives of Operating System
 • Types of OS
 • Functions of OS (Process Management, Memory Management, File
 Management, Device Management, Protection and Security, User
 Interface)
  Examples of Operating Systems
 Course Contents Operating system
 Unit-06: Computer Software Operating system:
  Introduction
 An operating system (OS) is software that allows a user to
  Types of Software: System Software Vs Application Software run other applications on a computing device. The operating
  Software Acquisition system manages a computer's hardware resources including
  Operating System I/O devices, CPU, memory etc.
 • Introduction
 • Objectives of Operating System
 • Types of OS
 • Functions of OS (Process Management, Memory Management, File
 Management, Device Management, Protection and Security, User
 Interface)
  Examples of Operating Systems
For more notes visit https://collegenote.pythonanywhere.com
 Operating system Course Contents
 Operating system: Objectives of Operating System:
  An operating system is the most important software that runs on a  Operating system is system software that controls and coordinates the use
 computer. of hardware among the different application software and users.
  OS intermediates between the user of computer and the computer
  OS manages the computer’s memory and processes, as well as all of
 hardware.
 its software and hardware.
  The user gives a command and the OS translates the command into a form
  It also allows use to communicate with the computer without knowing that the machine can understand and execute.
 how to speak the computer's language.
  OS has two main objectives
  Computer is useless without an operating system. 1. to make the computer system convenient and easy to use, for the user,
 and
 2. to use the computer hardware in an efficient way, by handling the
 details of the operations of the hardware.
 Operating system Operating system
 Types of Operating System: Types of Operating System:
  Single User and Single Task OS: As the name implies, this operating system is
 designed to manage the computer so that one user can effectively do one thing at
  OS are classified into different types depending on their capability of a time. Operating system for Personal Computers (PC) are single user OS. MS-
 processing DOS is an example of single user OS.
 1. Single user  Single-user, multi-tasking: allows execution of more than one task or process
 2. Multiuser concurrently. For this, the processor time is divided amongst different tasks. This
 division of time is also called time sharing. The processor switches rapidly
 3. Multitasking
 between processes. The user can switch between the applications and also
 4. Multiprocessing transfer data between them. Windows 95 and all later versions of Windows are
 5. Real time examples of multitasking OS.
 6. Embedded  Multi-user OS: A multi-user operating system allows many different users to take
 7. Distributed advantage of the computer's resources simultaneously. Multi-user is used in
 computer networks that allow same data and applications to be accessed by
 multiple users at the same time. The users can also communicate with each other.
 Linux, UNIX, and Windows 7 are examples of multiuser OS.
 Operating system Operating system
 Types of Operating System: Types of Operating System:
  Multiprocessing OS: have two or more processors for a single running process.  Embedded: Embedded OS is embedded in a device in the ROM. They are
 Processing takes place in parallel and is also called parallel processing. Each specific to a device and are less resource intensive. They are used in appliances
 processor works on different parts of the same task, or, on two or more different like microwaves, washing machines, traffic control systems etc.
 tasks. Since execution takes place in parallel, they are used for high speed
  Distributed: A distributed operating system manages a group of independent
 execution, and to increase the power of computer. Linux, UNIX and Windows 7
 computers and makes them appear to be a single computer.
 are examples of multiprocessing OS.
  Real-time operating system(RTOS): Real Time OS are designed to respond to
 an event within a predetermined time. These operating systems are used to
 control processes. Processing is done within a time constraint. OS monitors the
 events that affect the execution of process and respond accordingly. LynxOS is an
 example of real time OS. RTOS is used to control machinery, scientific
 instruments and industrial systems.
For more notes visit https://collegenote.pythonanywhere.com
 Operating System Course Contents
 Functions of Operating System: Functions of Operating System:
 1. Process Management: The process management
 1. Process Management activities handled by the OS are
 2. Memory Management 1) Control access to shared resources like file, memory, I/O
 and CPU,
 3. File Management 2) Control execution of applications
 4. Device Management 3) Create, execute and delete a process (system process or
 5. Protection and Security user process),
 6. User Interface 4) Cancel or resume a process
 5) Schedule a process, and
 6) Synchronization, communication and deadlock handling
 for processes.
 Course Contents Course Contents
 Functions of Operating System: Functions of Operating System:
 2. Memory Management : The activities of memory 3. File Management: The file management tasks include
 management handled by OS are 1) create and delete both files and directories,
 1) allocate memory, 2) provide access to files,
 2) free memory, 3) allocate space for files,
 3) re-allocate memory to a program when a used block is freed, 4) keep back-up of files, and
 and 5) secure files.
 4) keep track of memory usage.
 4. Device Management: The device management tasks
 handled by OS are
 1) open, close and write device drivers, and
 2) communicate, control and monitor the device driver.
 Course Contents Process Management
 Functions of Operating System: 1. Process Management:
 5. Protection and Security: a. Program Vs Process
 c. Process Synchronization
  OS protects the resources of system. User authentication, b. CPU Scheduling
 file attributes like read, write, encryption, and back-up of • What is scheduling? d. Deadlock
 data are used by OS to provide basic protection. 1. Non-pre-emptive scheduling • What is Deadlock?
 2. Pre-emptive scheduling • What are the reasons for
 • Scheduling algorithms deadlock?
 6. User Interface or Command Interpreter:
 are? 1. Mutual Exclusion
  Operating system provides an interface between the 2. No Pre-emption
 1. First Come First Served
 computer user and the computer hardware. The user (FCFS) Scheduling 3. Hold and Wait
 interface is a set of commands or a graphical user 2. Shortest Job First (SJF) 4. Circular Wait
 interface via which the user interacts with the applications Scheduling
 3. Round Robin (RR)
 and the hardware. Scheduling
For more notes visit https://collegenote.pythonanywhere.com
 Process Management Process Management
 1. Process Management: 1. Process Management:
 Program Vs Process Program Vs Process
  A program is an executable file which contains a certain set of instructions  A process is a program in a state of execution. It is a unit
 written to complete the specific job on your computer. Programs are never of work for the operating system. A process can be
 stored on the primary memory in your computer. Instead, they are stored on
 created, executed, and stopped.
 a disk or secondary memory and are read from the primary memory and
 executed by the OS.  In contrast, a program is always static and does not have
  A process is an execution of any specific program. It is considered an any state. A program may have two or more processes
 active entity that actions the purpose of the application. Multiple processes running. A process and a program are, thus, two different
 may be related to the same program. entities.
 Process Management Process Management
 1. Process Management: 1. Process Management:
 Program Vs Process BASIS FOR
 PROGRAM PROCESS
 Example of Program and Process: COMPARISON
 Basic Program is a set of When a program is
 Program to transfer Rs10 from account X to Y and add Rs5
 instruction. executed, it is known
 to account X. as process.
 Process-1 Process-2 Process-1 Process-2 Process-1 Process-2
 read_item(X); read_item(X);
 Nature Passive Active
 read_item(X);
 X:=X-10;
 X:=X+5;
 X:=X-10; Lifespan Longer Limited
 write_item(X); write_item(X);
 write_item(X); read_item(X);
 read_item(Y);
 Y:=Y+10; read_item(X); X:=X+5;
 Required resources Program is stored on Process holds
 write_item(Y); X:=X-10; write_item(X); disk in some file and resources such as
 read_item(X); write_item(X); read_item(Y); does not require any CPU, memory
 X:=X+5; read_item(Y); Y:=Y+10; other resources. address, disk, I/O etc.
 Y:=Y+10;
 write_item(X); write_item(Y);
 write_item(Y);
 Process Management Process Management
 1. Process Management: 1. Process Management: Waiting: process is in waiting
 Program Vs Process Program Vs Process state when it waits for some
  To accomplish a task, a process needs to have access to event to happen (I/O etc), and
 Process states are:
 different system resources like I/O devices, CPU, memory Terminated: process that has
 New: process is in a new state
 etc. The process management function of an operating finished execution is in
 when it is created,
 system handles allocation of resources to the processes in terminated state.
 Ready: process is in ready
 an efficient manner. The allocation of resources required
 state when it is waiting for a
 by a process is made during process creation and process
 processor,
 execution.
  A process changes its state as it is executed. The various Running: process is in running
 states that a process changes during execution are as state if processor is executing
 follows in Figure next slide….. the process,
For more notes visit https://collegenote.pythonanywhere.com
 Process Management Process Management
 1. Process Management: 1. Process Management:
 Program Vs Process b. CPU Scheduling
  The concurrent execution of the process requires process • What is scheduling?
 1. Non-pre-emptive scheduling
 synchronization and CPU scheduling and deadlock
 2. Pre-emptive scheduling
 situations of processes which are described in the
 following slides. • Scheduling algorithms are?
 1. First Come First Served (FCFS) Scheduling
 2. Shortest Job First (SJF) Scheduling
 3. Round Robin (RR) Scheduling
 Process Management Process Management
 1. Process Management: 1. Process Management:
 b. CPU Scheduling b. CPU Scheduling
 • What is scheduling? • What is scheduling?
  All computer resources like I/O, memory, and CPU are to  Scheduler is a component of the operating system that is
 be scheduled for use. responsible for scheduling transition of processes. At any
  In a multiprogramming and time sharing system, the one time, only one process can be in running state and
 processor executes multiple processes by switching the the rest are in ready or waiting state. The scheduler
 CPU among the processes, so that no user has to wait for assigns the processor to different processes in a manner
 long for a program to execute. To enable running of so that no one process is kept waiting for long.
 several concurrent processes, the processor time has to  Scheduling can be of two types:
 be distributed amongst all the processes efficiently. 1. Non-pre-emptive scheduling
 2. Pre-emptive scheduling
 Process Management Process Management:
 1. Process Management: b. CPU Scheduling : Scheduling algorithms are?
  First Come First Served (FCFS) Scheduling: the process that requests for the CPU
 b. CPU Scheduling first, gets the CPU first. A queue is maintained for the processes requesting the
 CPU. The process first in the queue is allocated the CPU first. FCFS scheduling is
  In non-preemptive scheduling, the processor executes a non-pre-emptive. The drawback of this scheduling algorithm is that the process that
 process till termination without any interruption. Hence the is assigned to the CPU may take long time to complete, keeping all other processes
 waiting in the queue, even if they require less CPU time.
 system resources are not used efficiently.
  Shortest Job First (SJF) Scheduling: The process that requires the least CPU time
  In pre-emptive scheduling, a running process may be is allocated the CPU first. SJF scheduling is non-pre-emptive. The drawback of this
 interrupted by another process that needs to execute. Pre- scheduling is that a process that requires more CPU time may have to wait for long
 time, since processes requiring less CPU time will be assigned the CPU first.
 emption allows the operating system to interrupt the  Round Robin (RR) Scheduling: It is designed for time-sharing systems. RR
 executing task and handle any important task that scheduling is pre-emptive. In this scheduling, a small quantum of time (10—100 ms)
 requires immediate action. In pre-emptive scheduling, the is defined, and each process in the queue is assigned the CPU for this quantum of
 time circularly. New processes are added at the tail of the queue and the process
 system resources are used efficiently. that has finished execution is removed from the queue. RR scheduling overcomes
 the disadvantage of FCFS and SJF scheduling. A process does not have to wait for
 long, if it is not the first one in the queue, or, if it requires CPU for a long period of
 time.
For more notes visit https://collegenote.pythonanywhere.com
 Process Management: Process Management
 b. CPU Scheduling : Scheduling algorithms are? 1. Process Management:
 1. First Come First Served (FCFS) Scheduling a. Program Vs Process
 2. Shortest Job First (SJF) Scheduling
 c. Process Synchronization
 b. CPU Scheduling
 3. Round Robin (RR) Scheduling
 • What is scheduling? d. Deadlock
 1. Non-pre-emptive scheduling • What is Deadlock?
 2. Pre-emptive scheduling • What are the reasons for
 Example: P#1 with CPU deadlock?
 time requirement of 5 units, • Scheduling algorithms
 are? 1. Mutual Exclusion
 P#2 with 7 units and P#3 2. No Pre-emption
 with 4 units, are scheduled, 1. First Come First Served
 (FCFS) Scheduling 3. Hold and Wait
 using the different CPU 4. Circular Wait
 2. Shortest Job First (SJF)
 scheduling algorithms Scheduling
 3. Round Robin (RR)
 Scheduling
 Process Management: Process Management
 C. Process Synchronization: C. Process Synchronization:
  In a computer, multiple processes are executing at the same Program: Program to transfer Rs10 from account X to Y and
 time. The processes that share the resources have to add Rs5 to account X.
 communicate with one another to prevent a situation where What will happen when process-2 items starts after X:=X-10
 one process disrupts another process. and before write_item(X) of process-1?
  When two or more processes execute at the same time,
 Process-1 Process-2 Process-1 Process-2 Process-1 Process-2
 independent of each other, they are called concurrent read_item(X); read_item(X); read_item(X);
 processes. X:=X-10;
 X:=X+5;
 X:=X-10;
 write_item(X);
 write_item(X);
 write_item(X);
  A situation where multiple processes access and manipulate read_item(Y);
 Y:=Y+10; read_item(X);
 read_item(X);
 X:=X+5;
 the same data concurrently, in which the final result depends write_item(Y); X:=X-10; write_item(X);
 on the order of process execution, is called a race condition. read_item(X); write_item(X); read_item(Y);
 read_item(Y);
 To handle such situations, synchronization and coordination X:=X+5;
 Y:=Y+10;
 Y:=Y+10;
 write_item(X);
 of the processes is required. write_item(Y); write_item(Y);
 Process Management: Process Management:
 D. Deadlock: D. Deadlock:
  In concurrent process environment, processes may try to
  What is Deadlock? access the same resource or data. A deadlock is a
  What are the reasons for deadlock? situation when a process waits endlessly for a resource
 1. Mutual Exclusion
 and the requested resource is being used by another
 2. No Pre-emption process that is waiting for some other resource.
 3. Hold and Wait  A deadlock arises when the four necessary conditions
 4. Circular Wait hold true simultaneously in a system. These conditions
  Deadlock handling? are as follows:
For more notes visit https://collegenote.pythonanywhere.com
 Process Management: Process Management:
 D. Deadlock: D. Deadlock
 A deadlock arises when the four necessary conditions hold true Deadlock Handling?
 simultaneously in a system. These conditions are as follows:
 Mutual Exclusion: Only one process at a time can use the resource.
 Any other process requesting the resource has to wait until the resource  Deadlock Prevention - is a set of method that ensures
 is released. that at least one of the above four necessary
 No Pre-emption: A process releases the resource by itself. A process conditions required for deadlock, does not hold true.
 cannot remove the resource from another process.  Deadlock Avoidance - requires that the operating
 Hold and Wait: A process holds a resource while requesting another system be given information in advance regarding the
 resource, which may be currently held by another process. resources a process will request and use. This
 Circular Wait: In this situation, a process P1 waits for a resource held information is used by the operating system to
 by another process P2, and the process P2 waits for a resource held by schedule the allocation of resources so that no
 process P1. process waits for a resource.
 Functions of Operating System Functions of Operating System
 2. Memory Management : The activities of memory 2. Memory Management(MM) :
 management handled by OS are  The task of MM is to handle the allocation of memory to
 1) allocate memory, different processes and on completion of process
 2) free memory, execution, the memory is de-allocated and made available
 3) re-allocate memory to a program when a used block is freed, to another process.
 and
  Additionally, different processes that have been allocated
 4) keep track of memory usage.
 memory should not interfere into each other’s memory
 space. This requires some memory protection and sharing
 mechanism.
  Memory allocation, de-allocation, reallocation of free
 memory, and memory protection & sharing are the jobs of
 OS and is called memory management.
 Functions of Operating System Functions of Operating System
 2. Memory Management : 2. Memory Management :
 Memory Allocation Memory Allocation
  In single-user and single-task operating system like MS-
 DOS, only one process can execute at a time and one The different memory allocation schemes are
 process is allocated to memory and allocated memory is  Multiple Partition Allocation
 freed after the termination of the process which is made
 available to any other process.  Paging
  In a multiprogramming system, in addition to allocation  Virtual Memory
 and de-allocation of memory, more tasks are involved like
 keeping track of processes allocated to the memory,
 memory protection and sharing etc.
For more notes visit https://collegenote.pythonanywhere.com
 Functions of Operating System Functions of Operating System
 2. Memory Management : Multiple Partition Allocation 2. Memory Management : Multiple Partition Allocation
 During allocation of memory, the set of holes is searched to
 The OS keeps track of blocks of memory which are free and determine which hole is to be allocated. For this, 3 hole
 those which are unavailable. The single block of available allocation strategies are used.
 memory is called a hole.  First-fit: Allocate the first hole that is big enough
  Hole – block of available memory; holes of various size  Best-fit: Allocate the smallest hole that is big enough; must search
 entire list, unless ordered by size
 are scattered throughout memory
 • Produces the smallest leftover hole
  When a process arrives, it is allocated memory from a  Worst-fit: Allocate the largest hole; must also search entire list
 hole large enough to accommodate it.
 • Produces the largest leftover hole.
  Operating system maintains information about: First-fit and best-fit better than worst-fit in terms of speed and storage
 a) allocated partitions b) free partitions (hole) utilization
 Functions of Operating System Functions of Operating System
 2. Memory Management : 2. Memory Management : Paging
 Multiple Partition Allocation: Fragmentation  Paging is a memory management technique in which process address space
 As processes are loaded and removed from memory, the free memory space is is broken into blocks of the same size called pages. The size of the process
 broken into little pieces. It happens after sometimes that processes cannot be is measured in the number of pages.
 allocated to memory blocks considering their small size and memory blocks  Similarly, main memory is divided into small fixed-sized blocks of
 remains unused. This problem is known as Fragmentation (physical) memory called frames and the size of a frame is kept the same as
 that of a page to have optimum utilization of the main memory and to avoid
 external fragmentation.
  When a process is executed, its pages are loaded into the frames.
  An address generated by CPU has two parts - page number and page offset.
 A page table is maintained by the operating system that maps the page
 number to the frame number. The page number is used to index the page
 table and get the frame number. The page offset is added to the page frame
 number to get the physical memory address
 Functions of Operating System Functions of Operating System
 2. Memory Management : Paging 2. Memory Management : Virtual Memory
  A computer can address more memory than the amount physically installed on the
 system. This extra memory is actually called virtual memory and it is a section of a
 hard disk that's set up to emulate the computer's RAM.
  In the memory management schemes discussed in above, the whole process is kept
 in memory before the execution starts. However, for some applications, large
 memory is required to run the applications, and the whole program cannot be
 loaded into the memory.
  Virtual memory allows the execution of those processes that are not completely in
 memory.
  Virtual memory is commonly implemented by demand paging. Demand paging is
 similar to paging with swapping. Swapping is transferring of block of data from the
 on-line secondary storage like hard disk to the memory and vice versa.
  In demand paging, the processes reside in the online secondary memory. When a
 process executes and a page is required, that page is swapped-in into the memory.
 This allows execution of large-sized programs without loading them completely
 into the memory.
For more notes visit https://collegenote.pythonanywhere.com
 Functions of Operating System Course Contents
 2. Memory Management : Virtual Memory Functions of Operating System:
  In the memory management schemes discussed above, the whole process is kept in 3. File Management: The file management tasks include
 memory before the execution starts. However, for some applications, large
 memory is required to run the applications, and the whole program cannot be 1) create and delete both files and directories,
 loaded into the memory. 2) provide access to files,
  A computer can address more memory than the amount physically installed on the 3) allocate space for files,
 system. This extra memory is actually called virtual memory and it is a section of
 a hard disk that's set up to emulate the computer's RAM.
 4) keep back-up of files, and
  Virtual memory allows the execution of those processes that are not completely in 5) secure files.
 memory.
  Virtual memory is commonly implemented by demand paging. Demand paging is 4. Device Management: The device management tasks
 similar to paging with swapping. Swapping is transferring of block of data from handled by OS are
 the on-line secondary storage like hard disk to the memory and vice versa.  In
 demand paging, the processes reside in the online secondary memory. When a 1) open, close and write device drivers, and
 process executes and a page is required, that page is swapped-in into the memory. 2) communicate, control and monitor the device driver.
 This allows execution of large-sized programs without loading them completely
 into the memory.
 Course Contents Course Contents
 Functions of Operating System: Functions of Operating System:
 3. File Management: 4. Device Management: The device management tasks
  The file management function of the operating system involves handled by OS are
 handling the file system which consists of two parts -a set of files, 1) open, close and write device drivers, and
 and a directory structure.
 2) communicate, control and monitor the device driver.
  The operating system manages the storage media like the disk and
 implements the abstract concept of the file. System calls are an
 interface between the process and the operating system. Operating
 system provides system calls for creating, reading, writing, deleting,
 repositioning, and truncating a file. Some of the operations that can
 be performed on a directory are—search for a file, create, delete
 and rename a file, list a directory, and traverse the file system within
 the directory. The user simply uses the system calls like “dir”, “list” to
 perform operation on a file or directory, without going into the details
 of its working.
 Course Contents Course Contents
 Functions of Operating System: Functions of Operating System: 4. Device Management:
 4. Device Management:  Scheduling of I/O requests involves ordering the requests to improve
 performance of the system and provide fair access to all processes. A queue of
  OS manages and controls the devices attached to the computer. OS request is maintained for each device and I/O scheduler re-arranges the queue
 provides appropriate functionality to the application programs for to improve the efficiency of the overall system.
 controlling different aspects of the devices.  Buffer is a memory area that stores the data, while it is being transferred
  The OS communicates with the I/O hardware via the device driver between two devices or between a device and an application. The speed at
 software. The device driver software comes along with each device. which the I/O device can transfer data is different from the speed at which the
 data is processed. Buffering handles the speed mismatch by storing the data in
  In addition to managing the peripheral devices, OS also provides a buffer till the complete data has arrived and then writing it in a single write
 various services related to I/O like I/O scheduling, buffering, spooling, operation.
 and error handling.  Spool (Simultaneous Peripheral Operation On-Line) is a buffer in memory area
 or disk. Spooling stores the jobs in a spool where the device can access it
 when it is ready. Spooling is commonly used for printers. Users may give
 several print commands, and continue working with other operations. However,
 the printer can print only one job at a time. The rest of the jobs are stored in the
 spool in a queue, and the printer accesses the spool when it is ready to print
 the next job.
For more notes visit https://collegenote.pythonanywhere.com
 Course Contents Course Contents
 Functions of Operating System: 4. Device Management: Functions of Operating System:
 5. Protection and Security:
  OS protects the resources of system. User authentication,
 file attributes like read, write, encryption, and back-up of
 data are used by OS to provide basic protection.
 Course Contents Course Contents
 Functions of Operating System: 5. Protection and Security: Functions of Operating System:
  Security mechanism prevents unauthorized access to the computer.
 Security concerns include - security of software, security of data 6. User Interface or Command Interpreter:
 stored in the computer, and security of physical resources of the
 computer.  Operating system provides an interface between the
  In a personal computer, security can be ensured using computer user and the computer hardware. The user
  (1) user accounts—individual accounts for each user, (2) user authentication— interface is a set of commands or a graphical user
 using password protection, (3) access rights—define rights for access of interface via which the user interacts with the applications
 different kind of information for different people, (4) data encryption (BitLocker
 Drive Encryption in windows10)—store data in computer in encrypted form,
 and the hardware.
 and (5) data backup—storing data on a peripheral device other than the hard
 disk.
  In a networked environment, only trusted computers should be able
 to share data. Some of the common security threats occur due to
 hacking, viruses etc.
 Course Contents Operating system
 Functions of Operating System: Examples Operating system:
 6. User Interface or Command Interpreter:
  The primary goal of operating system is to make the computer
 convenient for use by its user. It should allow users to easily access The three most common operating systems for personal
 and communicate with the applications and the hardware. computers are
  The users can interact with the computer by using mainly two kinds Microsoft Windows,
 of interfaces—(1) Command Line Interface (CLI), and (2) Graphical
 macOS, and
 User Interface (GUI).
  CLI requires the user to interact with operating system in the form of Linux.
 text keyed in from the keyboard. In this, the user has to learn and
 remember the different commands required for copying, deleting,
 opening a file or folder etc. MS-DOS and Linux shell are examples
 of command line mode of interfaces.
For more notes visit https://collegenote.pythonanywhere.com
 Operating system Operating system
 Examples Operating system: Microsoft Windows Operating system Vs Kernel (Linux operating
 Microsoft created the Windows operating system in the mid- system)
 1980s. There have been many different versions of Windows,
 but the most recent ones are Windows 10 (released in
 2015), Windows 8 (2012), Windows 7 (2009),
 and Windows Vista (2007).
 MD-DOS (Microsoft Disk Operating System) [1981]
 Windows 1.0 - 2.0 [1985 - 1992]
 Windows 3.0 - 3.1 [1990 - 1994]
 Windows 95 [1995]
 Windows 98 [1998]
 Windows ME (Millennial Edition) [2000]
 Windows NT 31. - 4.0 [1993 - 1996]
 Windows 2000 [2000]
 Windows comes pre-loaded on most new PCs.
 Operating system Operating system
 Examples Operating system: Microsoft Windows Examples Operating system: Microsoft Windows
 Operating system Operating system
 OS X 10.9 Mavericks (Cabernet) - 22
 Examples Operating system: macOS Examples Operating 
 October 2013
 macOS (previously called OS X) is a line of operating system: macOS  OS X 10.10: Yosemite (Syrah) - 16 October
 2014
 systems created by Apple. It comes preloaded on all List of Mac OS versions
  OS X 10.11: El Capitan (Gala) - 30
 OS X 10 beta: Kodiak - 13 September 2000
 Macintosh computers, or Macs. Some of the specific versions
 
 September 2015
  OS X 10.0: Cheetah - 24 March 2001
 macOS 10.12: Sierra (Fuji) - 20 September
 include Mojave (released in 2018), High Sierra (2017),  OS X 10.1: Puma - 25 September 2001
 
 2016
 and Sierra (2016).  OS X 10.2: Jaguar - 24 August 2002  macOS 10.13: High Sierra (Lobo) - 25
  OS X 10.3 Panther (Pinot) - 24 October 2003 September 2017
  OS X 10.4 Tiger (Merlot) - 29 April 2005  macOS 10.14: Mojave (Liberty) - 24
  [OS X 10.4.4 Tiger (Chardonnay)] September 2018
  OS X 10.5 Leopard (Chablis) - 26 October  macOS 10.15: Catalina - 7 October 2019
 2007
  OS X 10.6 Snow Leopard - 28 August 2009
  OS X 10.7 Lion (Barolo) - 20 July 2011
  OS X 10.8 Mountain Lion (Zinfandel) - 25
 July 2012
For more notes visit https://collegenote.pythonanywhere.com
 Operating system Operating system
 Examples Operating system: macOS Examples Operating system: Linux
 Linux (pronounced LINN-ux) is a family of open-source
 operating systems, which means they can be modified and
 distributed by anyone around the world.
 This is different from proprietary software like Windows,
 which can only be modified by the company that owns it.
 The advantages of Linux are that it is free, and there are
 many different distributions—or versions.
 Operating system Operating system
 Examples Operating system: Linux (Ubuntu) Examples Operating system: Mobile OS
 Mobile devices such as phones, tablet computers,
 and MP3 players are different from desktop and laptop
 computers, so they run operating systems that are designed
 specifically for mobile devices.
 Examples of mobile operating systems include
  Apple iOS
  Google Android
  Windows 10 Mobile by Microsoft.
 Operating system Operating system
 Examples Operating system: Mobile OS Examples Operating  Windows OS
 system: Mobile OS  BADA (Samsung
 Top Mobile OS are: owns BADA)
  Symbian (property of  Palm OS (Garnet OS) - for
 Nokia) PDAs (Personal Digital
 Assistance)
  Android (from Google)
  Open WebOS (by Palm Inc
  Apple iOS ( From Apple,
 but own by Hewlett-
 iOS has been used in all
 Packard)
 iPhones, iPod & iPad.)
  Maemo
  Blackberry OS (Blackberry
 line of smartphones from  MeeGo
 RIM (Research In Motion) )  Verdict