[SOLVED] R C data structure algorithm Scheme assembly graph Computer Science Department

$25

File Name: R_C_data_structure_algorithm_Scheme_assembly_graph_Computer_Science_Department.zip
File Size: 734.76 KB

5/5 - (1 vote)

Computer Science Department
!
CS350: Fundamentals of Computing Systems
! !!
!
!
,.!!! ! ! ! ! ! ! ! ! ! ! ! ! 01.!! ! ! ! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!23!45.! !! ! ! ! ! !
!
!!!!,!.!!01!!23!!45!!!.3!.!!01!
! !
!
!6!6!!70658900:;06!,!!267!770?6!?!05!
!,!05!6!!,6! !?!?!!0! 06!!
!?09,6!?!15!6!60!
!98 ?09,6!?!15!6!? 0?5! ! !!0?!66, 06!7?!
63,78!9:;!! 63,78!9?;!! 63,78!9;!! 63,78!9;!! 63,78!9 ;!! 63,78!9;!!
!7!3;!!
! !!!! ! !!!!!!!!!!!!!!:! ! !!!!!!!!!!!!!!:! !!!!!!!!!!!!!!:! !!!!!!!!!!!!!!:! !!!!!!!!!!!!!!:?!
! !:! !
!
!
I give credit to students who can accurately assess their performance. Thus, after you finish the exam answer the following for up to five bonus points!
!,,.0012!!
! !!8!!!8!!3!!73!! !!

NameEmail: 2 of 14 1 Label each of the statements below with either True or False:
Question
Answer
a. In a discrete event simulator, the best way to compute the average size of queues is to sample the status of the queues at regular and deterministic time intervals.
b. The probability of rejection in a MM1K system is always strictly greater than zero regardless of the value of K.
c. An average for total number of requests ! in a MM1 system can be computed as the average number of requests in the queue ! plus 1. Thus: .
d. Linearly increasing the arrival rateat a MM1 system can cause a morethan linear increase in the average number of queued requests.
e. Assume that a confidence interval E, E on the mean of a normally distributed random variable has been derived. Then every additional experimental sample will fall within the range E, E.
f. There exist instances of systems where Littles law applies while the Jacksons theorem does not.
g. A realtime task with very low utilization can be considered as an IO bound task.
h. Assume that a specific realtime taskset is schedulable under algorithm A. Then no taskset can suffer starvation under A.
i. RM is never able to schedule a realtime taskset on singleprocessor if the utilization of the taskset is only slightly below 100.
g. Complete Fair Queuing CFQ admits requests from tasks using a RR scheme. Hence, no knowledge of the disk geometry is required to implement CFQ.
k. At least N1 semaphores are required to perform Nparty rendezvous.
l. Consider a semaphore called mutex and initialized to 4. The semaphore can be safely used to serialize N processes over a shared data structure.
m. The Banker algorithm may deem as unsafe and deny a request even if granting the request does not always lead to a deadlock.
n. Consider a group of processes synchronizing over a shared resource using a semaphore in a deadlockfree system. Starvation may still occur depending on the semaphores queuing policy.
o. S is a singleprocessor system where SJN is used to schedule processes. In S, processes use semaphores to synchronize over shared resources. S is a deadlock free system.
p. It is always preferable to use a semaphore to achieve mutual exclusion rather than a spinlock.
q. Consider a resourcetoprocess assignment graph. The order in which processes acquire shared resources impact the possibility of the graph to develop a loop.
r. In the typical implementation of a Message Queue middleware, a sender may remain blocked if the receiver is not ready to process the message being sent.
Note: There are 18 questions. A correct answer will get you 2 points. An incorrect answer will get you 1 points. A blank answer will get you 0 points.
Copyright2017 by Renato Mancuso, All Rights Reserved.

NameEmail: 3 of 14
2 A twotier data center is composed by 4 nodes. Node A and B compose the first tier, while Node C and D compose the second tier. Requests arrive with a rate ! at A. With probabilitya request needs preprocessing and it is sent to B. Otherwise, it is sent to C or to D directly from A with probabilityandrespectively. Once a request has completed preprocessing at B, it will be routed to C or D with probabilityandrespectively. The values for all the probabilities are reported in Table 1. A, B, and C are MM1 systems. D is a MM14 system. All the node parameters reported in Table 2.
Table 1: Routing probabilities in the twotier data center.
Table 2: Service time parameters for nodes A, B, C, and D.
a 2 points Compute the Utilization of Node C as a function of R.
b 4 points Assume that R200 reqs. What is the probability that a request will be rejected by Node D?
Route
Probability
!
0.6
!
0.1
!
0.3
!
0.7
!
0.3
Node
Service Time !
System Type
A
2 ms
MM1
B
5 ms
MM1
C
3 ms
MM1
D
8 ms
MM14
Copyright2017 by Renato Mancuso, All Rights Reserved.

NameEmail: 4 of 14 c 4 points What is the maximum value for the arrival rate R that the system can handle without
buckling? Hint: an MM1K system can never buckle.
d 6 points With R200 reqs, what is the average number of requests in the system at steady state?
Copyright2017 by Renato Mancuso, All Rights Reserved.

NameEmail: 5 of 14
3 A car production plant consists of two subplants in sequence: painting and assembly. Assembly for a car can start only once the painting process for the same car has been completed. The plant produces cars in batches. Each batch has the following composition: 2 cars of type A, 1 car of type B, 1 car of type C, 1 car of type D. For the different types, painting and assembly times are reported in Table 3. A new batch cannot start processing until the last car of the previous batch has been fully assembled.
Table 3: Production parameters for car types at assembly and painting subplants.
a 8 points If we want to minimize the completion time for a batch, what is the order in which
each car type should be scheduled within a batch? Motivate your answer.
Car Type
Painting Assembly Quantity in Batch
A
8 min
14 min
2x
B
14 min
8 min
1x
C
6 min
12 min
1x
D
10 min
6 min
1x
Copyright2017 by Renato Mancuso, All Rights Reserved.

