TENTAMEN TDDD36 Säkra mobila System (Systemprogramvara) Datum: Tid:

advertisement
Tentamen vid Institutionen för Datavetenskap, Linköpings universitet
TENTAMEN
TDDD36 Säkra mobila System (Systemprogramvara)
Datum:
2012-01-11
Tid:
8 - 12
Lokal:
TER1
Jourhavande-lärare:
 Jordi Cucurull Juan (jour runda, telefon: 0735 613292)
Hjälpmedel:
Miniräknare, Lexikon
Poängantal:
40p
Betyg:
3, 4 and 5:
U:
3:
4:
5:
20 27 33 -
19 p
26 p
32 p
40 p
INSTRUCTIONS:
Write your anonymous ID number on each sheet of paper that you hand in. Further, pages should
only contain one answer per page (answers to sub-questions can be on the same page). You are
asked to only answer on the front page of the paper. Sort all the sheets that you hand in with
respect to the number of the question.
Your answers can be presented in Swedish or English. Questions that are in English can be
corrected by a non-Swedish teacher.
Make sure your answers include motivations and are presented precisely. A correct answer
without any motivation will not be given any credits. Incorrect answers embedded in a
partially correct one reduce the points given for that answer. Points will not be given to answers
that cannot be read due to bad handwriting.
Hints: Try to dispose of your time on each question in proportion of the assignment points. In
those cases where you are in doubt about the question, write down your interpretation and your
assumptions, and answer the question based on the interpretation.
Figures can be of help when describing but should be accompanied by a text description.
Results are reported no later than January 26, 2012.
Good luck!
Simin Nadjm-Tehrani
Examiner TDDD36, Systems Software
Tentamen vid Institutionen för Datavetenskap, Linköpings universitet
Q1:
Annika, Malin and Oscar are doing their school homework together. Each student has a
different assignment. Each student owns 2 pencils, 1 book, and 1 ruler which they use until
they have done their own assignment. In addition, there are 2 spare pencils, 1 spare calculator
and 1 spare book. In order to make the assignments Annika requires 6 pencils, 1 calculator, 1
book, and 2 rulers. Malin requires 2 pencils, 1 calculator, 2 books, and 1 ruler, and Oscar
requires 1 pencil and 4 books.
Assume that the students will not release any tool (owned or acquired spare tool) until they
have finished their assignment. We would like to know: can all the assignments be
completed? Relate this problem to the Banker's algorithm for multiple resource allocation in
computer systems, and use the concepts from that algorithm to show whether a sequence of
assignments is possible.
(6 poäng)
a) Take a stand on the following propositions (true or false) and motivate your answer!
1) A resource that is protected by a semaphore, can be accessed by one or more processes at
a time, depending on the initial value of the semaphore.
2) Deadlock is only possible when at least one of the Coffman conditions holds.
(4 poäng)
a) In Stockholm Tivoli there is a roller coaster called Jetline. It has a track with loops and curves
with many cars where people take rides at fast speed. Along the track there are three cameras.
Each camera takes pictures of the people when a car passes in front of it. The system is
controlled by a single processor which runs the six processes, three devoted to capture the
pictures, Ci (i: 1..3) and three devoted to process and store the pictures, Pi (i: 1..3). Since the
pictures are stored in a shared database, mutual exclusion of access to the database must be
guaranteed. Implement an algorithm using the database encapsulated in a monitor. In order to
decouple the rate of capturing pictures and processing them, three buffers Bi (i: 1..3) are
shared pair-wise (Each Bi shared by the pair Ci and Pi). You should describe your algorithm
by writing the pseudo-code for all the processes, but are not expected to produce the details of
the pseudo-code for operations on the buffers or the storage in database.
(6 poäng)
Betrakta följande två processer som ska köras på samma processor och anta att tilldelning
operationen är inte atomiskt implementerat i maskinspråk. Identifiera koden som ska skyddas
som kritiska sektion i varje process. Du kan t.ex. skriva av koden och rita en cirkel kring delar av
koden som ska betraktas som kritisk sektion. Den kod som du markerar ska leda till minst
inverkan på parallellism, dvs inte tvinga att processerna körs sekventiellt i så stor
utsträckning som möjligt. Motivera ditt val!
Process A
while true do
{X = X+1;
Sq = X^2;
W = Z+3
Process B
while true do
{ display(“Square of “ + X);
display(“ is: “ + Sq);
C = C - 2
}
}
(4 poäng)
Tentamen vid Institutionen för Datavetenskap, Linköpings universitet
Q2:
b) Take a stand on the following propositions (true or false) and motivate your answer!
1) Live video broadcasting is an intolerant application in the QoS terminology.
2) Tele-conferencing is a non-interactive application in the QoS terminology.
(4 poäng)
c) Consider a document sharing application where different users in a group can cooperate by
reading and writing to a set of common documents. Decide which of the following properties
is a functional property and which is an extra-functional property (also sometimes called a
non-functional property), and motivate your answer!
1) Updates to the same document by different users should be time-stamped and
version-controlled.
2) Data replication shall be used to ensure that no documents kept at the central
repository can be lost due to a disk crash.
3) Each user can submit documents for storage up to a maximum of 2GB.
4) Only users that are authorised to access a document can access that document.
(4 poäng)
Q3:
a) Describe a variation of the client-server model that is an architectural model serving some
extra-functional (non-functional) property.
(2 poäng)
b) What is the reason for having a fault model when designing a distributed system? Give an
example fault model and the resulting work that has to be done during system
design/implementation depending on that fault model.
(4 poäng)
Q4:
a) Using clear arguments identify a potential fault-error-failure chain of events in the following
scenario.
“In Computer Sweden 2nd December 2011, we read the background to the recent major data
centre failure for the company Tieto. This company has several critical customers including a
major Swedish Chemist (Apoteket), the SBAB bank, and a number of Swedish public authorities
including the one in charge of social insurance. The data centre problem has resulted in payments
to social insurance recipients being delayed, patient prescriptions not being available, bank
accounts not reachable, etc., for around one week. The problem has been traced to a disfunctional
double disk redundant subsystem, the so called “fast cache”, on which several other systems are
dependent. Both the original disk and the mirrored disk had apparently crashed despite the fact
that Tieto had service level agreements of 99,8% up time over a 3 month period with some of its
customers. Recovery of the system has been delayed and customer data has apparently been lost
in the process.
(6 poäng)
Tentamen vid Institutionen för Datavetenskap, Linköpings universitet
Glossary: English to Swedish
atomic – atomisk (oavbrytbar)
request – begäran
availability – tillgänglighet
response time – responstid
avoid – undvika
safety – säkerhet
bandwidth – bandbredd
scheduler – schemaläggare
broker – medlare
security – säkerhet
clock drift – klockdrift
serialisable - serialiserbar
concurrency – samtidighet
shaping - formning
consistency – konsistens
shared memory – gemensamt minne
deadlock – låsning (baklås)
starvation – svält
delay – fördröjning
sufficient condition- tillräckligt villkor
deliberate – avsiktlig
synchronisation – synkronisering
dependability – pålitlighet
system call – systemanrop
diversity – mångfald
thread - tråd
error – felyttring
throughput – genomströmning
event – händelse
trace – spår
failure – haveri
transparency – transparens
fault – felkälla
trust – tillit
fault tolerance – feltolerans
validation – validering
forecast – förutse
verification - verifiering
inheritance – arv
vulnerability - sårbarhet
integrity – dataintegritet
interleavings – sammanflätningar
interoperability – interoperabilitet
intrusion – intrång
latency - latens
maintainability – reparerbarhet
malicious - illvillig
middleware - mellanvara
mutual exclusion – ömsesidig uteslutning
necessary condition – nödvändigt villkor
non-functional property – ickefunktionell egenskap
omission – utelämnande
performance – prestanda
preemptible – avbrytbar
prevent – förebygga
quality of service – tjänstekvalitet
race condition – kapplöpningstillstånd
release - släppning
reliability – tillförlitlighet
rendundancy – redundans
replica – kopia
replication – replikering
Tentamen vid Institutionen för Datavetenskap, Linköpings universitet
Swedish – English
arv - inheritance
atomisk (oavbrytbar) – atomic
avbrytbar - preemptible
avsiktlig - deliberate
bandbredd - bandwidth
begäran - request
dataintegritet - integrity
felkälla - fault
feltolerans - fault tolerance
felyttring - error
fördröjning - delay
förebygga - prevent
formning - shaping
förutse - forecast
gemensamt minne - shared memory
genomströmning - throughput
händelse - event
haveri - failure
ickefunktionell egenskap - non-functional
property
illvillig - malicious
interoperabilitet - interoperability
intrång – intrusion
kapplöpningstillstånd – race condition
klockdrift - clock drift
konsistens - consistency
kopia - replica
låsning (baklås) - deadlock
latens - latency
mångfald - diversity
medlare - broker
mellanvara - middleware
nödvändigt villkor - necessary condition
ömsesidig uteslutning - mutual exclusion
pålitlighet - dependability
prestanda - performance
redundans - rendundancy
reparerbarhet - maintainability
replikering - replication
responstid - response time
säkerhet - safety
säkerhet - security
sammanflätningar - interleavings
samtidighet - concurrency
sårbarhet - vulnerability
schemaläggare - scheduler
serialiserbar - serialisable
släppning – release
spår - trace
svält - starvation
synkronisering - synchronisation
systemanrop - system call
tillförlitlighet - reliability
tillgänglighet - availability
tillit - trust
tillräckligt villkor - sufficient condition
tjänstekvalitet - quality of service
tråd - thread
transparens - transparency
undvika - avoid
utelämnande - omission
validering - validation
verifiering - verification
Download