SlideShare a Scribd company logo
Problem 2.1
• Suppose we have a multiprogrammed computer in which each job has
identical characteristics. In one computation period, T, for a job, half the
time is spent in I/O and the other half in processor activity. Each job runs
for a total of N periods. Assume that a simple round-robin scheduling is
used, and that I/O operations can overlap with processor operation.
Define the following quantities:
• Turnaround time = actual time to complete a job
• Throughput = average junber of jobs completed per time period T
• Processor utilization = percentage of time that the processor is active (not
waiting)
• Compute these quantities for one, two and four simultaneous jobs,
assuming the period T is distributed in each of the following ways:
(a) I/O first half, processor second half
(b) I/O first and fourth quarter, processor second and fourth quarter.
Problem 2.1
• Each process uses the first half of the time period T to do IO
• Then in second half, uses the processor
• Process needs N time periods to complete
• One process:
Problem 2.1
• Each process uses the first half of the time period T to do IO
• Then in second half, uses the processor
• Process needs N time periods to complete
• Two proceses:
Problem 2.1
• Each process uses the first half of the time period T to do IO
• Then in second half, uses the processor
• Process needs N time periods to complete
• Two procesess:
Problem 3.3
Possible transitions (pages 123-124):
• New → Ready or Ready/Suspend
• Ready → Running or Ready/Suspend
• Ready/Suspend → Ready
• Blocked → Ready or Blocked/Suspend
• Blocked/Suspend → Ready /Suspend or Blocked
• Running → Ready, Ready/Suspend, or Blocked
• Any State → Exit
a.
List all possible transitions and give an
example of what could cause each.
Problem 3.3
Impossible transitions:
• New → Blocked, Blocked/Suspend, or Running:
A newly created process remains in the new state until the processor is
ready to take on an additional process, at which time it goes to one of the
Ready states.
• Ready → Blocked or Blocked/Suspend:
Typically, a process that is ready cannot subsequently be blocked until it
has run. Some systems may allow the OS to block a process that is
currently ready, perhaps to free up resources committed to the ready
process.
• Ready/Suspend → Blocked or Blocked/Suspend:
Same reasoning as preceding entry.
b.
List all impossible transitions and
explain why they cannot occur
Problem 3.3
• Ready/Suspend → Running:
The OS first brings the process into memory, which puts it into the Ready
state.
• Blocked → Ready /Suspend:
this transition would be done in 2 stages. A blocked process cannot at the
same time be made ready and suspended, because these transitions are
triggered by two different causes.
• Blocked/Suspend → Ready:
same reasoning as Blocked → Ready /Suspend
b.
List all impossible transitions and
explain why they cannot occur
Problem 3.6
• Consider the transition diagram from the previous problem.
Suppose that it is time for the OS to dispatch a process and
that there are processes in both the Ready state and the
Ready/Suspend state and that at least one process in the
Ready/Suspend state has higher scheduling priority than any
of the processes in the Ready state. Two extreme policies are
as follows:
1. Always dispatch a process in the ready state, to minimize
swapping; and
2. Always give preference to the highest priority process , even
though that may mean swapping when swapping is not
necessary.
Suggest an intermediate policy that tries to balance the
concerns of priority and performance.
Problem 3.6
• Penalize the Ready, suspend processes by some fixed
amount, such as one or two priority levels
• Then a Ready/Suspend process is chosen next only if it has a
higher priority than the highest-priority Ready process by
several levels of priority.
Problem 3.6
• Penalize the Ready, suspend processes by some fixed
amount, such as one or two priority levels
• Then a Ready/Suspend process is chosen next only if it has a
higher priority than the highest-priority Ready process by
several levels of priority.

More Related Content

PPT
pipeline and vector processing
Acad
 
PDF
OS - Deadlock
vinay arora
 
PPT
Mutual exclusion
Dillip Behera
 
DOCX
0-1 KNAPSACK PROBLEM
i i
 
