Hire Experts For Answers
Order NowRelated Study Services
- Homework Answers
- Coursework writing help
- Term paper writing help
- Writing Help
- Paper Writing Help
- Research paper help
- Thesis Help
- Dissertation Help
- Case study writing service
- Capstone Project Writing Help
- Lab report Writing
- Take my online class
- Take my online exam
- Do my test for me
- Do my homework
- Do my math homework
- Online Assignment Help
- Do my assignment
- Essay Writing Help
- Write my college essay
- Write my essay for me
Attachments
CSO Lab #1: Scheduling
1 Introduction
In this lab you will simulate the scheduling of n processes P1, P2, ..., Pn
on a single CPU. You will simulate both FIFO(First come, first serve) and
Round Robin scheduling.
2 Trivial Case n = 1
Each process Pi, if run alone (i.e., if it were the only process) would have
four phases (R1i, B1i, R2i, and B2i) followed by a final “termination
phase”.
1. Pi would first run for time R1i (presumably initializing its data struc
tures, but the reason is not relevant to the lab).
2. Pi would then block for time B1i (presumably reading its input).
3. Pi would then run for time R2i (computing its results).
4. Pi would the block for time B2i (outputting its results).
5. Finally, Pi would run for time 1 (just to terminate).
3 Creation Time and Breaking Ties
Creation Time For simplicity all processes are created at time 0. No input
is required to specify this rule
Breaking Ties Use our standard tie-breaking rule. Since all processes are
created at the same time, ties are broken by favoring the
alphabetically first process. No input is needed to specify this rule.
1
4 Input
All time units are milliseconds. Each simulation begins by reading the
parameters for the current run. Specifically:
n :The number of processes.
SA : The scheduling algorithm to use. 1 signifies FIFO; 2 signifies RR
with quantum q.
q :The quantum for RR scheduling. q is present only if SA=2.
R11, B11, R21, B21, ..., R1n, B1n, R2n, B2n : The four running and blocking
times for each process. Note that all four values for Pi are given
before any values for Pi+1. Remember that each Pi runs a third time,
in order to terminate. Since that last run is always for 1 time unit, no
input is needed for its specification.
5 Output
At each cycle indicate which processes (if any) are running, which are
ready, and which are blocked. See the two sample runs below.
6 Breaking Ties
Use our standard tie-breaking rule. Since all processes have the same
creation time, the alphabetically first process wins the tie.
7 Computer Language
All 202 labs must be in the C (or C++) language.
8 A Simple, But Not Trivial, Example
8.1 Input
n=2 There are 2 processes, P1 and P2.
SA=1 FIFO scheduling (hence, no preemption and q is not
present). Rs and Bs All Rs are 3 and all Bs are 2.
8.2 Input As Specified To Your Program
2 1 3 2 3 2 3 2 3 2
Note that the order is n, SA, R11, B11, R21, B21, R12, B12, R22, B22.
Example Output:
9 An Example With Preemption
9.1 Input
n=2 There are 2 processes, P1 and P2.
SA=2 RR scheduling.
q=1 RR quantum is 1ms.
Rs and Bs All Rs are 3 and all Bs are 2.
9.2 Input As Specified To Your Program
2 2 1 3 2 3 2 3 2 3 2
Note that the order is n, SA, q, R11, B11, R21, B21, R12, B12, R22, B22.
Output
Explanations and Answers
0
No answers posted
Post your Answer - free or at a fee
NB: Post a homework question for free and get answers - free or paid homework help.
Get answers to: C++ Programming Assignment For Operating Systems: Write Scheduling Program or similar questions only at Tutlance.
Related Questions
- Python Programming For Defining Several Functions
- (C Programming) Computer Science Program With Files
- Programming And Compiling For A Java Assignment
- Implementing Two Classes Powers And Shiftutil.
- Passing Values Python Assignment
- C# Project With Gui Using Avalonia
- Use Ajax To Update Parts Of A Web Page.
- Memory Program In C That Plays A 2-Player Memory Game.
- Hierarchical Agglomerative Clustering In Python
- Common Lisp Programming Project
- Programming, Assessment 10: Input, Processing, And Output
- Python Lab College Intro Course
- Python - Tree Data Structure Assignment
- C Programming Project About Files And Decoding Codes.
- Expression Binary Tree On Python
- Operating Systems Race Condition
- Using Basic Excel Functions (Formatting, Formulas, Etc.)
- Using Basic Excel Functions (Formatting, Formulas, Etc.)
- Program Budgeter. Must Be Coded In Java And Meet All Requirements Found In The Attached Doc.
- In C#, Create A Clock Class With Private Fields: "Int Hours" + "Int Minutes". Hours Is (0<X<23), Minutes Is (0<X<59)
- Sql Injection, Buffer Overflow Seed Lab
- I Need Comp1012 Python Programming Help
- A Computer Logic Working Clock Project
- I Need Python Programming Help On My Test
- I Need Someone To Code This Homework 4B: The 2048 Game. I Have Been Really Struggling On It
- Homework Coding.write And Test A Function To Draw A Box On The Bitmap Display
- Programming Project.for A Data Structures Class
- Writing A Program In Java That Meets The Requirements Stated On The Attached File
- Summative Lab Worksheet Using Mbed Online Complier And Simulator
- Java Scrabble Game Programming
- Python Coding Computer Science Fill In The Blank Homework Online Banking System
- Sql Injection, Buffer Overflow Seed Labs
- Computer Vision Homework, Computational Graphs And Backprop, Optimization And Fitting Fully-Connected Neural Networks
- Neural Network Project Training/Classify
- Answer This Software Security Exam
- Subnet Problem Solving 2021
- Programming Assignment In Java Details In Requirements
- Writing A Project Of Scheme Functions
- Writing A Project Of Scheme Functions
- Wireshark Homework Help. I Am Looking To Get Help With My Homework.
- Cyber Security (Network Security)
- Data Sockets Lab - Using A Mock Server To Send Data And Receive A Response
- Microsoft Excel Project 6-5 Classic Gardens
- File System Report To Stdout About The File System Supplied To The Program As A Command Line Argument.
- Create A Game Using Coding In Python
- Have To Design A Coding Interview Question In Python For Testing Knowledge Both Basic Data Structures And Algorithms.
- Question1 Assignment Coding C Plus Plus Language
- Hw 02 - Regex And Filters Linux/Unix
- Data Sockets Lab To Test For Request And Response
- Homework In Javascript Pragram