1. (10 points) Suppose you have tasks P, P2, Ps. P arrive in order at times 0,0,
ID: 3887841 • Letter: 1
Question
1. (10 points) Suppose you have tasks P, P2, Ps. P arrive in order at times 0,0,1,2 and lengths 4,3,2,1 respectively. Assume non-premptive scheduling. (a) Draw the timeline of tasks using: FCFS (b) Draw the timeline of tasks using: SJF (c) Can you think of a potential problem that might occur while applying SJF in your day to day tasks or activities?Explanation / Answer
>>> s = 'Hello, world.' >>> str(s) 'Hello, world.' >>> repr(s) "'Hello, world.'" >>> str(1.0/7.0) '0.142857142857' >>> repr(1.0/7.0) '0.14285714285714285' >>> x = 10 * 3.25 >>> y = 200 * 200 >>> s = 'The value of x is ' + repr(x) + ', and y is ' + repr(y) + '...' >>> print(s) The value of x is 32.5, and y is 40000... >>> # The repr() of a string adds string quotes and backslashes: ... hello = 'hello, world ' >>> hellos = repr(hello) >>> print(hellos) 'hello, world ' >>> # The argument to repr() may be any Python object: ... repr((x, y, ('spam', 'eggs'))) "(32.5, 40000, ('spam', 'eggs'))">>> s = 'Hello, world.' >>> str(s) 'Hello, world.' >>> repr(s) "'Hello, world.'" >>> str(1.0/7.0) '0.142857142857' >>> repr(1.0/7.0) '0.14285714285714285' >>> x = 10 * 3.25 >>> y = 200 * 200 >>> s = 'The value of x is ' + repr(x) + ', and y is ' + repr(y) + '...' >>> print(s) The value of x is 32.5, and y is 40000... >>> # The repr() of a string adds string quotes and backslashes: ... hello = 'hello, world ' >>> hellos = repr(hello) >>> print(hellos) 'hello, world ' >>> # The argument to repr() may be any Python object: ... repr((x, y, ('spam', 'eggs'))) "(32.5, 40000, ('spam', 'eggs'))"
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.