KPK Grade 12 Computer Science Notes
Table of Contents
Class 12 Computer Science notes Chapter 1 according to KPK board syllabus 2020-2021 MCQs, true/false, question and answer. KPK G12 Computer Science Chapter 1(Operating Systems). fsc part-2 chapter no 01 for kpk board notes.
2nd year computer science notes Chapter 1 Operating Systems
Computer science MCQs
Q.1 i) The concept of executing multiple programs simultaneously on multiple possessors is known as __________________.
Answer: Multiprocessing
Q.2 ii) Multitasking operating systems execute _________________ simultaneously.
Answer: Multiple Tasks
Q.3 iii) The central theme of modern operating systems, based on the concept of switching among multiple programs in memory is called _________.
Answer: Multiprogramming
Q. 4 iv) A process consists of five states i.e new, ready , running , block and _____________.
Answer: Exit
Q.5 v) ____________ is a multitasking, multi-user operating system for servers, desktops and laptops, originally developed in 1969 by a group of AT& T employees at Bell Labs.
Answer: UNIX
True/False
Q. i) The operating system acts as an interface between the computer hardware and the human user.
Answer:
True
Q. ii) Multiprogramming allows the processor to make use of idle time caused by I/O wait.
Answer:
True
Q. iii) An operating system controls the execution of applications and acts as an interface between applications and the computer hardware.
Answer:
True
Q. iv) In the early computers, the operating system does not exist.
Answer:
True
Q. v) Multi-programming do not provide better utilization of system resources than multiprogramming
Answer:
False
Q. vi) In a time-sharing system, when a process is assigned to the CPU for execution, it remains there till its completion.
Answer:
False
Q. vii) A process is a dispatchable unit of thread.
Answer:
False
Q. viii) A process is directly assigned to the CPU for processing from a block state when the event for which it is waiting happens.
Answer:
False
Q. ix) A process is said to be in a ready state if it is waiting for some external event which has not yet been occurred.
Answer:
False
Q. x) Batch processing systems do not support interactivity.
Answer:
True
Q.4) What is an operating system? Explain different types of operating systems.
OPERATING SYSTEM
DEFINITION:
“A software on the hard drive that enables the computer hardware to communicate with the system software and operate it is called the operating system”
TYPES OF OPERATING SYSTEMS
The following are the important types of operating systems that are commonly used on various computer systems.
BATCH PROCESSING OPERATING SYSTEM
A batch processing operating system is a software that groups together the same type of jobs in batches and automatically executes them one by one. It performs the same type of task on all the 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, at the end of the month, banks print statements for each account holder. A batch processing system can easily and efficiently print each account holder’s statement one by one.
MULTIPROGRAMMING OPERATING SYSTEM
A multiprogramming operating system is a software that loads one or more programs in main memory and executes them using a single CPU (Central Processing Unit). The CPU executes only one program at a time while other programs are waiting in the queue. In a multiprogramming system when one program is busy with input/output operation, the CPU executes another program that is in the queue. In this way, the multiprogramming operating system uses the CPU time and other resources of the computer to improve the performance of the computer.
MULTITASKING OPERATING SYSTEM
A multitasking operating system is a 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.
TIME-SHARING OPERATING SYSTEM
A time-sharing operating system is a software that shares the CPU time between multiple programs that are loaded in main memory. A time-sharing operating system gives a very short period of CPU time to each program one by one. This short period is called time slice or quantum. Since the CPU is switched between the programs at an extremely fast speed, all the users get the impression of having their CPU. It is used in mini and mainframe computers that support a large number of users in a big organization such as airline, bank, university, etc.
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 an immediate response. The real-time operating system executes special applications within the 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.
MULTIPROCESSOR OPERATING SYSTEM
A multiprocessor operating system is a software that controls the operations of two or more CPUs within a single computer system. All the CPUs of the computer share the same main memory and input/output devices. Multiprocessing operating systems are used to obtain a very high speed to process a large amount of data. It executes a single program using many CPUs at the same time to improve processing speed. Computers that support multiprocessing have a sophisticated architecture which is difficult to design.
PARALLEL PROCESSING OPERATING SYSTEM
A parallel processing operating system is a 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 of processors.
DISTRIBUTED OPERATING SYSTEM
A distributed operating system is a software that manages the operation of a distributed
system. A distributed system allows the execution of application software on different computers in a network. In a distributed system, user programs may run on any computer in the network and access data on any other computer. The users of the distributed system do not know on which computer their programs are running. The distributed operating system automatically balances the load on different computers in the network and provides fast execution of application software.
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 ovens, TV, camera, washing machine, games, etc. It runs automatically when the device is turned on and performs a specific task.
Q.5) Differentiate between the following:
a) Single user and multi-user operating system
b) Threads and process
c) Multiprogramming and Multiprocessing
Answer:
a) DIFFERENCE BETWEEN SINGLE-USER AND MULTI-USER OPERATING SYSTEMS
Operating systems are divided into single-user and multi-user operating systems based
on the number of users, they can support.
SINGLE-USER OPERATING SYSTEM
The operating system that allows only one person to operate the computer at a time is
known is a single-user operating system. Commonly used single-user operating systems
are DOS and Windows.
MULTI-USER OPERATING SYSTEM
The operating system that allows many users on different terminals or microcomputers to use the resources of a single central computer (server) in a network is known as a multi-user operating system. It is used on servers in business and offices where many users have to access the same application software and other resources. Some examples of multi-user operating systems are UNIX, Linux, Windows 2000 onward and Mac OS X.
b) THREADS AND PROCESS
The differences are as follows:
- Processes are independent of one another while threads are not independent of one another
- Unlike processes, all threads can access every address in the task
- Processes might or might not assist one another because processes may originate from different users while threads are designed to assist one another
c) MULTIPROGRAMMING AND MULTIPROCESSING
MULTIPROGRAMMING
In multiprogramming, many programs are loaded in memory but the CPU only executes one program at a time. Other programs wait until the previous program is executed out or blocked.
For example, when a user loads program 1 (say MS-Word) and program 2 (say C- language compiler). The CPU can execute only one program i.e., MS-Word or C-language compiler.
The advantage of multiprogramming is that it saves the user’s time in loading the programs to the main memory and runs the programs quickly. The only drawback is, the system requires more main memory as it is occupied by many programs. Sometimes bigger programs cannot fully load in main memory and thus programs run slowly.
MULTIPROCESSING
Multiprogramming is a rudimentary form of parallel processing in which several programs are run at the same time on a uniprocessor.
Multiprogramming is used for Multiuser Systems (Servers)
If we are running multiple processes on a Multi-User system like a Server to which multiple computers are connected then it is known as Multiprogramming.
Q.6) Define a distributed operating system and describe its advantages and disadvantages
Answer:
DISTRIBUTED OPERATING SYSTEM
A distributed operating system is a software that manages the operation of a distributed system. A distributed system allows the execution of application software on different computers in a network. In a distributed system, user programs may run on any computer in the network and access data on any other computer. The users of the distributed system do not know on which computer their programs are running. The distributed operating system automatically balances the load on different computers in the network and provides fast execution of application software.
ADVANTAGES:
The advantages of a distributed operating system are as follows:
- Communication and resource sharing is possible which eliminates the need for dedicated resources with each computer system.
- The distributed systems are economical in the sense that expensive resources are shared.
- The system is reliable because of the availability of multiple machines for performing the task of a failed system.
- The system has the potential for incremental growth
DISADVANTAGES:
The disadvantages of a distributed operating system are as follows:
- Network connectivity is an essential part of a distributed system which is a difficult and expensive task.
- Security and privacy is an issue.
Q.7) Write short notes on the following:
- a) Different states of the process
- b) DOS
- c) Real-time processing systems
- d) Embedded operating systems
Answer:
a) STATES OF A PROCESS
There are five states of a process which are new, ready, running, waiting and terminated
- New State
- A process is in a terminated state when it completes its execution. 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 the process.
- Ready State
- A process is said to be in the 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 the operating system.
- Blocked State/ Waiting State
- A process is in a 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 the terminated state when it completes its execution
b) DOS
DOS
ABBREVIATION:
It is an abbreviation of Disk Operating System.
HISTORY:
It is a single-user operating system and has been very popular on microcomputers up to mid-1990s. DOS was designed by IBM (International Business Machines). DOS resides on disk and controls the overall functioning of the computer.
FUNCTION:
It performs the following major tasks:
- Control input and output devices
- Execute user programs
- Manage system resources
- Provide user interface
- Memory management
c) 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 an immediate response. The real-time operating system executes special applications within the 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.
d) 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 a specific task.
Q.8) Describe the functions of operating systems.
FUNCTIONS OF OPERATING SYSTEM
The following are the main functions of the operating system.
- – Process Management
- – Memory Management
- – Input/Output Management
- – File Management
- – Resource Management
- – User Management
Process Management
Process management is an essential part of the operating system (OS). A process is a program in execution. In a computer system, multiple processes are executing concurrently or waiting for their turn to be executed. A process in execution needs resources like processing resources, memory, and I/O resources. The OS must allocate resources to processes, enable processes to share and exchange information, and protect the resources of each process from other processes.
Memory Management
Memory management is the process of allocating memory space for user programs in main memory. When programs are run by users, the operating system allocates portions of free memory to programs. When a program is closed, the operating system will free the memory portion used by that program for reuse. The operating system automatically loads user programs in available memory space and executes them.
Input/Output Management
Input/output management is the process of controlling the operation of all the input/output devices attached to the computer. The user communicates with a computer through various input/output devices such as a keyboard, mouse, monitor printer, etc. Management of these devices is the responsibility of the operating system. The operating system uses the Input/Output controller to manage and coordinate the operation of all the input/output devices.
File Management
A file management system is part of an operating system that organizes stores and keeps track of the computer files and folders. Computer files can be documents, programs, images, videos, etc. The operating system controls the common operations performed on files. These operations include creating, opening, editing, renaming, moving, copying, deleting and searching files.
Resource Management
The operating system automatically manages the resources of a computer when application programs are executed by the computer user. The resources of a computer include microprocessors, memory and all the devices attached to the computer. The operating system allocates resources of a computer to the application program according to the user’s requirement in an efficient way to improve the performance of the computer.
User Management
User management is an important feature of an operating system for maintaining a secure computer system. The operating system gives full control over a computer system to a person known as the administrator. An administrator installs various programs on the computer system for users. He also creates and manages user accounts. When a user account is created, the user is assigned a user name and a password. Administrator allows the users to run various application programs that are installed on the computer. A user can log in to the computer system by entering the username and password, run programs and save his files in his personal folder. The operating system does not allow users to install programs or create new users.
Q.9) Compare DOS, Windows and UNIX operating systems
DOS
ABBREVIATION:
It is an abbreviation of Disk Operating System.
HISTORY:
It is a single-user operating system and has been very popular on microcomputers up to the mid-1990s. DOS was designed by IBM (International Business Machines). DOS resides on disk and controls the overall functioning of the computer.
WINDOWS OPERATING SYSTEM
Windows is the most popular operating system used on microcomputers. It was developed by Microsoft. Many different versions of Windows Operating systems were developed and used successfully in the past. Some of these versions are Windows 95, XP etc. The latest version is Windows 10.
UNIX
UNIX is a multi-user CLI operating system introduced in 1969. It allows multiple users to run different programs at the same time. UNIX was developed for use on the large computer system(Mainframe). It uses a command-line interface but later Graphical User Interface was also introduced.
Class 12 Related Note forKPK english
Topic | Uses |
---|---|
CPU | 11 |
IBM | 2 |
(International Business Machines). | 2 |
Memory management | 2 |
Bell Labs. | 1 |
(Central | 1 |
UNIX, | 1 |
Linux, | 1 |