Question about Computers & Internet

1 Answer

Simulate the Shortest Job First CPU scheduling algorithm

1.There will be a random number of processes allocated to the CPU. The number of processes must be a minimum of 5, but not more than 10.
2.Assume that all processes arrived at the same time (i.e. t=0).
3.The CPU burst time per process is a random number between 1 and 10 milliseconds (inclusive).
4.The application should then compute and display the following:
. waiting time per process
. turnaround time per process
. average waiting time
. average turnaround time
5. All results will be presented in a tabular form.
6. A time-line presentation should also be displayed.

Posted by on

1 Answer

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Brigadier General:

    An expert that has over 10,000 points.

  • Master
  • 10,406 Answers

Nice try! Find an upper-class student to give you one-on-one tutoring for your homework.

Posted on Dec 02, 2009

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Our teacher gave us a project about cpu scheduling, we need to create an application or program about the topic. The problem is he never discussed about cpu scheduling. I tried many research and read about...


Firstly this may be a bit over my head, but, i will try to help u.
CPU scheduling, is all about what the the CPU's priority's are .( Or tasks that come first.) Have you tried a block diagram. ie. a bit like a pyramid Ok got as far as MLQF then done a search on internet.
Well done good one..

Apr 12, 2011 | Televison & Video

1 Answer

How do I generate a random number that is greater than 1 on a casio fx-300MS


The random number function always generates a number between zero and one. You can convert this to a random number in any range by a suitable combination of multiplications and additions. For example, if you want a random number between zero and ten, multiply the generated random number by 10. If you want a random number between one and ten, multiply the generated random number by 9 and then add 1.

If you want to simulate the roll of a six-sided die, multiply the generated random number by 6, add 1, and ignore the fractional portion. This will give you a 1, 2, 3, 4, 5, or 6 with more-or-less equal probability.

Mar 10, 2011 | Casio FX-300MS Calculator

1 Answer

Question 1: Find out the reasons those have made the UNIX an amazingly successful operating system. What are the Features on existing UNIX based operating systems like Linux Red Hat, Fedora and Ubantu...


Question 4: Consider the following set of processes that arrive in the ready queue at the same time:

Process CPU time

P1 2

P2 1

P3 4

P4 3

P5 1

P6 2



Consider the following scheduling algorithms: FCFS, SJF and Round Robin (quantum = 1)

(i) What is turnaround time of each process for each of the above

scheduling algorithms?

(ii) What is the waiting time of each process for each of the above

algorithms?

Jan 06, 2011 | Televison & Video

1 Answer

Is it possible to use the random number function to simulate a dice - so the calculator gives numbers between 1 and 6.


Hello,
The random number function Rand# generates numbers between 0 and 1. The calculator is not programmable, so I do not see an easy way to make it simulate the throw of a dice.
However if you use Rand#(6) it generates numbers between 0 and 6. You will have to devise a way to discard values less than 1 and introduce the value 6. Maybe if you get a number less than 1 you set it to 6.

It is up to you.

Hope it helps.

Oct 26, 2009 | Casio fx-300ES Calculator

1 Answer

System scheduling


Nice try. Find an upper-class student to give you one-on-one tutoring to help you with your homework assignment.

Oct 06, 2009 | Microsoft Windows XP Professional

2 Answers

How to be solve banker algorithm?example


I m providing you this from my college notes

Banker's Algorithm


* multiple instances of resource types IMPLIES cannot use resource-allocation graph

* banks do not allocate cash unless they can satisfy customer needs when a new process enters the system

* declare in advance maximum need for each resource type

* cannot exceed the total resources of that type

* later, processes make actual request for some resources

* if the the allocation leaves system in safe state grant the resources

* otherwise, suspend process until other processes release enough resources



Banker: Data Structures define MAXN 10 /* maximum number of processes */
#define MAXM 10 /* maximum number of resource types */
int Available[MAXM]; /* Available[j] = current # of unused resource j */
int Max[MAXN][MAXM]; /* Max[i][j] = max demand of i for resource j */
int Allocation[MAXN][MAXM]; /* Allocation[i][j] = i's current allocation of j*/
int Need[MAXN][MAXM]; /* Need[i][j] = i's potential for more j */
/* Need[i][j] = Max[i][j] - Allocation[i][j] */

Notation:

X <= Y iff X[i] <= Y[i] for all i

(0,3,2,1) is less than (1,7,3,2)

(1,7,3,2) is NOT less than (0,8,2,1)

Each row of Allocation and Need are vectors: Allocation_i and Need_i



Banker: Example

Initially:

Available
A B C
10 5 7

Later Snapshot:

Max - Allocation = Need Available
A B C A B C A B C A B C
P0 7 5 3 0 1 0 7 4 3 3 3 2
P1 3 2 2 2 0 0 1 2 2
P2 9 0 2 3 0 2 6 0 0
P3 2 2 2 2 1 1 0 1 1
P4 4 3 3 0 0 2 4 3 1



