Operating System Scheduling Algorithms

Verified

Added on  2020/03/23

|9
|1788
|344
AI Summary
This assignment delves into the realm of operating system scheduling algorithms. It presents a comparative analysis of four fundamental algorithms: First-Come, First-Served (FCFS), Shortest Job Next (SJN), Shortest Remaining Time (SRT), and Round Robin (RR). For each algorithm, the assignment provides a theoretical explanation, illustrates its operation through a set of job examples, and discusses its strengths and weaknesses. The analysis highlights the impact of different scheduling strategies on system performance metrics such as turnaround time, waiting time, and overall efficiency.
tabler-icon-diamond-filled.svg

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
Running head: OPERATING SYSTEM
Operating System
Name of the Student:
Name of the University:
Author Note
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
1
OPERATING SYSTEM
Answer to question 1
The Tasty Android Oreo OS
Google on a month ago pulled the wraps off the latest edition of its Android mobile OS. Android
8.0 Oreo has various enhancements more than 7.1 Nougat, the past arrival of the OS.
Google has changed Android's notification component, for example, so when an application has
notices pending, a speck shows up in an edge of the program's symbol. Press the spot and a
window will fly up demonstrating the warnings, which can be cleared with a swipe. Moreover,
there's an Instant App highlight for entering new applications straightforwardly from a program
with no interceding strides. There's additionally another Autofill highlight for quicker logins to
administrations and applications. (John, 2017)
Android Oreo doesn't look all that unique in relation to the past adaptation of Android, Android
7.1.2 Nougat, yet you'll see a couple of changes immediately. Most importantly, the status bar is
cleaner. On the Google Pixel particularly, it's currently white with a few symbols moving
underneath the tiles, making it less demanding to tap them. The Settings menu has been updated,
also. Contrasted with Nougat, there are generally a large portion of the quantity of menu choices.
The new Settings screen design may set aside some opportunity to get used to, yet most of the
groupings now bode well. In case you're a devotee of emoticon, you'll like Android Oreo's 50
updated emoticons and bolster the whole list of emoticons in the Emoji 5.0 Unicode standard.
You'll see them in the console, and in applications that help the most up to date Android API
level. Tragically, that means saying farewell to the famous blob emoticon. (Kyle, 2017)
Document Page
2
OPERATING SYSTEM
I've never been as inspired with another Android form as I am with Android Oreo. Indeed, even
the bugs that commonly torment another refresh in the days promptly following its discharge
haven't settled on my trusty Pixel. Not at all like a few, I even figured out how to get past the
engineer sneak peaks with scarcely a hiccup, positively an empowering knowledge for the now-
open form I've been getting a charge out of these previous couple of days. As we said toward the
start, and like its namesake, Oreo especially endeavors to be the OS for everyone. I can without
much of a stretch perceive how an iPhone client could lift it up and keep running with it, simply
as should be obvious Android fans loving all the new propelled highlights and customization
alternatives. (Kris, 2017)
Answer to question 2
a. By applying the best fit algorithm the following results can be obtained:
Job Number Memory Block
Job A Block 3
Job B Cannot be allocated or alternatively has to be
fragmented and allocated in memory block 2
and Block 3
Job C Block 3
Job D Block 1
Document Page
3
OPERATING SYSTEM
b.
By applying the first fit algorithm, the following results can be obtained:
Job Number Memory Block
Job A Block 1
Job B Cannot be allocated or alternatively has to be
fragmented and allocated in memory block 1
and Block 2
Job C Block 3
Job D Cannot be allocated or alternatively has to be
fragmented and allocated in memory block 2
and Block 4
Answer to question 3
Internal Fragmentation happens when the memory is separated into settled measured
squares. At whatever point a procedure ask for the memory, the settled measured piece is
distributed to the procedure. If the memory allocated to the procedure is to some degree bigger
than the memory asked for, at that point the distinction amongst relegated and asked for memory
is the Internal Fragmentation. External Fragmentation happens when there is an adequate
measure of space in the memory to fulfill the memory demand of a procedure. However, the
procedure's memory demand cannot be fulfilled as the memory accessible is in a non-adjoining
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
4
OPERATING SYSTEM
way. It is possible that you apply first-fit or best-fit memory distribution system it will cause
External Fragmentation.
At whatever point a procedure is stacked or expelled from the physical memory square, it makes
a little opening in memory space which is called part. Because of fragmentation, the framework
bombs in designating the bordering memory space to a procedure even though it has the asked
for measure of memory at the same time, in a non-coterminous way. The fragmentation is
additionally ordered into two classes Internal and External Fragmentation. Both the internal and
external classification influences information getting to speed of the framework. They have an
essential contrast between them i.e. Inner fragmentation happens when settled estimated memory
squares are dispensed to the procedure without worried about the extent of the procedure, and
External fracture happens when the procedures are designated memory powerfully. Give us a
chance to move further and talk about the distinctions, reasons, arrangements behind internal and
external with the assistance of examination graph demonstrated as follows.
(http://techdifferences.com/difference-between-internal-and-external-fragmentation.html)
Answer to question 4
a.
number of bytes in the program: 471 bytes.
Page frames: 100 bytes
Hence the number pages required = 471/100 + 1 = 5 pages.
Document Page
5
OPERATING SYSTEM
b.
The first page begins at address 0. The page size is 100, so page 1 (the second page), offset
(displacement) 0 corresponds to address 132. Address 132 would be offset 10 on page 1.
Answer to question 5
a.
Number of page frames = 3
Number of pages = 7
The length of the string = 12
String = {a, c, a, b, a, d, a, c, b, d, e, f}
a a a a a c b d a c b d
c c c c b d a c b d e
b b d a c b d e f
* * * * * * *
Success ratio = 5/12
Failure ratio = 7/12
b.
Number of page frames = 3
Number of pages = 7
Document Page
6
OPERATING SYSTEM
The length of the string = 12
String = {a, c, a, b, a, d, a, c, b, d, e, f}
a a a a a a a a a a c b
c c c c c c c c c b d
b b b b b b b d e
d d d d d e f
* *
Success ratio = 10/12 = 5/6
Failure ratio = 2/12 = 1/6
c. From the above example we can easily conclude that the number of failure is inversely
proportional to the number of page frames or conversely the number of success is directly
proportional to the number page frames.
Answer to question 6
The CPU cycles for the jobs are provided below:
Job A = 12 ms
Job B = 2 ms
Job C = 15 ms
Job D = 7 ms
Job E = 3 ms
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
7
OPERATING SYSTEM
a.
The FCFS technique is being used here and hence the jobs would be processed according to the
order of their entrance into the system. Hence the order in which the jobs would be executed are
Job A, Job B, Job C, Job D, Job E.
The total time for all the jobs will be 12 + 2 + 15 + 7 + 3 = 39ms
The average turnaround time for the jobs are 39/5 = 7.8 ms
b.
The SJN technique is being used here and hence the jobs would be processed according to the
order of their entrance into the system. Hence the order in which the jobs would be executed are
Job B, Job E, Job D, Job A, Job C.
The total time for all the jobs will be 2 + 3 + 7 + 12 + 15 = 39ms
The average turnaround time for the jobs are 39/5 = 7.8 ms
Answer to question 7
Assuming that the time is 5 or all the methods. We can derive this table:
Job Arrival
Time
CPU cycle FCFS SJN SRT RR
A 0 15 Start: 0
Finish: 15
Start: 0
Finish: 15
Start: 0
Finish: 16
Start: 0
Finish: 38
B 2 2 Start: 15
Finish: 17
Start: 16
Finish: 18
Start: 5
Finish: 7
Start: 5
Finish: 7
C 3 14 Start: 17 Start: 28 Start: 26 Start:7
Document Page
8
OPERATING SYSTEM
Finish: 31 Finish: 42
Finish: 42
Finish: 42
D 6 10 Start: 31
Finish: 41
Start: 18
Finish: 28
Start: 16
Finish: 26
Start:12
Finish: 33
E 9 1 Start: 41
Finish:42
Start: 15
Finish: 16
Start: 10
Finish: 11
Start: 17
Finish: 18
chevron_up_icon
1 out of 9
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]