Transcribed TextTranscribed Text

For this part of Lab #1, you will use an Operating Systems simulator, OS Sim (ossim). Obtain OS Sim, and unzip it to your machine. To run OS Sim, simply double-click on the ossim.j jar file. Java will launch the simulator. To learn how to use OS Sim, press F1 and read the help. Process Scheduling Run the examples OS Sim provides several different examples of process scheduling algorithms. You are to first run each of those examples to confirm your understanding of how each scheduling algorithm works and to understand the differences among them. Below is a chart summarizing each of the scheduling algorithm examples, and the parametric differences among them: Process Scheduling algorithm Parameter P1 P2 P3 P4 P5 CPU 5 4 7 3 -- Burst IO -- -- -- -- -- Simple FIFO Scheduling CPU -- -- -- -- -- Priority -- -- -- -- -- Submit time o O O o O CPU 5 4 7 3 2 Burst IO -- -- -- -- -- Non-preemptive Shortest Job First (SJF) CPU -- -- -- -- -- Priority -- -- -- -- -- Submit time o O O O 4 CPU 5 4 7 3 2 Burst IO -- -- -- -- -- Pre-emptive priority scheduling CPU -- -- -- -- -- Priority 4 1 9 1 10 Submit time O o O o 2 CPU 5 4 7 3 -- Burst IO -- -- -- -- -- Round-robir scheduling CPU -- -- -- -- -- Priority -- -- -- -- -- Submit time O O O O o CPU 2 4 3 3 -- Burst IO 2 -- 2 -- -- Multi-programming scheduling with I/O CPU 1 -- 2 -- -- Priority -- -- -- -- -- Submit time O o O o o CPU 2 4 3 3 -- Burst IO 2 -- 2 -- -- Mono-programming scheduling with I/O CPU 1 -- 2 -- -- Priority -- -- -- -- -- Submit time O o o o o Begin by running each of the examples. You can step through the simulation one-step-at-a-time, and/or you can run the simulation to completion. At any time, you can bring up the "Data and statistics" window which shows the overall process scheduling statistics (e.g., efficiency, throughput, average turnaround time, average waiting time, etc.) and also information about each of the processes. a. Table - For each example schedule algorithm (i.e., scenario), produce a table that shows the overall processing at simulation time = 10 units, and also at the completion of the entire simulation. b. Your analysis and commentary - Explain precisely what is happening, and why the values are what they are, both at simulation time = 10 units, and also at the completion of the simulation. Explain the differences - why / how does the specific algorithm used effect the values? C. Summary table - produce table(s) that show the overall process scheduling statistics, again at the simulation time = 10 units, and separately at the simulation completion. d. Your summary analysis and commentary - from the tables you create in (c), you should be able to see differences among the scheduling algorithms (given the parameters of the scenarios that were simulated). For example, you should be able to compare the efficiency and utilization among all six scenarios. Comment (in detail) on the difference that you see. Which scenarios do "better" and when? Why? Explain the better / worse utilization, turnaround and wait times, etc. among the different scenarios. Create your own simulation In the book, you learn about different scheduling algorithms. For example, Batch System often employ first-come, first-served (FCFS) and/or Shortest Job First (SJF), while Interactive Systems might use Round-Robin Scheduling and/or priority scheduling. So, which scheduling algorithm is best? To further think about scheduling algorithms, you will complete simulation runs that use OS Sim to compare: FCFS, SJF, round-robin, and priority scheduling. You will need to decide if/when preemptive algorithms should be used, as well as multi-programming vs. mono-programming. Process that need to be scheduled need to be a mix of batch processes and user-interactive processes: Batch processes are typically longer running, although lengths may vary. Below is a table that provides guidance on the different types of processes and their parameters Burst Process Type Count Submit time Total CPU I/O CPU Batch (short) 10 5-15 10-30% 0-10 Batch (long) 5 10-40 10-30% 15-25 Interactive 5 10-40 5-15% 0-5 From the table, the first line tells us that there are 10 short-length batch processes. Each has a (randomly selected total burst length) of 5-15 total units. Where it matters, the bursts are broken up into three separate segments, CPU-I/0-CPU, where the (center) I/O segment should take up 10-30% of the total burst time (and the remaining portions should be distributed to the first and last "CPU" burst segments. You should create a set of processes with random burst lengths and distributions that follow this guidance. For example, your first process (let's call it B-short1) might be 8 total units, with an I/O burst of length = 2, with the remaining 6 units spread out so that there are 4 units in the first CPU segment and 2 in the final one, thus distributing the total burst into CPU-I/O-CPU=4-2-2 Additionally, each process has a random submit time (in the range 0-10 for the Batch-Short example). All processes, either batch or interactive, should be assume to regenerate once they complete. That is, once process "A" finished the first time, a new instance will commence (after the required submit time / delay). Let us assume that all batch process have higher priority than interactive processes, and that longer processes have higher priority than shorter ones. Assign a random priority number to each of your processes, using the following guidance Process Type Range of priorities Batch-short 4-6 Batch-long 7-8 Interactive 1-3 For example, each of the 10 Batch-short processes will have a priority (that you should choose randomly) in {4, 5, 6}. Several processes will have the same priority as one another (but different burst length and submit times). a. Create and describe your simulation scenario (enumerate the processes and their parameters), run the simulation(s), and give your results, which should include tables and commentary. Which scheduling algorithm performs best? Why (be detailed, and precise)? b. Suppose instead your system treats interactive process as the highest priority. Repeat the experiment such that Interactive process that priorities in the range of 10-15. Which algorithm performs best? Why? C. Summarize what you are able to conclude about the different scheduling algorithms.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

    By purchasing this solution you'll be able to access the following files: and Solution.docx.

    for this solution

    or FREE if you
    register a new account!

    PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

    Find A Tutor

    View available Operating Systems Tutors

    Get College Homework Help.

    Are you sure you don't want to upload any files?

    Fast tutor response requires as much info as possible.

    Upload a file
    Continue without uploading

    We couldn't find that subject.
    Please select the best match from the list below.

    We'll send you an email right away. If it's not in your inbox, check your spam folder.

    • 1
    • 2
    • 3
    Live Chats