Playgrounds
Snippets
Developers
Compiler
All
ActionScript
Ajax
AngularJS
Apache
AppleScript
ASP.NET
Bash
C
C#
C++
Coffee
CoffeeScript
ColdFusion
Command
CSS
Delphi
Django
ES6
GLSL
Grunt
Gulp
HAML
Haskell
HTML
iOS
Jade
Java
JavaScript
jQuery
JSX
Less
LUA
MDX
MySQL
Objective
Other
Pascal
Perl
PHP
Plain text
PowerShell
Processing
Progress
Prolog
Pseudocode
Python
Rails
RegExr
Ruby
SASS
Scala
Scheme
SCSS
SmallBASIC
Smarty
SQL
Stylus
SVG
Swift
TypeScript
VHDL
X++
XHTML
XML
Xojo
XSLT
New snippet
New playground
Sign up
Login
Upload
Playgrounds
Snippets
Developers
Sign up
Login
shortest job first scheduling non-preemptive| Code
C
by
niawjunior
18th July 2016
1
2
#include
<stdio.h>
int
main
(
)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2 Responses
This code was Excellent because of this I understand how SJF in a non-primitive way works.
0
Reply?
Nikhil Kumar
7 years ago
how can the waiting time be negative
Enter the Number of processes : 4
Enter The Arrival Time Of Process 1 : 5
Enter The Burst Time Of Process1 : 10
Enter The Arrival Time Of Process 2 : 3
Enter The Burst Time Of Process2 : 6
Enter The Arrival Time Of Process 3 : 6
Enter The Burst Time Of Process3 : 12
Enter The Arrival Time Of Process 4 : 0
Enter The Burst Time Of Process4 : 0
Process Name Burst Time Arrival Time Waiting Time Turn Around Time
p4 0 0 0 0
p2 6 3 -3 3
p1 10 5 1 11
p3 12 6 10 22
AVERAGE WAITING TIME : 2.00
AVERAGE TURN AROUND TIME : 9.00
GANTT CHART
P4P2 P1 P3
00---3-----------11----------------------22
--------------------------------
0
Reply?
S
Subhankar
4 years ago
Write a comment
Send Comment
You can use [html][/html], [css][/css], [php][/php] and
more
to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.
2 Responses
Enter the Number of processes : 4
Enter The Arrival Time Of Process 1 : 5
Enter The Burst Time Of Process1 : 10
Enter The Arrival Time Of Process 2 : 3
Enter The Burst Time Of Process2 : 6
Enter The Arrival Time Of Process 3 : 6
Enter The Burst Time Of Process3 : 12
Enter The Arrival Time Of Process 4 : 0
Enter The Burst Time Of Process4 : 0
Process Name Burst Time Arrival Time Waiting Time Turn Around Time
p4 0 0 0 0
p2 6 3 -3 3
p1 10 5 1 11
p3 12 6 10 22
AVERAGE WAITING TIME : 2.00
AVERAGE TURN AROUND TIME : 9.00
GANTT CHART
P4P2 P1 P3
00---3-----------11----------------------22
--------------------------------
Write a comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.