PDF
Pipelining
sarith divakar
 
PPTX
evolution of operating system
Amir Khan
 
PPTX
Producer consumer problem operating system
Al Mamun
 
PPT
01 knapsack using backtracking
mandlapure
 
pipeline and vector processing
Acad
 
OS - Deadlock
vinay arora
 
Mutual exclusion
Dillip Behera
 
0-1 KNAPSACK PROBLEM
i i
 
Pipelining
sarith divakar
 
evolution of operating system
Amir Khan
 
Producer consumer problem operating system
Al Mamun
 
01 knapsack using backtracking
mandlapure
 

What's hot (20)

PPTX
Deadlock Prevention
prachi mewara
 
PDF
Process & Thread Management
Vpmv
 
PPTX
Single &Multi Core processor
Justify Shadap
 
PDF
Operating System-1 by Adi.pdf
Prof. Dr. K. Adisesha
 
PDF
Non-Uniform Memory Access ( NUMA)
Nakul Manchanda
 
PPTX
Von-Neumann machine and IAS architecture
Shishir Aryal
 
PPT
Process management in os
Miong Lazaro
 
PPTX
Greedy Algorithm - Knapsack Problem
Madhu Bala
 
PPTX
Data Hazard and Solution for Data Hazard
COMSATS Institute of Information Technology
 
PPT
Vliw
AJAL A J
 
DOCX
Central processing unit
jyoti_lakhani
 
PPTX
Clock-8086 bus cycle
Rani Rahul
 
PPTX
Deadlock Slides
sehrishishaq1
 
PPT
Parallel processing
rajshreemuthiah
 
PDF
Pipelining and ILP (Instruction Level Parallelism)
Dr. A. B. Shinde
 
DOCX
Operating System Process Synchronization
Haziq Naeem
 
PPTX
CISC & RISC Architecture
Suvendu Kumar Dash
 
PPT
Presentation On RAID(Redundant Array Of Independent Disks) Basics
Kuber Chandra
 
PPTX
Matrix multiplication
International Islamic University
 
PPTX
Fault tolerance techniques for real time operating system
anujos25
 
Deadlock Prevention
prachi mewara
 
Process & Thread Management
Vpmv
 
Single &Multi Core processor
Justify Shadap
 
Operating System-1 by Adi.pdf
Prof. Dr. K. Adisesha
 
Non-Uniform Memory Access ( NUMA)
Nakul Manchanda
 
Von-Neumann machine and IAS architecture
Shishir Aryal
 
Process management in os
Miong Lazaro
 
Greedy Algorithm - Knapsack Problem
Madhu Bala
 
Data Hazard and Solution for Data Hazard
COMSATS Institute of Information Technology
 
Vliw
AJAL A J
 
Central processing unit
jyoti_lakhani
 
Clock-8086 bus cycle
Rani Rahul
 
Deadlock Slides
sehrishishaq1
 
Parallel processing
rajshreemuthiah
 
Pipelining and ILP (Instruction Level Parallelism)
Dr. A. B. Shinde
 
Operating System Process Synchronization
Haziq Naeem
 
CISC & RISC Architecture
Suvendu Kumar Dash
 
Presentation On RAID(Redundant Array Of Independent Disks) Basics
Kuber Chandra
 
Matrix multiplication
International Islamic University
 
Fault tolerance techniques for real time operating system
anujos25
 
Ad

Viewers also liked (10)

PPT
Homework solutionsch8
Ignåciø Såråviå
 
PPTX
Homework solutionsch9
Ignåciø Såråviå
 
DOCX
Symmetric Multi Processor Multiprocessors
Saad Tanvir
 
PDF
VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...
vtunotesbysree
 
PPTX
Real Time OS For Embedded Systems
Himanshu Ghetia
 
PPTX
Real time Operating System
Tech_MX
 
PPT
Processes Control Block (Operating System)
Imdad Ullah
 
