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

Tentamen vid Institutionen för Datavetenskap, Linköpings universitet
TDDD36 Säkra mobila System (Systemprogramvara)
8 - 12
 Massimiliano Raciti (jour runda, telefon: 0762 388815)
 Simin Nadjm-Tehrani (endast via telefon 0702 282412)
Miniräknare, Lexikon
3, 4 and 5:
20 27 33 -
19 p
26 p
32 p
40 p
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, but the 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 November 14, 2011.
Good luck!
Simin Nadjm-Tehrani
Examiner TDDD36, Systems Software
Tentamen vid Institutionen för Datavetenskap, Linköpings universitet
a) For the wedding of Princess Victoria of Sweden three desserts were ordered and three bakers
were selected to prepare each of them. In order to prepare the cakes some tools were
available: two ovens, two mixers, two fridges, and three baking pans. Nevertheless some of
them belonged to (were owned by) some of the bakers, who were not willing to share them
(i.e. release them) until they prepared their own cake. Baker A owned one oven, one fridge,
and one baking pan. Baker B owned one mixer, and baker C owned two baking pans.
Assume the cakes must be prepared sequentially, i.e. one baker cannot start the process while
another cake is under preparation. If each baker requires up to one oven, one mixer, one
fridge, and two baking pans to prepare a cake, we would like to know: can the all the cakes be
prepared? 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
cake completions is possible.
(6 poäng)
b) Att åstadkomma ömsesidig uteslutning med hjälp av semaforer innebär att man måste kunna
implementera wait- och signal-operationerna på semaforn på ett atomiskt sätt (en. ”atomic”).
Förklara vad atomicitet betyder i detta sammanhang, och ange två metoder som kan användas
för att garantera atomicitet för dessa operationer.
(3 poäng)
c) 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 to access 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 den kritiska sektionen i
varje process. Du kan t.ex. skriva av koden och rita en cirkel kring delar av koden som ska
betraktas som kritisk sektion. Motivera ditt val!
Process A
while true do
{X = X+1;
Sq = X^2;
Process B
while true do
{ Z = 1
if Sq > Limit then display(Sq)
W = Z-1
(5 poäng)
Tentamen vid Institutionen för Datavetenskap, Linköpings universitet
a) Take a stand on the following propositions (true or false) and motivate your answer!
1) Stock exchange applications have jitter parameters among QoS requirements.
2) Voice over IP is an elastic application in the QoS terminology.
(4 poäng)
b) 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) The system shall keep a log of all changes done by each user for each of the
2) No documents uploaded to a central repository are lost.
3) Documents that are larger than 30Mb are not accepted for common storage.
4) A document can be retrieved from the central repository within 20 seconds from
sending a request.
(4 poäng)
a) Vad kännetecknar den asynkrona modellen för distribuerade system?
(2 poäng)
b) What is meant by interoperability and scalability in the context of architectural solutions in
distributed systems?
(4 poäng)
a) Memory leaks and unreleased file locks are two examples of phenomena that are collectively
referred to as software aging. Relate these two to the notions of faults, error and failure.
(2 poäng)
b) Compare the notions of fault prevention and fault tolerance and provide one example
technique to achieve each of them.
(4 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
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