StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

Operating System Simulator - Report Example

Cite this document
Summary
This report "Operating System Simulator" presents the popular java language that has been used in creating this operating system simulator. It can be run either as a Java applet through the browser. The simulator can be run on any system as long as the most current version of the Java runtime…
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER98.6% of users find it useful
Operating System Simulator
Read Text Preview

Extract of sample "Operating System Simulator"

Operating System Simulator - Manual Introduction The popular java language has been used in creating this operatingsystem simulator. It can be run either as a Java applet through the browser, or as a Java application. The simulator can be run on any system as long as the most current version of the Java runtime; in this case, JRE 1.6 is installed. However, it can also support JRE version 1.2. This simulator is written in Java and can be run either as a Java application or as an applet through a browser. It will run on any system with a modern Java runtime environment (at least version 1.2, but 1.6 is preferred). Log files in HTML format such as graphs, tables of data as well as Gantt charts can be produced by the simulator. With the simulator, one can experiment with several process-scheduling algorithms on different processes and make comparisons on statistics such as waiting time and throughput. This simulator supports various algorithms such as Shortest Job First (SJF), First Come First Served (FCFS), and Round Robin (RR). This report however concentrates mostly on the Shortest Job First (SJF) algorithm. This algorithm, SJF (also known shortest remaining CPU burst time first) is where next process to be executed in the schedule queue is the one with the shortest CPU burst time. Normally, there is only one process in the queue with the shortest burst time and is the one that is always taken. However, there are scenarios where more than one process may be in the queue, which have the shortest CPU burst time. In this case, the process that arrived first in the queue is the one that is taken. This project (SJF experiment) is aimed at studying the behavior of the Shortest Job First (SJF) scheduling algorithm through the use of an operating system simulator. Data needs to be carefully prepared in way that is suitable for even the other algorithms. All the data of each run for each given process is collected and run through the simulator. The data is then collected through the simulators log feature is then presented in the form of charts and data, which are also provided by the simulator. Definiton The shortest Job First (SJF) algorithm aims at minimizing the process Turnaround Time (TT). This algorithm is of two types or schemes namely the preemptive and the non-preemptive. The Preemptive Shortest Job First (SJF) is such that, if, or when a job or CPU process arrives and its processing time is less than the time of the remaining current process, it is preempted, meaning it is taken first. Non-Preemptive Shortest Job First algorithm on the other hand is such that, even if a new process or job arrives in the queue and its burst time is less than a process that is currently running, it cannot be taken until that process completes its burst time. It cannot be preempted. Run Implementation Starting the Simulator The simulator can be started from the command prompt in windows by typing runps and executing it, alternatively, the simulator can be started by simply double clicking on the file runps.bat. In the event that the simulator fails to start, ensure that the Java runtime executable are set in the environment variables path. The Java runtime environment (JRE) required is a version higher than the 1.2. For this experiment, the simulation was done in a windows environment, specifically Windows 7 OS. Operating the Simulator – Carrying out the experiment The first steps taken in carrying out the simulation included the creation of a configuration file, which described the basic properties of the simulator. Then an experiment consisting of either one or more experimental runs was created, the simulator was then run on this experiment and the results of the experiment logged. The configuration file contained information concerning where the experiment results will be output and the location of the experiments. The configuration file used for this experiment is listed below, Configuration File: logdir . logfn logfile.doc quiet . imagename gifim user Tahany Fergany portable true run myrun exp myexp On the other hand, an experimental run is made up of a scheduling algorithm, and the processes that would be run under that algorithm. In this case, there was only an experimental run that consisted of the Shortest Job First scheduling algorithm and a number of processes that were to be run under it. Input information is very well organized by the simulator in such a way that, the experiments can be done in a simple way by varying one or more parameters. To perform the experiments, I had to create two files, the run file which contained information about the variables for the first run, and the experiment file that contained a list of a number of runs that were to be made and the parameter that were to be varied between the runs. Once the experiment has been completed, several graphs or tables illustrating various statistics such as the throughput and average waiting time are produced. This information is all stored in a log file. The figure below (Fig. 1.) shows the simulators main window after startup. Number of Run Files: 1 -------------------- name myrun comment This is a sample experimental run file algorithm FCFS numprocs 8 firstarrival 2.0 interarrival constant 4.0 duration uniform 8.0 14.0 cpuburst constant 10.0 ioburst constant 6.0 basepriority 6.0 Number of Experiment Files: 1 -------------------- name myexp comment This experiment contains 1 run run myrun algorithm SJF key "Shortest Job First" Results Obtained throughout the run Experimental Run Information for 1 Run myrun:    This is a sample experimental run file    Seed: 0   Algorithm: FCFS Group Processes First Arrival Interarrival Duration CPU Burst I/O Burst 1 8 2.0 constant 4.00 uniform 8.00 14.00 constant 10.00 constant 6.00 Experimental Runs For 1 Experiment Experiment Commentary Run Modifications myexp This experiment contains 1 run myrun_1 algorithm SJF key Shortest Job First Starting run from experiment myexp Fri Feb 17 03:12:52 EST 2012 Starting run from myrun_1 Starting to run events using SJF 40 events done in 17 milliseconds History List at Time 92.48 Configuration entries read: 8 Local Configuration file: psconfig  User:             Tahany Fergany  Log directory:    .  Log file:         logfile.doc  Image name:       gifim  Runs read:        1 of 1  Experiments read: 1 of 1  Repeatable random numbers Fri Feb 17 03:12:54 EST 2012 Event list size is 0 at 92.48 Fri Feb 17 03:12:55 EST 2012 Number of new processes 0 at time 92.48 Fri Feb 17 03:12:56 EST 2012 Number of waiting processes 0 at time 92.48 Fri Feb 17 03:12:58 EST 2012 Number of processes 8 at time 92.48  ID   State   Started   Finished In CPU     Used    Total  Waiting   1   done       2.00      23.96      2    12.44    12.44       3.52   2   done       6.00      66.01      2    13.62    13.62      40.39   3   done      10.00      21.52      1     9.52     9.52       2.00   4   done      14.00      33.10      1     9.14     9.14       9.96   5   done      18.00      76.43      2    10.42    10.42      42.01   6   done      22.00      86.53      2    10.10    10.10      48.43   7   done      26.00      92.48      2    10.05    10.05      50.43   8   done      30.00      42.39      1     9.29     9.29       3.10 Fri Feb 17 03:12:59 EST 2012 Number of ready processes 0 at time 92.48 Fri Feb 17 03:13:00 EST 2012 Number of finished processes 8 at time 92.48  ID      Started   Finished  CPU Total    3       10.00      21.52       9.52    1        2.00      23.96      12.44    4       14.00      33.10       9.14    8       30.00      42.39       9.29    2        6.00      66.01      13.62    5       18.00      76.43      10.42    6       22.00      86.53      10.10    7       26.00      92.48      10.05 Fri Feb 17 03:13:02 EST 2012 proc  time in time out   time reason     idle    1     2.00    12.00  10.00 io          2.00    3    12.00    21.52   9.52 terminate           1    21.52    23.96   2.44 terminate           4    23.96    33.10   9.14 terminate           8    33.10    42.39   9.29 terminate           2    42.39    52.39  10.00 io                  5    52.39    62.39  10.00 io                  2    62.39    66.01   3.62 terminate           6    66.01    76.01  10.00 io                  5    76.01    76.43    .42 terminate           7    76.43    86.43  10.00 io                  6    86.43    86.53    .10 terminate           7    92.43    92.48    .05 terminate   5.90 Number of runs: 1 Shortest Job First    Times CPU Entered:         13    Times Ready Queue Entered: 13    Times I/O Started:         5 Fri Feb 17 03:13:10 EST 2012 Information on Process 1    State: done       Arrival Time:              2.00    Completion Time:          23.96    Times In CPU:            2    CPU Time Total:           12.44    CPU Burst Projected:       5.00    CPU Burst Total:           2.44    CPU Burst Remaining:       2.44    Times Waiting For IO:    1    IO Burst Time:             6.00    CPU Time Used:            12.44    Total Ready Wait Time:     3.52    Total Ready and CPU:      15.96    Fraction Waiting:        .77961    Total IO Wait Time:        6.00    Total Time in System:     21.96 Fri Feb 17 03:13:18 EST 2012 Bursts of Process 1 at time 92.48      CPU Burst     IO Burst    1.    10.00         6.00    2.     2.44 Event List at Time 92.48 Process Scheduling Simulator version 1.100L288 by S. Robbins  supported by NSF grants  DUE-9750953 and DUE-9752165. Last update: February 1, 2007 Color Depth: 24 Java Version: 1.6.0_17 OS: Windows 7 version 6.1 Log File Opened File name: logfile.doc Starting run from experiment myexp  Experimental Run for myrun   40 events done in 17 milliseconds Fri Feb 17 03:13:55 EST 2012 Bins: 29 Min: 0.00 Max: 50.00 Overflow: 1 Waiting Time This is a histogram containing information concerning the waiting time for each of the process run. For each process run, the total waiting time is displayed and shown as a bar graph. This graph shows the amount of time spent by each process in the waiting queue. For instance, from the Waiting Time graph, we can see that the maximum waiting time is 50.43 whereas the minimum waiting time is 2.0. We are thus able to deduce the average waiting time for a process in the queue as being 24.98. This algorithm minimizes the amount of time it takes for each process to wait for its turn to execute. However, it maximizes the throughput of every process that executes using it. (The number of the processes that execute to the completion time in the shortest or given amount of time is quite considerable; as a matter of fact, the number is high. In this graph we can see that the number of processes is 4 in a time period indicated by the graph). Fri Feb 17 03:14:41 EST 2012 Bins: 30 Min: 0.00 Max: .90 Ratio of CPU Time to Ready Time Plus CPU Time This histogram indicates the ratio of the CPU time to that of the Ready Time plus CPU time. The times are almost the same as indicated by the histogram; bar graph. The waiting time does not affect the time the CPU takes to be ready. As a result of this fact; since the processes are non-preemptive. Therefore, this is the reason why the time it takes for the CPU to be ready and the time it starts taking the next process to put through the processing process is the same. This is the same for all the processes. The shortest process in terms of its time will go into the queue without any problem of interference from the other processes that may come in once one process is in the queue. This is the advantage of non-preemptive processes. It saves from the headache of managing the time for preemptive processes. Fri Feb 17 03:15:40 EST 2012 Bins: 20 Min: 10.00 Max: 70.00 Turnaround Time The turnaround time is the time it takes for a given process to be executed to produce an output, from the time it was submitted. The output must be complete for the period to be considered as the true throughput of the processes. Usually, this times various depending on the programming language that was used to write the software or, program being simulated or getting tested. It is using this turnaround time that we are able to evaluate how the scheduling algorithm of an operating system actually works. From the graph, we can say that the turnaround times for both of the processes are almost similar. They take the same amount of time. Fri Feb 17 03:16:07 EST 2012 Bins: 20 Min: 0.00 Max: 10.00 Overflow: 5 CPU Burst Times CPU burst is the amount of time that a process uses a processor of a computer, before the processor actually becomes unavailable. There are different times of burst. First, there are the long bursts, and the second bursts are short bursts. Fri Feb 17 03:17:06 EST 2012 Gantt Chart for Shortest Job First The Gantt chart indicates how the processor processes the SJF jobs in succession and smooth way. It indicates the different states of a process once it is in the processing queue. For, instance, when process one arrives in the queue it is taken up for processing and runs for some time until it goes on to a waiting state. This is when another process arrives in the queue, which has a shorter CPU burst time than the time remaining to complete process one. In this case, when process three which has a shorter burst time than the time remaining for the completion of process one, it is taken up for processing and process one goes into the waiting state. This is known as preemptive shortest job first. This is indicated in the Gantt chart above with three different color shades where red signifies the running state, green the ready state, and blue the waiting state. From this Gantt chart, we can be able to determine the total waiting time and the average turnaround time. Event List at Time 92.48 Process Scheduling Simulator version 1.100L288 by S. Robbins  supported by NSF grants  DUE-9750953 and DUE-9752165. Last update: February 1, 2007 Color Depth: 24 Java Version: 1.6.0_17 OS: Windows 7 version 6.1 Log File Opened File name: logfile.doc Starting run from experiment myexp  Experimental Run for myrun   40 events done in 17 milliseconds Saving image gifim01.gif ...  done Saving image gifim02.gif ...  done Saving image gifim03.gif ...  done Saving image gifim04.gif ...  done Saving image gifim05.gif ...  done Saving image gifim06.gif ...  done Saving image gifim07.gif ...  done Saving image gifim08.gif ...  done History List at Time 92.48 Configuration entries read: 8 Local Configuration file: psconfig  User:             Tahany Fergany  Log directory:    .  Log file:         logfile.doc  Image name:       gifim  Runs read:        1 of 1  Experiments read: 1 of 1  Repeatable random numbers Fri Feb 17 03:12:54 EST 2012 Event list size is 0 at 92.48 Fri Feb 17 03:12:55 EST 2012 Number of new processes 0 at time 92.48 Fri Feb 17 03:12:56 EST 2012 Number of waiting processes 0 at time 92.48 Fri Feb 17 03:12:58 EST 2012 Number of processes 8 at time 92.48  ID   State   Started   Finished In CPU     Used    Total  Waiting   1   done       2.00      23.96      2    12.44    12.44       3.52   2   done       6.00      66.01      2    13.62    13.62      40.39   3   done      10.00      21.52      1     9.52     9.52       2.00   4   done      14.00      33.10      1     9.14     9.14       9.96   5   done      18.00      76.43      2    10.42    10.42      42.01   6   done      22.00      86.53      2    10.10    10.10      48.43   7   done      26.00      92.48      2    10.05    10.05      50.43   8   done      30.00      42.39      1     9.29     9.29       3.10 Fri Feb 17 03:12:59 EST 2012 Number of ready processes 0 at time 92.48 Fri Feb 17 03:13:00 EST 2012 Number of finished processes 8 at time 92.48  ID      Started   Finished  CPU Total    3       10.00      21.52       9.52    1        2.00      23.96      12.44    4       14.00      33.10       9.14    8       30.00      42.39       9.29    2        6.00      66.01      13.62    5       18.00      76.43      10.42    6       22.00      86.53      10.10    7       26.00      92.48      10.05 Fri Feb 17 03:13:02 EST 2012 proc  time in time out   time reason     idle    1     2.00    12.00  10.00 io          2.00    3    12.00    21.52   9.52 terminate           1    21.52    23.96   2.44 terminate           4    23.96    33.10   9.14 terminate           8    33.10    42.39   9.29 terminate           2    42.39    52.39  10.00 io                  5    52.39    62.39  10.00 io                  2    62.39    66.01   3.62 terminate           6    66.01    76.01  10.00 io                  5    76.01    76.43    .42 terminate           7    76.43    86.43  10.00 io                  6    86.43    86.53    .10 terminate           7    92.43    92.48    .05 terminate   5.90 Number of runs: 1 Shortest Job First    Times CPU Entered:         13    Times Ready Queue Entered: 13    Times I/O Started:         5 Fri Feb 17 03:13:10 EST 2012 Information on Process 1    State: done       Arrival Time:              2.00    Completion Time:          23.96    Times In CPU:            2    CPU Time Total:           12.44    CPU Burst Projected:       5.00    CPU Burst Total:           2.44    CPU Burst Remaining:       2.44    Times Waiting For IO:    1    IO Burst Time:             6.00    CPU Time Used:            12.44    Total Ready Wait Time:     3.52    Total Ready and CPU:      15.96    Fraction Waiting:        .77961    Total IO Wait Time:        6.00    Total Time in System:     21.96 Fri Feb 17 03:13:18 EST 2012 Bursts of Process 1 at time 92.48      CPU Burst     IO Burst    1.    10.00         6.00    2.     2.44 Configuration File: logdir .  logfn logfile.doc  quiet .  imagename gifim  user Tahany Fergany  portable true  run myrun  exp myexp-------------------- Works Cited Bhatt, Pramod CP. An Introduction to Operating Systems: Concepts and Practice. PHI Learning Pvt. Ltd., 2004. Print. Garrido, José M. Performance modeling of operating systems using object-oriented simulation: a practical introduction. Springer, 2000. Print. Garrido, José M. and Schlesinger, Richard. Principles of modern operating systems. Jones & Bartlett Learning, 2008. Print. McHoes, Ann M, Flynn, Ida M. Understanding Operating Systems. New York: Cengage Learning, 2010. Print. Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(Operating System Simulator Report Example | Topics and Well Written Essays - 2750 words, n.d.)
Operating System Simulator Report Example | Topics and Well Written Essays - 2750 words. https://studentshare.org/information-technology/1766850-the-simulator-manual
(Operating System Simulator Report Example | Topics and Well Written Essays - 2750 Words)
Operating System Simulator Report Example | Topics and Well Written Essays - 2750 Words. https://studentshare.org/information-technology/1766850-the-simulator-manual.
“Operating System Simulator Report Example | Topics and Well Written Essays - 2750 Words”. https://studentshare.org/information-technology/1766850-the-simulator-manual.
  • Cited: 0 times