PPTX
Operating System-Memory Management
Akmal Cikmat
 
PPT
Memory management
Vishal Singh
 
DOC
12. Strategic Business Plan Outline
Earl Stevens
 
Homework solutionsch8
Ignåciø Såråviå
 
Homework solutionsch9
Ignåciø Såråviå
 
Symmetric Multi Processor Multiprocessors
Saad Tanvir
 
VTU 4TH SEM CSE COMPUTER ORGANIZATION SOLVED PAPERS OF JUNE-2013 JUNE-2014 & ...
vtunotesbysree
 
Real Time OS For Embedded Systems
Himanshu Ghetia
 
Real time Operating System
Tech_MX
 
Processes Control Block (Operating System)
Imdad Ullah
 
Operating System-Memory Management
Akmal Cikmat
 
Memory management
Vishal Singh
 
12. Strategic Business Plan Outline
Earl Stevens
 
Ad

Similar to Homework solution1 (20)

PPTX
OPERATING SYSTEM LAB OPERATING SYSTEM LAB
NiharikaGuptas
 
PPTX
Process management in Operating System_Unit-2
mohanaps
 
PDF
Lecture 3 CPU scheduling_2.pdflllllllllll
MohamedPalastine
 
PDF
Lecture 3 CPU scheduling.pdfvgukgiolphpiphjp
MohamedPalastine
 
PPTX
Process Scheduling
Santhi thi
 
PPT
Unit2 CPU Scheduling 24252 (sssssss1).ppt
AkashPundir2
 
PPT
Unit2 CPU Scheduling 24252.ppBBBBBBBBBBt
AkashPundir2
 
PPTX
topic cpu scheduling in operating system.pptx
iotsaprofessor
 
PPTX
Mutual Exclusion using Peterson's Algorithm
Souvik Roy
 
PPT
ch_scheduling (1).ppt
Farhanahmad540205
 
PPTX
Operating system 23 process synchronization
Vaibhav Khanna
 
PPTX
PROCESS.pptx
DivyaKS18
 
PPT
operating system Scheduling process unit 3.ppt
ManoRanjani30
 
PPTX
CPU Scheduling
M. Abdullah Wasif
 
PPTX
CPU Scheduling.pptx this is operating system
harshinidh06
 
PPTX
In computing, scheduling is the action .
nathansel1
 
PPT
scheduling Uni processor Long-term .ppt
Saba651353
 
PPTX
Chapter 3 - Operating System Scheduling.pptx
MujtabaVlogs
 
PPT
Operating System Scheduling
Vishnu Prasad
 
PPT
Cp usched 2
nidsrajdev
 
OPERATING SYSTEM LAB OPERATING SYSTEM LAB
NiharikaGuptas
 
Process management in Operating System_Unit-2
mohanaps
 
Lecture 3 CPU scheduling_2.pdflllllllllll
MohamedPalastine
 
Lecture 3 CPU scheduling.pdfvgukgiolphpiphjp
MohamedPalastine
 
Process Scheduling
Santhi thi
 
Unit2 CPU Scheduling 24252 (sssssss1).ppt
AkashPundir2
 
Unit2 CPU Scheduling 24252.ppBBBBBBBBBBt
AkashPundir2
 
topic cpu scheduling in operating system.pptx
iotsaprofessor
 
Mutual Exclusion using Peterson's Algorithm
Souvik Roy
 
ch_scheduling (1).ppt
Farhanahmad540205
 
Operating system 23 process synchronization
Vaibhav Khanna
 
PROCESS.pptx
DivyaKS18
 
operating system Scheduling process unit 3.ppt
ManoRanjani30
 
CPU Scheduling
M. Abdullah Wasif
 
CPU Scheduling.pptx this is operating system
harshinidh06
 
In computing, scheduling is the action .
nathansel1
 
scheduling Uni processor Long-term .ppt
Saba651353
 
Chapter 3 - Operating System Scheduling.pptx
MujtabaVlogs
 
