ICS143a 2017 Programming Assignment

Slides:



Advertisements
Similar presentations
OS, , Part II CPU Scheduling Department of Computer Engineering, PSUWannarat Suntiamorntut.
Advertisements

Project: Processes and Resource Management Textbook: pages Lubomir Bic.
Chapter 1.2 Operating Systems. Layered Operating System model Hardware Operating System Application.
Operating Systems ECE344 Ding Yuan Final Review Lecture 13: Final Review.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 17 Scheduling III.
1 Overview Assignment 10: hints  Deadlocks & Scheduling Assignment 9: solution  Scheduling.
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Processes and Their Scheduling.
Chapter 2: Processes Topics –Processes –Threads –Process Scheduling –Inter Process Communication (IPC) Reference: Operating Systems Design and Implementation.
Project 2 – solution code
Project 1CS-3013 A-term Programming Project #1 Forking Processes Due Tuesday, September 8, 11:59 PM.
N ETWORKED & D ISTRIBUTED COMPUTING S YSTEMS L AB Programming Assignments EE323 Computer Networks.
CS1550 Assignment 5 Multiprogramming Implementation notes Matt Craven.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Project 1, Command Shell CS-502 (EMC) Fall Programming Project #1 Command Shell CS-502, Operating Systems EMC, Fall 2009 (Slides include materials.
ENEE150 – 0202 ANDREW GOFFIN Introduction to ENEE150.
CPU Scheduling Algorithms Simulation using Java Kaushal Sinha CSC 4320 Spring 2007.
CS 241 (03/07/12). MP #5 Exam Reminders  We still have a few students that still need to take the conflict.  Thanks for not discussing it on Piazza.
Lab 2 Parallel processing using NIOS II processors
CS140 Project 1: Threads Slides by Kiyoshi Shikuma.
Operating Systems ECE344 Ding Yuan Final Review Lecture 13: Final Review.
1 Installing Java on Your PC. Installing Java To develop Java programs on your PC: Install JDK (Java Development Kit) Add the directory where JDK was.
CSE 153 Design of Operating Systems Winter 2015 Midterm Review.
CS333 Intro to Operating Systems Jonathan Walpole.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
Lecture 5 Scheduling. Today CPSC Tyson Kendon Updates Assignment 1 Assignment 2 Concept Review Scheduling Processes Concepts Algorithms.
Lecturer 5: Process Scheduling Process Scheduling  Criteria & Objectives Types of Scheduling  Long term  Medium term  Short term CPU Scheduling Algorithms.
Lecture 6 The Rest of Scheduling Algorithms and The Beginning of Memory Management.
CMPT 201 Computer Science II for Engineers
bitcurator-access-webtools Quick Start Guide
OpenPBS – Distributed Workload Management System
CPU SCHEDULING.
Chapter 3: Process Concept
Networks and Operating Systems: Exercise Session 2
CPU scheduling 6. Schedulers, CPU Scheduling 6.1. Schedulers
Scheduling (Priority Based)
Chapter 6: CPU Scheduling
זימון תהליכים מדיניות בסיסיות: RR, FCFS, SJF
ICS 143 Principles of Operating Systems
ICS 143 Principles of Operating Systems
ICS 143 Principles of Operating Systems
CPU Scheduling Basic Concepts Scheduling Criteria
Module 5: CPU Scheduling
Operating System Concepts
3: CPU Scheduling Basic Concepts Scheduling Criteria
TDC 311 Process Scheduling.
CSCI 6307 Foundation of Systems – Exercise (3)
Operating systems Process scheduling.
COT 4600 Operating Systems Spring 2011
Chapter 9 Uniprocessor Scheduling
Chapter 6: CPU Scheduling
CPU SCHEDULING.
CPU scheduling decisions may take place when a process:
Programming Project #1 Command Shell
Programming Project #1 Fork and Command Shell
ECE 554 Digital Engineering Laboratory Nam Sung Kim (Chunhua Yao –TA)
bitcurator-access-webtools Quick Start Guide
CPU SCHEDULING SIMULATION
Chapter 6: CPU Scheduling
CSE 542: Operating Systems
Module 5: CPU Scheduling
CPU SCHEDULING CPU SCHEDULING.
Scheduling 21 May 2019.
Chapter 6: CPU Scheduling
Uniprocessor Scheduling
CSE 153 Design of Operating Systems Winter 2019
CS31 Discussion 1H Fall18: week 1
CPU Scheduling.
Module 5: CPU Scheduling
Chapter 5: CPU Scheduling
Presentation transcript:

ICS143a 2017 Programming Assignment Jia Chen May 12, 2017

Schedule Overview Setting up programming environment Part 1. CPU scheduling Part 2. Process synchronization Submission

