Nothing Special   »   [go: up one dir, main page]

Wa0003.

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Government Polytechnic, Ahmednagar

Computer Technology and Computer Engineering Department

Academic Year 2023-24 (Odd Semester)


Subject Name: OSY Subject Code: 22516 Test: Test-1

Prepared by: Mr.N.B.Nake

Model Answer
Q. S. Q. Answer Marking
No. No. Scheme
1 Solve any FOUR of the following: 12M
a Define degree of multiprogramming. Give an example. 02M
Ans. The number of processes present in main memory is called as 1 Mark for
degree of multiprogramming. correct
definition
Example: Degree of multiprogramming is 4.
1 Mark for
example

b. What are dual modes of OS? Enlist any two system calls for 02M
each Process control and File Management
Ans. We have two modes of the operating system: user mode and 1 Mark for
kernel mode. Mode bit is required to identify in which particular correct modes
mode the current instruction is executing. If the mode bit is 1, it
operates user mode, and if the mode bit is 0, it operates in kernel 1 Mark for
mode. each type
System calls for Process control system call
create process, terminate process
end, abort
load, execute
get process attributes, set process attributes
System calls for File Management
create file, delete file
open, close file
read, write, reposition
get and set file attributes
c. Differentiate between GUI and CLI (Any 4 points). 02M
Ans. ½ mark for
each point

d. Define Real time OS and list any two applications 02M


Ans. Real time Operating System: 1 mark for
A real time system has well defined fixed time constraints. definition.
Processing should be done within the defined constraints -Hard and 1 mark for two
Soft real time applications.
System.

OR

The real-time operating system used for a real-time application


means for those applications where data processing should be done
in the fixed and small quantum of time.

Applications:
1. Flight Control System
2. Simulations
3. Industrial control
4. Military applications
e. What is the usage of OS tools: User management and Device 02M
management?
Ans. 1 Mark each
Device management (two points
-Installing device and component level drivers and related for each
software. management
-Configuring a device so it performs as per user expectations. with ½ marks
each)
User management
- OS can be single user or multiuser.
- In case of multiuser, OS needs to take care of level of rights
and privileges.
- OS provides facility of addition, deletion, modification of
user accounts, etc.
f. Enlist OS Services (Any 4) 02M
Ans 1.User Interface ½ Mark for
2. Program execution any correct
3. I/O operations four Services
4.File system manipulation
5.Communication
6.Error detection
7.Resource allocation
8.Accounting
9.Protection & security

2. Solve any THREE of the following: 12M


a. Explain Context switching in detail with necessary diagram. 04M
Ans 2 Marks:-
Diagram
2 Marks:-
Explanation

When CPU switches to another process, the system must save the
state of the old process and load the saved state for the new
process via a context switch

Context of a process represented in the PCB


Context-switch time is overhead; the system does no useful work
while switching

The more complex the OS and the PCB  the longer the context
switch

Time dependent on hardware support


Some hardware provides multiple sets of registers per CPU 
multiple contexts loaded at once
b. Explain process management and file management components 04M
of OS.
Ans Process Management: The operating system manages many kinds 2 Marks each
of activities ranging from user programs to system programs like for correct
printer spooler, name servers, file server etc. explanation

Each of these activities is encapsulated in a process.

A process includes the complete execution context (code, data,


PC, registers, OS resources in use etc.).
The basic unit of software that the operating system deals with in
scheduling the work done by the processor is either a process or a
thread, depending on the operating system.
It’s tempting to think of a process as an application, but that
gives an incomplete picture of how processes relate to the
Operating system and hardware.
The application you see (word processor or spread sheet or game)
is, indeed, a process, but that application may cause several other
processes to begin, for tasks like communications with other
devices or other computers.
There are also numerous processes that run without giving you
direct evidence that they ever exist. A process, then, is software that
performs some action and can be controlled by a user, by other
applications or by the operating system.
It is processes, rather than applications, that the operating system
controls and schedules for execution by the CPU. In a single
tasking system, the schedule is straightforward.
The five major activities of an operating system in regard to
process management are
1. Creation and deletion of user and system processes.
2. Suspension and resumption of processes.
3. A mechanism for process synchronization.
4. A mechanism for process communication.
5. A mechanism for deadlock handling.

File Management
A file is a collection of related information stored on secondary
storage.
Processes can access the files as per their necessities.
After process termination, information in file should remain
retained and should vanish.

OS is responsible for file management activities like


-Creation and deletion of files and directories.
-Provide file access and allocation of storage space to files.
-Maintain back up of files.
-File Security.
-Providing the primitives for manipulating files.
c. With neat diagram explain IPC model in detail. 04M
Ans Inter-process communication: Cooperating processes require an 2 Marks each
Interprocess communication (IPC) mechanism that will allow them for correct
to exchange data and information. explanation
and diagram
There are two models of IPC
1. Shared memory
In this, all processes who want to communicate with other
processes can access a region of the memory residing in an
address space of a process creating a shared memory segment.
All the processes using the shared memory segment should
attach to the address space of the shared memory. All the
processes can exchange information by reading and/or writing
data in shared memory segment.
The form of data and location are determined by these processes
who want to communicate with each other.
These processes are not under the control of the operating
system.
The processes are also responsible for ensuring that they are not
writing to the same location simultaneously.
After establishing shared memory segment, all accesses to the
shared memory segment are treated as routine memory access
and without assistance of kernel.

2. Message Passing
In this model, communication takes place by exchanging
messages between cooperating processes.
It allows processes to communicate and synchronize their action
without sharing the same address space.
It is particularly useful in a distributed environment when
communication process may reside on a different computer
connected by a network.
Communication requires sending and receiving messages
through the kernel.
The processes that want to communicate with each other must
have a communication link between them. Between each pair of
processes exactly one communication link.
d. Differentiate between long term and short term schedulers 04M
(Any 4 points).
Ans 1 Mark for
each correct
point

e. Enlist different types of OS. Explain Batch OS in detail with 04M


necessary diagram.
Ans Types of operating system 1 mark for
1.Batch Systems listing types.
2.Multiprogramming 1 mark for
3.Multitasking diagram.
4.Time-Sharing Systems 2 Marks for
5.Desktop Systems explanation.
6.Distributed system
7.Clustered system
8.Real Time system

Batch OS
 There is a less stress on processor and it involves less user
interaction. (Batch- A set of jobs with similar needs)
 The computer operator can delay or prioritize different
batches easily depending on cicrumstances.
 There is a very less interaction between user and computer.
 No mechanism to prioritize processes.
 CPU is often idle.
 Due to lack of protection scheme, one batch job can affect
pending jobs.

Example:
 Payroll run for a company
 Gas and electricity bill produced by a batch system.
 Bank statements.

You might also like