Operating System Scheduling
Vishnu Prasad
 
Cp usched 2
nidsrajdev
 

Recently uploaded (20)

PPTX
E-Way Bill under GST – Transport & Logistics.pptx
Keerthana Chinnathambi
 
PDF
Followers to Fees - Social media for Speakers
Corey Perlman, Social Media Speaker and Consultant
 
PDF
12 Oil and Gas Companies in India Driving the Energy Sector.pdf
Essar Group
 
PPTX
Pakistan’s Leading Manpower Export Agencies for Qatar
Glassrooms Dubai
 
PPTX
Business Plan Presentation: Vision, Strategy, Services, Growth Goals & Future...
neelsoni2108
 
PDF
askOdin - An Introduction to AI-Powered Investment Judgment
YekSoon LOK
 
PPTX
Memorandum and articles of association explained.pptx
Keerthana Chinnathambi
 
PPTX
Financial Management for business management .pptx
Hasibullah Ahmadi
 
PDF
New Royals Distribution Plan Presentation
ksherwin
 
PDF
2025 07 29 The Future, Backwards Agile 2025.pdf
Daniel Walsh
 
PDF
Alan Stalcup - Principal Of GVA Real Estate Investments
Alan Stalcup
 
PDF
A Complete Guide to Data Migration Services for Modern Businesses
Aurnex
 
PDF
Equinox Gold - Corporate Presentation.pdf
Equinox Gold Corp.
 
DOCX
UNIT 2 BC.docx- cv - RESOLUTION -MINUTES-NOTICE - BUSINESS LETTER DRAFTING
MANJU N
 
PDF
NewBase 24 July 2025 Energy News issue - 1805 by Khaled Al Awadi._compressed...
Khaled Al Awadi
 
DOCX
unit 1 BC.docx - INTRODUCTION TO BUSINESS COMMUICATION
MANJU N
 
PPTX
Brain Based Enterprises - Harmonising Man, Woman and Machine
Peter Cook
 
PDF
Top 10 Corporates in India Investing in Sustainable Energy.pdf
Essar Group
 
PDF
Tariff Surcharge and Price Increase Decision
Joshua Gao
 
PDF
Unveiling the Latest Threat Intelligence Practical Strategies for Strengtheni...
Auxis Consulting & Outsourcing
 
E-Way Bill under GST – Transport & Logistics.pptx
Keerthana Chinnathambi
 
Followers to Fees - Social media for Speakers
Corey Perlman, Social Media Speaker and Consultant
 
12 Oil and Gas Companies in India Driving the Energy Sector.pdf
Essar Group
 
Pakistan’s Leading Manpower Export Agencies for Qatar
Glassrooms Dubai
 
Business Plan Presentation: Vision, Strategy, Services, Growth Goals & Future...
neelsoni2108
 
askOdin - An Introduction to AI-Powered Investment Judgment
YekSoon LOK
 
Memorandum and articles of association explained.pptx
Keerthana Chinnathambi
 
Financial Management for business management .pptx
Hasibullah Ahmadi
 
New Royals Distribution Plan Presentation
ksherwin
 
2025 07 29 The Future, Backwards Agile 2025.pdf
Daniel Walsh
 
Alan Stalcup - Principal Of GVA Real Estate Investments
Alan Stalcup
 
A Complete Guide to Data Migration Services for Modern Businesses
Aurnex
 
Equinox Gold - Corporate Presentation.pdf
Equinox Gold Corp.
 
UNIT 2 BC.docx- cv - RESOLUTION -MINUTES-NOTICE - BUSINESS LETTER DRAFTING
MANJU N
 
NewBase 24 July 2025 Energy News issue - 1805 by Khaled Al Awadi._compressed...
Khaled Al Awadi
 
unit 1 BC.docx - INTRODUCTION TO BUSINESS COMMUICATION
MANJU N
 
Brain Based Enterprises - Harmonising Man, Woman and Machine
Peter Cook
 
