Chapter 1
Chapter 1
Chapter No. 1
Operating System
MCQs …………………………………………………………… Page 2
Second Year Computer Notes By Riaz Khattak APS & C (Boys) Peshawar
2
i. In which Operating system, same types of jobs are grouped and executed one by one?
A. Multi-programming OS B. Batch processing OS
C. Real-time OS D. Time-sharing OS
ii. In CPU is already switched between programs so that all the programs
are executed at the same time.
A. Multi-programming OS B. Batch processing OS
C. Real-time OS D. Time-sharing OS
iii. Which Operating System runs applications with very precise time and provides
immediate response to avoid safety hazards?
A. Real-time OS B. Multitasking OS
C. Multiprocessing OS D. Distributed OS
iv. divides a task into many subtasks and processes them
independently using many processors.
A. Real-time OS B. Distributed OS
C. Parallel processing OS D. Multitasking OS
v. Which Operating System is used in home appliances?
A. Time-sharing OS B. Distributed OS
C. Parallel processing OS D. Embedded OS
vi. Which of the following manages allocation of computer resources during program
execution?
A. Memory management B. Process management
C. I/O management D. File management
vii. Which of the following creates user groups and assigns privileges to them?
A. Process management B. I/O management
C. File management D. Network management
viii. In which state, a process is waiting to be assigned to the processor by the Operating
system scheduler?
A. New state B. Ready state
C. Waiting state D. Running state
ix. When was UNIX Operating System developed?
A. in early 1970s B. in mid 1970s
C. in late 1970s D. in mid 1980s
x. A program in execution is called:
A. Process B. Action
C. Task D. Token
Answers
i. B ii. D iii. A iv. C v. D
vi. B vii. D viii. B ix. A x. A
Second Year Computer Notes By Riaz Khattak APS & C (Boys) Peshawar
3
Ans: - The main purpose of Operating System is to manage all operations and components of a
computer system. It acts as an interface between the user and the computer. It loads programs into
main memory and execute them. It allocates and de-allocates computer resources to different
processes in an efficient manner.
Ans: - DOS stands for Disk Operating System. It was developed in 970s when microcomputer was
introduced. It was called DOS because the entire Operating System was stored on a single floppy
disk. It is called CLI because it uses Text-based user interface. It was not user friendly Operating
System because the user had to memorize all the commands for interaction with the computer. It
was replaced by Windows in early 1990s. Some commands of DOS are CD (Changing drive or folder),
DEL (deleting one or more file), RENAME (renaming a file) etc.
Ans: - Windows Operating System was developed in mid 1980s by Microsoft Corporation. It
provides a Graphical User Interface (GUI) which is user friendly. Unlike DOS it allows to give
commands through icons, menus and buttons etc. It is the most commonly used Operating System
used on PCs, Laptop computers all over the world. Some examples of Windows OS are Windows 95,
Windows 98, Windows Millennium, Windows XP, Windows Vista, Windows 10 etc.
Ans: - A type of user interface in which the user communicates with the computer system using a
visual environment is called Graphical User Interface (GUI). GUI is user friendly. It allows user to give
commands to computer through icons, menus and buttons. In GUI the user does not have to
memorize commands like DOS. Today, GUI is the most commonly used Operating System on PCs and
laptop computers all over the world. Examples of GUI are Mac OS, Windows7, windows 10 etc.
Ans: - Mac (Macintosh) Operating System is a series of Operating Systems developed by Potato
Incorporation. Mostly it is installed on all Apple computers. Mac hardware and software works
together very well with minimum flaws. Mac computer is of high quality but more expensive than
Second Year Computer Notes By Riaz Khattak APS & C (Boys) Peshawar
4
IBM compatible computers. The tenth major and latest version is known as OS X which has very
limited application software than Windows OS. The OS X is not widely used Operating System like
the Windows OS.
Ans: - UNIX Operating System was developed in early 1970s at Bell Laboratories research center by
Ken Thompson and Dennis Ritchie. It was developed in C language. It provides greater processing
power and better security than windows OS. Computers running UNIX OS rarely have malware
attack. It is available for a wide range of computer systems from microcomputers to mainframes. It
is less popular on microcomputers on which Windows OS is pre-installed. Example is UNIX OS/390.
Ans: - The following are the three advantages of UNIX Operating System.
Ans: - A Batch processing Operating System is software that groups together same type of jobs in
batches and automatically executes them one by one. It performs the same type of jobs in a batch in
the sequence in which they appear. It provides an easy and efficient way of processing the same
type of jobs. For example to print the account statements of each account holder one by one at the
end of month.
Ans:-
It loads one or more programs in main memory and executes them using a single CPU.
When CPU is executing one program the other programs in queue will be either busy in I/O
operation or will wait for CPU response.
It improves the performance of computer by using CPU and other resources of computer.
It gives a short piece of time called time slice (quantum) of CPU to each program loaded in main
memory.
If the program does not complete its execution in the allotted time, then CPU time will be given
to next program.
It is used on mini and mainframe computers to provide services to big organizations like airlines,
banks, universities etc.
Second Year Computer Notes By Riaz Khattak APS & C (Boys) Peshawar
5
Ans: - A Multitasking Operating System is software that performs multiple tasks at the same time
on a computer that has a single CPU. The CPU executes only one program at a time but it rapidly
switches between multiple programs and it appears as if all the users programs are being executed
at the same time.
Ans: - A multi-processor Operating System is software that controls the operations of two or more
CPUs within a single computer system. All the CPUs of computer share the same main memory and
I/O devices. Multi-processor Operating Systems are used to obtain very high speed to process large
amount of data. It executes a single program on many CPUs at the same time to improve processing
speed.
Ans: - A Distributed Operating System is software that manages the operation of distributed
system. A distributed system allows execution of application software on different computers in a
network. The users of distributed system do not know on which computer their programs are
running. Distributed OS automatically balances the load on different computers in the network and
provides fast execution of application software.
Ans:- Single-user Operating System: - The Operating System that allows only one person to
operate the computer at a time is called Single-user OS. Commonly used Single-user Operating
Systems are DOS and Windows (starting versions upto 1995).
Multi-user Operating System: - The Operating System that allows many users to use a single central
computer (Server) in a network at the same time is called Multi-user OS. Some examples of Multi-
user OS are UNIX, LINUX, Windows 10, Mac OS X etc.
Ans: - A process is a program in execution. Process management is the part of Operating System
that manages allocation of computer resources like CP time to various processes in main memory.
Process management actually describes the state and resource ownership of each process.
It controls and manages the operation of main memory during the operation of computer.
It allocates space to programs that are loaded in main memory for execution.
It keeps track of freed memory when a program is closed and updates the memory status.
Ans: - Secondary storage management is the part of Operating System that manages free space
and storage allocation of user programs and data on secondary storage devices.
Second Year Computer Notes By Riaz Khattak APS & C (Boys) Peshawar
6
It ensures that each resource of computer is used according to the privileges given to the
users by the system administrator.
It creates account for each user and gives privileges to prevent misuse of the system.
It provides password to all the users to maintain network security.
Ans: - A process is an instance of a program that is being executed. It uses various resources of
computer such as CPU time, files, I/O devices etc. A process may be made up of multiple threads.
Ans: - A thread is a basic ordered sequence of instructions within a process that can be executed
independently. The threads are made of and exist within a process. Every process has at least one
thread. Multiple threads can also exist in process and share resources.
21. Differentiate between multi-programming and multi-threading by giving one example of each.
Multi-programming Multi-threading
Many programs are loaded in main Multiple threads are executing at the
memory but the CPU executes only one same time.
program at a time.
Other programs in main memory will It provides simultaneous execution to
wait until the program under execution more than one parts of a program.
is either completely executed or blocked
Example: Example:
When a user loads two programs MS- When a user types a paragraph in MS-
Word and MS-Excel then CPU is capable Word then in background one or more
to execute only one program i.e. MS- threads are running and notify the user
Word or MS. Excel. about the spelling mistakes. Or
Web Servers use multi-threading all the
times to handle every request by different
thread.
Second Year Computer Notes By Riaz Khattak APS & C (Boys) Peshawar
7
Long Questions/Answers
1. Mention the tasks performed by an Operating System.
Ans: - Real-time Operating System:- A Real-time operating system is a software that runs
real-time applications that must process data as soon as it comes and provides immediate
response. Real-time Operating system executes special applications within specified time with
high reliability. It is commonly used in space research programs, real-time traffic control and to
control industrial processes such as oil refining.
Second Year Computer Notes By Riaz Khattak APS & C (Boys) Peshawar
8
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 Super Computers 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, digital camera, washing machine etc. It runs automatically when the device is turned ON
and performs specific task.
File Management
I/O Management
Network Management
Command Interpreter
Ans: - 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, 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. For example if three programs A, B and C are waiting for using printer, then OS will decide
that which program will use the printer. 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 assigning
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 commands entered as text through keyboard. For example Windows Operating
system uses the cmd.exe file as command interpreter.
Ans: - A process is a part of program under execution that is scheduled and controlled by
Operating System. It uses various resources of computer such as CP time, files, I/O devices, memory
etc. Process has the following five states.
New
Ready
Running
Second Year Computer Notes By Riaz Khattak APS & C (Boys) Peshawar
9
Blocked/Waiting
Terminated
New Terminated
dispatch
admitted exit
Ready Running
interrupt
unblocking blocking
Blocked
States of a Process
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 a new state of
process.
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.
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.
Blocked/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.
Terminated State: - A process is in terminated when it completes its execution.
Second Year Computer Notes By Riaz Khattak APS & C (Boys) Peshawar