This document discusses multiprogramming and time sharing in operating systems. It defines multiprogramming as allowing multiple programs to execute concurrently by assigning pending work to idle processors and I/O devices. Time sharing extends multiprogramming by rapidly switching between programs so that each program executes for a fixed time quantum, giving users the impression that the entire system is dedicated to their use. The key aspects covered are the concepts of processes, CPU scheduling, and how multiprogramming and time sharing improve resource utilization.
Basics of Operating Systems including multiprogramming and time sharing concepts are introduced.
Details about multiprogramming are covered, including process execution and concurrency benefits.Time sharing as an extension of multiprogramming is explained with its interactivity and user experience.
Discussion on multiprogramming and time sharing systems with engaging quizzes to reinforce learning.
Links to further materials on operating systems, web design, microprocessors, and programming tutorials.
Multiprogramming
• A programunder execution is called a process
• Serial execution of the program causes either the process or
I/O devices to be ideal at some time even if the input job
stream is never empty – a problem ( refer next slide )
• Solution to this problem is to assign some other work to the
processor and I/O devices when they are idle
• Allow programs to execute concurrently by assigning pending
work to under utilized components
4
5.
Example
Program 1 Program 2
P1 IDLE P1 IDLE P1 P2 IDLE P2 IDLE P2
Time
Processor Activity
Multi Programming
5
6.
Multiprogramming
• Previous Figureillustrates a possible scenario of concurrent
execution of the two programs
• It starts with the processor executing the first computational
sequence program 1
• Instead of idling during the I/O sequence of program 1, the
processor is assigned to the first computation sequence of
the program 2, which is assumed to be in memory and
awaiting for execution
• When this work is done, the processor is assigned to
program 1 again, then to program 2, and so forth
6
7.
Multiprogramming (Contd..)
• Performanceof processor may be improved by
interleaved execution of programs
• With a single processor, parallel execution of
program is not possible, and at most one program
can be in control of the processor at any time
7
8.
Multiprogramming (Contd..)
• Itachieves 100% processor utilization with only two
active programs
• Multiprogramming has been employed to increase
resource utilization of a computer system and to
support multiple, simultaneously active users
8
9.
Multiprogramming (Contd..)
• Multiprogrammingsystem is provided by time
sharing systems found in many university
computer centers
• Time sharing systems support multiple interactive
users
• System and user programs, as well as data, are
kept on the secondary storage which is managed
by the file system
9
10.
Time sharing
• Timesharing is the logical extension of
Multiprogramming
• Time sharing systems executes multiple jobs by
switching among them ( refer next slide )
• Switches occurs frequently so that the user can
interact with each program while it is running
• Each program executes for a fixed time quantum
10
11.
Example
Program 1
Program 2
P1 P2 P1 P2 P1 P2 Time
Time Sharing
11
12.
Timesharing (Contd..)
• Timesharing requires an interactive computer
system
• i.e. direct communication between the user and the
system
• Time sharing OS allows many users to share the
computer simultaneously
• Each action or command in a time shared system is
short, only a little of CPU time is required for each
user 12
13.
Timesharing (Contd..)
• Thesystem switches rapidly from one user to
the next
• User gets the impression that the entire system
is dedicated to his use
• Time shared operating system uses CPU
scheduling and Multiprogramming to provide
• each user with a small portion of a time-shared
system
13
Click here tosee
Operating Systems
Basics of Operating Systems
Definition of Operating Systems
1.4 Know about concept of spooling and
buffering ppt
Other subject materials
• Web designing
• Micro processors
• C++ tutorials
• java
home 17