Top 10 Corporates in India Investing in Sustainable Energy.pdf
Essar Group
 
Tariff Surcharge and Price Increase Decision
Joshua Gao
 
Unveiling the Latest Threat Intelligence Practical Strategies for Strengtheni...
Auxis Consulting & Outsourcing
 

Homework solution1

  • 1. Problem 2.1 • Suppose we have a multiprogrammed computer in which each job has identical characteristics. In one computation period, T, for a job, half the time is spent in I/O and the other half in processor activity. Each job runs for a total of N periods. Assume that a simple round-robin scheduling is used, and that I/O operations can overlap with processor operation. Define the following quantities: • Turnaround time = actual time to complete a job • Throughput = average junber of jobs completed per time period T • Processor utilization = percentage of time that the processor is active (not waiting) • Compute these quantities for one, two and four simultaneous jobs, assuming the period T is distributed in each of the following ways: (a) I/O first half, processor second half (b) I/O first and fourth quarter, processor second and fourth quarter.
  • 2. Problem 2.1 • Each process uses the first half of the time period T to do IO • Then in second half, uses the processor • Process needs N time periods to complete • One process:
  • 3. Problem 2.1 • Each process uses the first half of the time period T to do IO • Then in second half, uses the processor • Process needs N time periods to complete • Two proceses:
  • 4. Problem 2.1 • Each process uses the first half of the time period T to do IO • Then in second half, uses the processor • Process needs N time periods to complete • Two procesess:
  • 5. Problem 3.3 Possible transitions (pages 123-124): • New → Ready or Ready/Suspend • Ready → Running or Ready/Suspend • Ready/Suspend → Ready • Blocked → Ready or Blocked/Suspend • Blocked/Suspend → Ready /Suspend or Blocked • Running → Ready, Ready/Suspend, or Blocked • Any State → Exit a. List all possible transitions and give an example of what could cause each.
  • 6. Problem 3.3 Impossible transitions: • New → Blocked, Blocked/Suspend, or Running: A newly created process remains in the new state until the processor is ready to take on an additional process, at which time it goes to one of the Ready states. • Ready → Blocked or Blocked/Suspend: Typically, a process that is ready cannot subsequently be blocked until it has run. Some systems may allow the OS to block a process that is currently ready, perhaps to free up resources committed to the ready process. • Ready/Suspend → Blocked or Blocked/Suspend: Same reasoning as preceding entry. b. List all impossible transitions and explain why they cannot occur
  • 7. Problem 3.3 • Ready/Suspend → Running: The OS first brings the process into memory, which puts it into the Ready state. • Blocked → Ready /Suspend: this transition would be done in 2 stages. A blocked process cannot at the same time be made ready and suspended, because these transitions are triggered by two different causes. • Blocked/Suspend → Ready: same reasoning as Blocked → Ready /Suspend b. List all impossible transitions and explain why they cannot occur
  • 8. Problem 3.6 • Consider the transition diagram from the previous problem. Suppose that it is time for the OS to dispatch a process and that there are processes in both the Ready state and the Ready/Suspend state and that at least one process in the Ready/Suspend state has higher scheduling priority than any of the processes in the Ready state. Two extreme policies are as follows: 1. Always dispatch a process in the ready state, to minimize swapping; and 2. Always give preference to the highest priority process , even though that may mean swapping when swapping is not necessary. Suggest an intermediate policy that tries to balance the concerns of priority and performance.
  • 9. Problem 3.6 • Penalize the Ready, suspend processes by some fixed amount, such as one or two priority levels • Then a Ready/Suspend process is chosen next only if it has a higher priority than the highest-priority Ready process by several levels of priority.
  • 10. Problem 3.6 • Penalize the Ready, suspend processes by some fixed amount, such as one or two priority levels • Then a Ready/Suspend process is chosen next only if it has a higher priority than the highest-priority Ready process by several levels of priority.