Você está na página 1de 11

OS SOLVED WORKSHEET 1

Q.1 What is the relationship between operating systems and computer hardware?

Answer: Operating system helps to make computer hardware available to the application
programs. Without Operating System we cannot access computer hardware.

An Operating System provides services to both the users and to the programs

 It provides programs an environment to execute.

 It provides users the services to execute the programs in a convenient manner.

Following are some of important functions of an operating System.

 Memory Management
 Processor Management
 Device Management
 File Management
 Security
 Control over system performance
 Job accounting
 Error detecting aids
 Coordination between other software and users

Q.2 How Buffering can improve the performance of a Computer system?

Answer: If C.P.U and I/O devices are nearly same at speed, the buffering helps in making the
C.P.U and the I/O devices work at full speed in such a way that C.P.U and the I/O devices never
sit idle at any moment.

Normally the C.P.U is much faster than an input device. In this case the C.P.U always faces an
empty input buffer and sits idle waiting for the input device which is to read a record into the
buffer.For output, the C.P.U continues to work at full speed till the output buffer is full and then
it starts waiting.

Thus buffering proves useful for those jobs that have a balance between computational work
and I/O operations. In other cases, buffering scheme may not work well
Q.3 What are the primary differences between Network Operating System and Distributed
Operating System?

Answer: Network and Distributed Operating systems have a common hardware base, but the
difference lies in software.

Sr. No. Network Operating System Distributed Operating System

1 A network operating system is made up A distributed operating system is an


of software and associated protocols ordinary centralized operating
that allow a set of computer network to system but runs on multiple
be used together. independent CPUs.

2 Environment users are aware of Environment users are not aware of


multiplicity of machines. multiplicity of machines.

3 Control over file placement is done It can be done automatically by the


manually by the user. system itself.
4 Performance is badly affected if certain It is more reliable or fault tolerant i.e
part of the hardware starts distributed operating system
malfunctioning. performs even if certain part of the
hardware starts malfunctioning.

5 Remote resources are accessed by Users access remote resources in the


either logging into the desired remote same manner as they access local
machine or transferring data from the resources.
remote machine to user's own
machines.

Q.4.What are the advantages of multiprogramming?

Answer: Advantages of multiprogramming are −

Increased CPU Utilization − Multiprogramming improves CPU utilization as it organizes a


number of jobs where CPU always has one to execute.

Increased Throughput − Throughput means total number of programs executed over a fixed
period of time. In multiprogramming, CPU does not wait for I/O for the program it is executing,
thus resulting in an increased throughput.

Shorter Turn around Time − Turnaround time for short jobs is improved greatly in
multiprogramming.

Improved Memory Utilization − In multiprogramming, more than one program resides in main
memory. Thus memory is optimally utilized.

Increased Resources Utilization − In multiprogramming, multiple programs are actively


competing for resources resulting in higher degree of resource utilization.

Multiple Users − Multiprogramming supports multiple users.

Q.5. What are the advantages of Multiprocessing or Parallel System?

Answer: Multiprocessing operating system or the parallel system support the use of more than
one processor in close communication.

The advantages of the multiprocessing system are:

Increased Throughput − By increasing the number of processors, more work can be completed in
a unit time.
Cost Saving − Parallel system shares the memory, buses, peripherals etc. Multiprocessor system
thus saves money as compared to multiple single systems. Also, if a number of programs are to
operate on the same data, it is cheaper to store that data on one single disk and shared by all
processors instead of using many copies of the same data.

Increased Reliability − In this system, as the workload is distributed among several processors
which results in increased reliability. If one processor fails then its failure may slightly slow
down the speed of the system but system will work smoothly.

Q.6 What are the differences between Batch processing system and Real Time Processing System?

Answer: Following are the differences between Batch processing system and Real Time
Processing System.

Sr. No. Batch Processing System Realtime Processing System

1 Jobs with similar In this system, events mostly external


requirements are batched to computer system are accepted and
together and run through the processed within certain deadlines.
computer as a group.

2 This system is particularly This processing system is particularly


suited for applications such as suited for applications such as scientific
Payroll, Forecasting, experiments, Flight control, few
Statistical analysis etc. military applications, Industrial control
etc.

3 It provides most economical Complex and costly processing requires


and simplest processing unique hardware and software to handle
method for business complex operating system programs.
applications.

4 In this system data is Supports random data input at random


collected for defined period time.
of time and is processed in
batches.
5 In this system sorting is No sorting is required.
performed before processing.

6 It is measurement oriented. It is action or event oriented.

7 Transactions are batch Transactions are processed as and when


processed and periodically. they occur.

8 In this processing there is no It has to handle a process within the


time limit. specified time limit otherwise the
system fails.

Question 7: What are the differences between Real Time System and Timesharing System?

Answer: Following are the differences between Real Time system and Timesharing System.

Sr. No. Real Time System Timesharing System

1 In this system, events mostly external In this system, many users are
to computer system are accepted and allowed to simultaneously share the
processed within certain deadlines. computer resources.

2 Real time processing is mainly Time sharing processing deals with


devoted to one application. many different applications.

3 User can make inquiry only and Users can write and modify
cannot write or modify programs. programs.

