Chap 1 PDF
Chap 1 PDF
Operating System
Exercise
Question 1: Select the best answer for the following MCQs.
i)In which operating system, same types of jobs are grouped together and executed one by
one?
a) Multiprogramming operating system b) Batch processing operating system
c) Real-time operating system d) Time-sharing operating system
ii)In ____________________operating system CPU is rapidly switched between programs so
that all the programs are executed at the same time.
a) Multiprogramming operating system b) Batch processing operating system
c) Real-time operating system d) Time-sharing operating system
iii)Which operating system runs applications with very precise timing and provides
immediate response to avoid safety hazards?
a) Real-time operating system b) Multitasking operating system
ix)In which state, a process is waiting to be assigned to the processor by the operating
system scheduler?
1
Chapter 1 Operating System
2
PISJ Operating System Computer Science 12
3
Chapter 1 Operating System
running and checking the spelling program i.e. MS-Word or C-language compiler.
mistakes. As soon as user is doing a
typing work the other thread
notifies the user about the spelling
mistakes
Question 3: Write long answers of the following questions.
Qi)Mention tasks performed by the operating system?
Tasks performed by OS:
1) Loads application/system software into main memory and executes it.
2) Controls the operation of main memory and external storage devices.
3) Manages files and folders on storage devices such as hard disk, USB flash drive, etc.
4) Manages the operations of all the input/output devices.
5) Allows multitasking to handle several tasks at the same time such as running
spreadsheet software and a word-processor simultaneously.
6) Performs network operations which enable a number of users to communicate with
each other in a network environment and share computer resources such as CPU, main
memory, hard disk, printer, Internet, etc.
7) Detects hardware failures.
8) Provides security through username and password.
DOS Windows
1. DOS are simple text command 1. Windows is a range of graphical
operating systems that were popular interface operating systems that are
from 1981 to 1995. developed and sold by Microsoft.
2. DOS is a text based interface that 2. Windows operating systems use
requires text and codes to operate. graphics, images and text.
3. Text is used as basic input system. 3. A mouse and a keyboard are
generally used for giving commands.
4. DOS does not provide the feature of 4. Windows provide the feature of
multi-tasking multi-tasking.
4
PISJ Operating System Computer Science 12
space research programs, real-time traffic control and to control industrial processes such as
oil refining.
Parallel processing operating system:
A parallel processing operating system is software that executes programs developed in a
parallel programming language. It uses many processors at the same time. In a parallel
processing system, the task of a program that requires many calculations is divided into many
smaller tasks and these are processed by multiple processors at the same time. Parallel
processing operating systems are used in supercomputers that have thousands processors.
Embedded operating system:
An embedded operating system is a built-in operating system which is embedded in the
hardware of the device. It controls the operation of devices such as microwave oven, TV,
camera, washing machine, games, etc. It runs automatically when the device is turned on and
performs specific task.
Qiv)Define the following terms.
File management:
File management is the part of operating system that manages files and folders on storage
devices such as hard disk, USB flash drive and DVD. It allows computer user to perform
operations such as creating, copying, moving, renaming, deleting, and searching files and
folders. It also allows the user to perform read, write, open and close operations on files and
folders.
I/O management:
I/O management is the part of operating system that controls all the input/output operations
during program execution. It manages all the input/output operations of input/output and
storage devices. Efficient I/O management improves the performance of computer.
Example: There are three programs A, B and C which are using the printer. Now the OS will
decide which program to use the printer first. A queue will be set by the OS and each program
will get the printer by its turn.
Network management:
Network management is the part of network operating system that monitors and manages the
resources of a network. It allows creating user groups and assigns privileges to them. It shares
the network resources among users and detects and fixes network problems.
Command interpreter:
Command-Interpreter is the part of operating system that provides interface between user
and the computer system. It is a file in operating system that reads and executes user
5
Chapter 1 Operating System
commands entered as text through keyboard. For example, Windows operating system uses
the cmd.exe file as command-interpreter.
Qv)Describe the five states of a process with diagram.
States of a process:
1. New State: This is the first state of a process when it is created. Any new operation or
service that is requested by a program for execution by the processor is known as new
state of process.
2. Ready State: A process is said to be in ready state when it is ready for execution but it is
waiting to be assigned to the processor by the operating system.
3. Running State: A process is said to be in running state when it is being executed by the
processor. A process is assigned to a processor for execution by operating system.
4. Blocked State/Waiting State: A process is in blocked or waiting state when it is not
under execution. It is waiting for a resource to become available.
5. Terminated State: A process is in terminated state when it completes its execution.