NameEmail: 6 of 14
b 4pointsAssumingthatanewbatchcanstartprocessingimmediatelyafterthepreviousbatch has been completed, how many cars per 8hours day the plant will be able to produce?
Note: the grid below is provided only for your convenience. You do not have to use it if you do not need it to answer this question.
!

c 2 points What is the utilization of the assembly subplant? Motivate your answer.
Copyright2017 by Renato Mancuso, All Rights Reserved.

NameEmail: 7 of 14
4 The new Airbuzz Nightmareliner is being designed using a dualprocessor computing platform. The engineers have produced a flight control system comprised of 7 realtime tasks, namely T1, , T7. The parameters for these tasks are reported in Table 4. Answer the following questions:
Task
WCET
Period
Utilization
T1
5 ms
25 ms
T2
8 ms
25 ms
T3
9 ms
25 ms
T4
3 ms
10 ms
T5
3 ms
20 ms
T6
10 ms
40 ms
T7
11 ms
50 ms
Table 4: Parameters of Airbuzz Nightmareliner flight control tasks. a 2 points Compute the utilization of each task in Table 4.
b 4pointsIsthetasksetschedulableunderEDFFFontheconsideredcomputingplatform? Motivate your answer.
Copyright2017 by Renato Mancuso, All Rights Reserved.

NameEmail: 8 of 14
c 6 points If possible, produce a tasktoprocessor assignment using EDFFF and the following ordering of tasks: T2, T1, T6, T4, T3, T7, T5.
d 2pointsAssumethatT3,T4andT5arescheduledaccordingtoEDFonProcessor1.Produce the corresponding schedule up to time !,. Use the grid provided below.
e 2 points Using the setup and time frame considered for Part d, what is the average response time for a job of T3?
Copyright2017 by Renato Mancuso, All Rights Reserved.

NameEmail: 9 of 14
5 A group of 4 friends has decided to go watch a movie. Being Italian, they are all expected to show up at the movie theater at unpredictable times hopefully before the end of the movie. They agree on the following protocol: a if less than 3 people have arrived at the movie theater, they block, waiting for more friends to arrive; b once at least 3 friends have arrived, they go in together, even if the fourth friend has not arrived yet; c when the 4th friend shows up, he realizes that his friends have already arrived and joins them inside the theater.
Note: this protocol does not repeat. Consider each friend as a oneshot process.
a 6 points Produce a pseudocode for the process of a generic friend that uses semaphores and
that follows the described protocol. Clearly state how your variables are being initialized.
Copyright2017 by Renato Mancuso, All Rights Reserved.

NameEmail: 10 of 14
b 10pointsAfterthemovieisover,allthefriendswanttoshareasinglecab.Onlyoneofthem can stop a cab by the curb. After the cab has been stopped, everyone waits for everyone else to be in the cab. Lastly, once everyone is in the cab, only one of the friends instructs the driver toward their destination home?. Modify the code written at the previous step to incorporate the additional synchronization logic. Once again, provide the initialization of all the used variables. Note: if you are reusing the code from the previous step, use it here as: ENTRYPROTOCOL
Copyright2017 by Renato Mancuso, All Rights Reserved.

NameEmail: 11 of 14
6 Consider a system with 4 Processes !. !0 !1234!5 and 3 shared resources !. !0234!1. For these resources, the static parameters are reported in Table 5.
Parameter
Resources
!.
!0
!1
!!
8
5
8
!.
6.!
6
2
4
Processes
!0
60!
3
4
3
!1
61!
2
1
1
!5
65!
4
0
4
Table 5: Static parameters of considered system.
a 4 points Considering what reported in Table 5, complete Table 6 with the amount of allocated resources to all the processes 7!, and with the availability of all the resources !.
Parameter
Resources
!.
!0
!1
Parameter
!.
Resources
!0
!1
!
!.
.!
.!
5
0
2
Processes
!0
0 !
0!
0
4
1
!1
1 !
1!
1
1
1
!5
5 !
5!
3
0
2
Copyright2017 by Renato Mancuso, All Rights Reserved.
Table 6: System state for considered system.

NameEmail: 12 of 14
b 8pointsWouldthestateinTable6bedeemedsafebytheBankeralgorithm?Ifso,producea possible sequence in which all the processes can come to completion.
Copyright2017 by Renato Mancuso, All Rights Reserved.

NameEmail:
13 of 14
Copyright2017 by Renato Mancuso, All Rights Reserved.
This page is intentionally blankuse as extra space

NameEmail:
Page 14 of 14
Equations for some queuing systems:
222 A A 1 Ts
MG1system q andw ,where A 1
1 1 22
2 Ts
, and

MD1system q21andw21
K 1K1 1 1K1
for1

for 1
qK
2
PrRejectionPrSK
1K
1K1 for1 1
for1
K 1
MM1K system
MMN system
where
Tasks and Schedulability Results:
qC
1
N
wC1
and
T 1K i!
,
1K
N1Ni
N N
s , C
and Ki0
N Ni
i0
i!
Singleprocessor RM: ! tasks schedulable if !!!9 :
Singleprocessor EDF: ! tasks schedulable if and only if !
RMFF: !tasks schedulable onprocessors if !!, :
EDFFF: !tasks schedulable onprocessors if !. .
oWith! .;2!.
Minimum Slowdown for job !7at time !:
8
Copyright2017 by Renato Mancuso, All Rights Reserved.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] R C data structure algorithm Scheme assembly graph Computer Science Department
$25