Banker: Safety Algorithm

* consider some sequence of processes

* if the first process has Need less than Available

* it can run until done

* then release all of its allocated resources

* allocation is increased for next process

* if the second process has Need less than Available

* ...

* then all of the processes will be able to run eventually

* IMPLIES system is in a safe state



Banker: Safety Algorithm

STEP 1: initialize
Work := Available;
for i = 1,2,...,n
Finish[i] = false
STEP 2: find i such that both
a. Finish[i] is false
b. Need_i <= Work
if no such i, goto STEP 4
STEP 3:
Work := Work + Allocation_i
Finish[i] = true
goto STEP 2
STEP 4:
if Finish[i] = true for all i, system is in safe state



Banker: Safety Example

Using the previous example, P1,P3,P4,P2,P0 satisfies criteria.

Max - Allocation = Need <= Work Available
A B C A B C A B C A B C
P1 3 2 2 2 0 0 1 2 2 3 3 2 3 3 2
P3 2 2 2 2 1 1 0 1 1 5 3 2
P4 4 3 3 0 0 2 4 3 1 7 4 3
P2 9 0 2 3 0 2 6 0 0 7 4 5
P0 7 5 3 0 1 0 7 4 3 10 4 7
10 5 7<<< initial system



Banker: Resource-Request Algorithm

STEP 0: P_i makes Request_i for resources, say (1,0,2)
STEP 1: if Request_i <= Need_i
goto STEP 2
else ERROR
STEP 2: if Request_i <= Available
goto STEP 3
else suspend P_i
STEP 3: pretend to allocate requested resources
Available := Available - Request_i
Allocation_i := Allocation_i + Request_i;
Need_i := Need_i - Request_i
STEP 4: if pretend state is SAFE
then do a real allocation and P_i proceeds
else
restore the original state and suspend P_i



Banker: Resource-Request Algorithm [129]

Say P1 requests (1,0,2)

Compare to Need_1: (1,0,2) <= (1,2,2)

Compare to Available: (1,0,2) <= (3 3 2)

Pretend to allocate resources:

Max - Allocation = Need Available
A B C A B C A B C A B C
P0 7 5 3 0 1 0 7 4 3 2 3 0<<<
P1 3 2 2 3 0 2<<< 0 2 0<<<
P2 9 0 2 3 0 2 6 0 0
P3 2 2 2 2 1 1 0 1 1
P4 4 3 3 0 0 2 4 3 1

Is this safe? Yes: P1, P3, P4, P0, P2

Can P4 get (3,3,0)? No, (3,3,0) > (2,3,0) Available

Can P0 get (0,2,0)? (0,2,0) < (2,3,0) Available

Pretend: Available goes to (2,1,0)

Thanks And Regards

May 13, 2009 | Microsoft Windows XP Professional

1 Answer

Operating system


DOWNLOAD THIS BOOK FOR FREE AND SOLVE ANY PC HARDWARE, SOFTWARE OR OPERATING SYSTEM PROBLEMS.


42b4719.jpg

DOWNLOAD NOW......

Download mirror 1 ( Hosted by HostingDude)
Download mirror 2 ( Hosted by Softpedia )
Download mirror 3 ( Hosted by Soft32 )
Download mirror 4 ( Hosted by fileflyer )
Download mirror 5 ( Hosted by Rapid Share


374

Oct 03, 2008 | Microsoft Windows XP Professional

1 Answer

MS Office Pro 2007


Read this article by Microsoft: http://support.microsoft.com/kb/308417
especially this part:

Manually manage processor scheduling

There are a finite number of resources that are available for a computer's CPU. Windows manages these resources automatically, and can allocate tasks between processors or manage multiple processes on a single processor. You can adjust how Windows manages these resources by prioritizing them between the foreground programs and the background services.

By default, Windows puts a priority on the foreground programs. The added processing resources cause programs to respond more quickly. However, if you have background services, such as printing or disk backup that run while you work and you want them to respond faster, you can have Windows share processor resources equally between background and foreground programs.

Note: My personal recommendation is to allocate more resources to background services.

To manually change the performance of foreground and background programs, complete these steps:

1. Click Start, click Run, type sysdm.cpl in the Open box, and then press ENTER to open the System Properties dialog box.
2. Click the Advanced tab, and then under Performance click Settings.
3. Click the Advanced tab, and then under Processor scheduling use one of the following methods:
* Click Programs to assign more processor resources to the foreground programs. This setting is recommended for most users.
* Click Background services to assign equal amounts of processor resources to all running services. This includes print jobs and applications.
4. Click OK to apply preferences and close the dialog box.



Aug 09, 2008 | Microsoft Office Professional 2007 Full...

1 Answer

Scheduling..


Is that you MR. Christian Mallari..

Feb 18, 2008 | Computers & Internet

Not finding what you are looking for?

Open Questions:

Computers & Internet Logo

Related Topics:

265 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18385 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...