Overview CPU scheduling Process synchronization First come first serve (10 pts) Shortest job first (15 pts) Priority (15 pts) Round robin (20 pts) Process synchronization Using semaphores 3 tasks (10 pts each) = 30 pts Proper submission (10 pts) Compatible with our grading tool

Setting up unix-like environment Option 1. Installing Ubuntu 14.04 32-bit on VirtualBox (Recommended) A virtual box file with Ubuntu 14.04 32bit + java is provided : https://drive.google.com/file/d/0B20TalzKSiA_eDY1YVd0VG1qdWs/view?usp=sharin g Option 2. Installing Ubuntu directly on your computer Option 3. Using openlab.ics.uci.edu (terminal only) Visit https://www.ics.uci.edu/computing/linux/hosts.php if you are interested Option 4. Mac or cygwin+Windows or MinGW+Windows Note: We will grade on Ubuntu 14.04 32-bit, if you work on Mac or Windows, it is recommended to test your code on Ubuntu before you submit.

Part 1. CPU Scheduling First-come first-served Shortest job first (FCFSSChedulingAlgorithm.java) Shortest job first (SJFSchedulingAlgorithm.java) Single-queue priority (PrioritySchedulingAlgorithm.java) Round Robin (RoundRobinSchedulingAlgorithm.java) Note : Don’t modify other files, or add any new file

Part 1. CPU Scheduling SchedulingAlgorithm.java

Part 1. CPU Scheduling BaseSchedulingAlgorithm.java The method isJobFinished and variable activeJob hlep keeping track of the currently running job and determining whether to preempt it or not BaseSchedulingAlgorithm.java

Part 1. CPU Scheduling Process.java provides all the properties you will need to schedule the CPU

Part 1. CPU Scheduling First-come first-served (FCFSSchedulingAlgorithm.java) (10 pts) If there is a tie, use PID as the tie-breaker Shortest job first (SJFSchedulingAlgorithm.java) (15 pts) Run the job with the shortest remaining time first Single-queue priority (PrioritySchedulingAlgorithm.java) (15 pts) Run the job with the highest priority first Implement the OptionallyPreemptiveSchedulingAlgorithm interface Preempt currently running process only if it is set to be preemptive

Part 1. CPU Scheduling Round Robin (RoundRobinSchedulingAlgorithm.java) (20 pts) Maintain state between each call to getNextJob(int currentTime) Default time quantum is 10, but may use different value for grading Don’t modify the getting/setting methods in skeleton code More details in project description

Part 1. CPU Scheduling Compiling Running a single case simulation Go to directory part1, run make Running a single case simulation

Part 1. CPU Scheduling Running single case simulation Output “wait”, “response”, “turn”

Part 2. Process Synchronization with Semaphores Task 1. Synchro1.java (10 pts) Two processes A, B A is not allowed to start iteration I before B terminates its iteration i-1 Valid: A0, B0, B1, B2, A1, B3, B4, B5, A2, A3, A4, A5 Invalid: A0, B0, B1, B2, A1, A2, A3, A4, B3, B4, B5, A5 Sample test case

Part 2. Process Synchronization with Semaphores Task 2. Synchro2.java (10 pts) Two processes A, B Perform their iterations in lockstep (both iteration 0, then both iteration 1, then so on: a process is not allowed to begin its iteration i before the other terminates its iteration i-1) Valid: A0, B0, B1, A1, B2, A2, A3, B3 Invalid: A0, B0, B1, A1, A2, A3, B2, B3

Part 2. Process Synchronization with Semaphores Task 3. Synchro3.java (10 pts) Three processes A, B, C All processes perform their iteration 0, and then 1, and so on A process is not allowed to begin its iteration i before all the other two processes terminate their iteration i-1 Valid: A0, B0, C0, C1, B1, A1, B2, C2, A2, C3, A3, B3 Invalid: A0, C0, B0, B1, A1, A2, C1, C2, B2, C3, A3, B3

Submission Go to student directory, and run ./submit.sh It creates a submission.zip, rename it to your student ID, e.g. 12345678.zip

Test your submission with provided grader Copy your zip file into directory grader, and run ./run_part1.sh 12345678(your_id).zip and ./grade_part1.sh s_12345678 Note: we will use different set of test cases for grading, so passing all the test cases here doesn’t guarantee you will get full credit.

Test your submission with provided grader Run ./grade_part2.sh s_12345678 Note: we will use different set of test cases for grading, so passing all the test cases here doesn’t guarantee you will get full credit.

Submit to EEE Don’t forget to submit your zip file to EEE, our script will NOT automatically do that for you

Next week -- Midterm Solutions For further questions on Programming Assignment Piazza TA office hour on Thursday