4 User must get a response within the User should get a response within
specified time limit; otherwise it may fractions of seconds but if not, the
result in a disaster. results are not disastrous.
5 No context switching takes place in The CPU switches from one process
this system. to another as a time slice expires or a
process terminates.

Question 8: What are the differences between multiprocessing and multiprogramming?

Answer: Following are the differences between multiprocessing and multiprogramming.

Sr. No. Multiprocessing Multiprogramming

1 Multiprocessing refers to Multiprogramming keeps several programs


processing of multiple processes in main memory at the same time and
at same time by multiple CPUs. execute them concurrently utilizing single
CPU.

2 It utilizes multiple CPUs. It utilizes single CPU.

3 It permits parallel processing. Context switching takes place.

4 Less time taken to process the More Time taken to process the jobs.
jobs.

5 It facilitates much efficient Less efficient than multiprocessing.


utilization of devices of the
computer system.

6 Usually more expensive. Such systems are less expensive.


Q.9 Difference between Spooling and Buffering

Comparison chart –

SPOOLING BUFFERING

It overlap the input/output of one It overlaps the input/output of one


Basic job with the execution of another job with the execution of the same
Difference job. job.

Full form Simultaneous peripheral operation


(stands for) online No full form

Spooling is more efficient than Buffering is less efficient than


Efficiency buffering. spooling.

It considers disk as a huge spool Buffer is a limited area in main


Consider Size or buffer. memory.

Q.10 Explain Batch Operating system and its drawback

The users of a batch operating system do not interact with the computer directly. Each user
prepares his job on an off-line device like punch cards and submits it to the computer operator.
To speed up processing, jobs with similar needs are batched together and run as a group. The
programmers leave their programs with the operator and the operator then sorts the programs
with similar requirements into batches.

The problems with Batch Systems are as follows −

Lack of interaction between the user and the job.

CPU is often idle, because the speed of the mechanical I/O devices is slower than the CPU.

Difficult to provide the desired priority.

Q.10 Advantages and Disadvantages of Timesharing systems

Advantages of Timesharing operating systems are as follows −


Provides the advantage of quick response.

Avoids duplication of software.

Reduces CPU idle time.

Disadvantages of Time-sharing operating systems are as follows −

Problem of reliability.

Question of security and integrity of user programs and data.

Problem of data communication.

Q.12 Difference between Hard Real Time OS and Soft Real Time OS

There are two types of real-time operating systems.

Hard real-time systems

Hard real-time systems guarantee that critical tasks complete on time. In hard real-time systems,
secondary storage is limited or missing and the data is stored in ROM. In these systems, virtual
memory is almost never found.

Soft real-time systems

Soft real-time systems are less restrictive. A critical real-time task gets priority over other tasks
and retains the priority until it completes. Soft real-time systems have limited utility than hard
real-time systems. For example, multimedia, virtual reality, Advanced Scientific Projects like
undersea exploration and planetary rovers, etc.

Q13 Explain Multitasking OS

Multitasking is when multiple jobs are executed by the CPU simultaneously by switching
between them. Switches occur so frequently that the users may interact with each program
while it is running. An OS does the following activities related to multitasking −

 The user gives instructions to the operating system or to a program directly, and receives
an immediate response.

 The OS handles multitasking in the way that it can handle multiple operations/executes
multiple programs at a time.
 Multitasking Operating Systems are also known as Time-sharing systems.

 These Operating Systems were developed to provide interactive use of a computer


system at a reasonable cost.

 A time-shared operating system uses the concept of CPU scheduling and


multiprogramming to provide each user with a small portion of a time-shared CPU.

 Each user has at least one separate program in memory.

 A program that is loaded into memory and is executing is commonly referred to as


a process.

 When a process executes, it typically executes for only a very short time before it either
finishes or needs to perform I/O.

 Since interactive I/O typically runs at slower speeds, it may take a long time to complete.
During this time, a CPU can be utilized by another process.

 The operating system allows the users to share the computer simultaneously. Since each
action or command in a time-shared system tends to be short, only a little CPU time is
needed for each user.
 As the system switches CPU rapidly from one user/program to the next, each user is
given the impression that he/she has his/her own CPU, whereas actually one CPU is
being shared among many users.

Q14 Explain Multiprogramming OS and its advantages and disadvantages .


Sharing the processor, when two or more programs reside in memory at the same time, is
referred as multiprogramming. Multiprogramming assumes a single shared processor.
Multiprogramming increases CPU utilization by organizing jobs so that the CPU always has
one to execute.

The following figure shows the memory layout for a multiprogramming system.

An OS does the following activities related to multiprogramming.

 The operating system keeps several jobs in memory at a time.

 This set of jobs is a subset of the jobs kept in the job pool.

 The operating system picks and begins to execute one of the jobs in the memory.

 Multiprogramming operating systems monitor the state of all active programs and system
resources using memory management programs to ensures that the CPU is never idle,
unless there are no jobs to process.
Advantages

 High and efficient CPU utilization.


 User feels that many programs are allotted CPU almost simultaneously.
Disadvantages

 CPU scheduling is required.


 To accommodate many jobs in memory, memory management is required.

Você também pode gostar