CHECK THESE SAMPLES OF Operating System Simulator

How C++ input/output library classes, functions , and streams are related to inheritance

The stream class has a number of derived classes that give a broad overview of diverse kind of input and output, and also facilitates the developer/programmer to isolate them from the operating system and the underlying devices.... Manipulating Text Files Through the Use of Streams" Please respond to the following: Discuss how the C++ input / output library classes, functions, and streams are related to inheritance....
3 Pages (750 words) Assignment

Typology of Simulation Fidelity

Aviation has developed swiftly in terms of difficulty for the last few decades.... On the other hand, there is just a little observable over aviation education process itself.... Provided the complexity and uniqueness associated with aviation education particularly flight training, aviation education necessitates a different model as compared to models used for the education of young people....
6 Pages (1500 words) Essay

Issue of Regional Floods

They can be simulated directly by the central nervous system.... The autonomous nervous system generates signals that control the movement of these muscles, which are rhythmic and automatically controlled.... This muscle has an interesting mode of simulation, that is via the special pacemaker cells, located in the sinoatrial node (SA node), in the central nervous system....
1 Pages (250 words) Coursework

Benefits of Using Simulation within Appropriate Manufacturing Organizations

It involves the creation of a simulated history of a system whereby the study of that simulated system is used in making observations concerning the operating attributes of the real world… Computer simulation has been in use for decades and it has been essential in solving a number of business issues (Heilala 1999, p.... Manufacturing systems involves several The process design of a manufacturing system is critical and may need minimal errors for proper execution....
5 Pages (1250 words) Essay

Matlab Simulation for the DiPPM with RS system

Although there was a Matlab simulation for the DiPPM system [ ], a new version of DiPPM (coder & decoder) simulation… In the second version, the RS system was employed with the DiPPM system in order to prevent the errors, which affect the system.... In the third version, a PCM binary sequence was replaced by a picture's data in order to analyze the The Matlab software was used to simulate the DiPPM system (Appendix-?...
8 Pages (2000 words) Essay

The Important of Simulations

2-In the case of any decision making type, the makers of the decisions will have to understand, plan, analyse as well as manage the system.... With the absence of a model, makers of decisions would make use of various processes for information gathering from a system that is real, process it and finally select an action which creates some change within the system.... In general, model based decision making as well as simulation based decision making particularly do offer decision makers a way of investigating the system's representation, use alternatives to experiment and then predict the proposed changes effects, that are external to the system....
2 Pages (500 words) Assignment

Arena Simulation Software

nbsp; Arena simulation software could be used to demonstrate, measure, and predict system strategies for effective, efficient and optimized performance.... Arena allows the modelling of complex and messy situations; uncertain scenarios; system variability and model validity.... Applications of Arena include manufacturing; scheduling and inventory; staffing and personal-service operations such as banks, fast food, theme parks; distribution and logistics; health care; emergency and operating rooms; computer systems; telecommunications; military; and public policy....
12 Pages (3000 words) Case Study

System Design and Operation

This paper focuses on system design and operation.... The author makes calculations in system design line balancing.... In a system design, a line usually includes multiple workstations that have varied work contents.... he above calculations indicate that the selected output for the system's line is within the range of 240 and 600 units per day.... minutes of their individual operations consecutively and operating 15 hours a day that translates to 1080 minutes a day....
5 Pages (1250 words) Term Paper
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us