0% found this document useful (0 votes)
34 views3 pages

Tutorial 2

Multiprogramming allows the CPU to have multiple jobs ready to execute by organizing jobs so the CPU is never idle. Timesharing enables many users to use a computer simultaneously by rapidly switching between processes using a time-slice scheduling approach. The operating system provides key services like program execution, I/O operations, file system manipulation, communications, and error detection by handling tasks like memory allocation, I/O management, and monitoring for errors, freeing user programs to focus on tasks without worrying about low-level system details.

Uploaded by

Adha Aqil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views3 pages

Tutorial 2

Multiprogramming allows the CPU to have multiple jobs ready to execute by organizing jobs so the CPU is never idle. Timesharing enables many users to use a computer simultaneously by rapidly switching between processes using a time-slice scheduling approach. The operating system provides key services like program execution, I/O operations, file system manipulation, communications, and error detection by handling tasks like memory allocation, I/O management, and monitoring for errors, freeing user programs to focus on tasks without worrying about low-level system details.

Uploaded by

Adha Aqil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Tutorial 2

1. What is multiprogramming ?
Multiprogramming is one of the OS architecture that increases the CPU utilization by
organizing jobs such that CPU always have one to execute. Multiprogrammed system
provides environment for efficient utilization of resources but they do not provide user
interaction with the computer system. Multitasking is the logical extension of
multiprogramming in which CPU executes multiple jobs by switching but switches occur so
frequently that users can interact with each program while it is running

2. What is timesharing?

Time sharing is a technique which enables many people, located at various terminals, to use a
particular computer system at the same time. Most time sharing system use time-slice (round
robin) scheduling of CPU. In this approach, Programs are executed with rotating priority that
increases during waiting and drops after the service is granted. In Order to prevent a program
from monopolising the processor, a program executing longer than the system defined time-
slice in interrupted by the operating system and placed at the end of the queue of waiting
program.

3. What are the services provided by OS?


Program Execution
The purpose of a computer systems is to allow the user to execute programs. So the
operating systems provides an environment where the user can conveniently run
programs. The user does not have to worry about the memory allocation or multitasking or
anything. These things are taken care of by the operating systems.

Running a program involves the allocating and deallocating memory, CPU scheduling in
case of multiprocess. These functions cannot be given to the user-level programs. So user-
level programs cannot help the user to run programs independently without the help from
operating systems.

I/O Operations
Each program requires an input and produces output. This involves the use of I/O. The
operating systems hides the user the details of underlying hardware for the I/O. All the
user sees is that the I/O has been performed without any details. So the operating systems
by providing I/O makes it convenient for the users to run programs.
For efficiently and protection users cannot control I/O so this service cannot be provided by
user-level programs.

File System Manipulation


The output of a program may need to be written into new files or input taken from some
files. The operating systems provides this service. The user does not have to worry about
secondary storage management. User gives a command for reading or writing to a file and
sees his her task accomplished. Thus operating systems makes it easier for user programs
to accomplished their task.

This service involves secondary storage management. The speed of I/O that depends on
secondary storage management is critical to the speed of many programs and hence I think
it is best relegated to the operating systems to manage it than giving individual users the
control of it. It is not difficult for the user-level programs to provide these services but for
above mentioned reasons it is best if this service s left with operating system.

Communications
There are instances where processes need to communicate with each other to exchange
information. It may be between processes running on the same computer or running on
the different computers. By providing this service the operating system relieves the user of
the worry of passing messages between processes. In case where the messages need to be
passed to processes on the other computers through a network it can be done by the user
programs. The user program may be customized to the specifics of the hardware through
which the message transits and provides the service interface to the operating system.

Error Detection
An error is one part of the system may cause malfunctioning of the complete system. To
avoid such a situation the operating system constantly monitors the system for detecting
the errors. This relieves the user of the worry of errors propagating to various part of the
system and causing malfunctioning.

This service cannot allowed to be handled by user programs because it involves monitoring
and in cases altering area of memory or deallocation of memory for a faulty process. Or
may be relinquishing the CPU of a process that goes into an infinite loop. These tasks are
too critical to be handed over to the user programs. A user program if given these
privileges can interfere with the correct (normal) operation of the operating systems.
4. What is the difference(s) between program and process?
5. Draw a diagram of process state and explain how a process migrate from one state to a
another.
6. What are the components of Process Control Block (PCB)?
7. Why PCB is important?
8. What is a context switch?

You might also like