Multiprogramming
Unit-1
Multiprogramming
Multiprogramming
• Allows multiple processes to reside in main
memory ready to execute.
• Only one program at a time gets the CPU for
execution while others are waiting their turn.
• The running program keeps executing until it
blocks for I/O and the next program in line
takes the turn for execution.
• Goal is to optimize CPU utilization by reducing
CPU idle time.
• Not used any more
• Example of multiprogramming, we open word, excel, access and other
applications together but while we type in word other applications
such as excel and access are just present in main memory but they
are not performing any task or work. Or we can say that are not being
used at the same time.
Throughput - The total number of processes that complete their
execution per time unit. OR Time required to complete the execution of
all the processes.
Multiprogramming
• Advantages
– High CPU Utilization
– Increased throughput and lower response time.
• Disadvantage
– Doesn't guarantee timely completion of a program. If very first process runs for
hours without needing any I/O, other processes will keep waiting.
– Need larger memory hence memory management also required.
– Proper memory protection mechanism required.
– Job scheduling - the processor must decide which process to run.
Time Sharing
• A logical extension of multiprogramming.
• Time sharing is done to share a high performance computer among
several users (or batch jobs) at the same time.
• Each user (job) have a brief share of CPU time (time slot or quantum ).
• In Multiprogramming, one program keeps running until it blocks
however in a time sharing system each running process takes only a
fair amount of the CPU time called quantum time.
• Goal is to minimize response time.
• Response time of a properly designed system similar to dedicated
system.
Time Sharing
• Single user
– Multiple processes running on one system
• Multi user
– It allow several user to run several task concurrently on processor by
having several dumb terminals.
– Each user is provided with its own terminal connected to the main
computer system.
– Each user have a brief share of CPU time (time slot or quantum).
– Gives an illusion that each user is getting full attention of CPU.
Time Sharing
• Advantages
– Provide advantage of quick response
– Avoids duplication of software
– Reduces CPU idle time
• Disadvantages
– Reliability problem.
– One must have to take care of the security and integrity of user
programs and data.
– Data communication problem.
Multi Tasking
• Multiple (programs, processes, tasks, threads) running at the same
time.
• Also known as time sharing.
• Might use time sharing, multi processing to implement.
Multiprocessing (Parallel Systems)
• Multiprocessor systems have more than one CPU in close
communication.
• Tightly coupled system – processors share memory and a clock;
communication usually takes place through the shared memory.
• All processors can perform the same functions or different ones
• They are commonly used for scientific applications
Printer
Distributed Operating System
• These types of operating system is a recent advancement in the world of
computer technology
• Various autonomous interconnected computers communicate with each
other using a shared communication network. Independent systems
possess their own memory unit and CPU.
• These are referred to as loosely coupled systems or distributed systems.
• These systems’ processors differ in size and function.
• The major benefit of this OS is always possible that one user can access
the files or software which are not actually present on his system but
some other system connected within this network i.e., remote access is
enabled within the devices connected in that network.
Advantages of Distributed Operating
System
• Failure of one will not affect the other network communication, as all
systems are independent of each other.
• Electronic mail increases the data exchange speed.
• Since resources are being shared, computation is highly fast and
durable.
Disadvantages of Distributed Operating
System
• Failure of the main network will stop the entire communication.
• To establish distributed systems the language is used not well-