SYSC 3303 K

10 Pages
Unlock Document

Systems and Computer Engineering
SYSC 3303
All Professors

Question A 17 marks1Briefly explain the difference between verification and validation 2 marksVerificationDoing things right In other words testing that each piece of the system does what it is supposed to do This can be done formallymathematicallyValidationDoing the right things In other words does the system do what it is supposed to do ie does it meet the specification or does it meet the customers needs This can only be done informally ie no mathematical proof unless the specification is written in mathematical notationNote that words in square brackets are not required for full marks2We discussed two protocols that permit us to deal with unbounded priority inversionaName one of the two 1 markbBriefly describe in general terms how it deals with unbounded priority inversion 2 markscGive a specific example in terms of threads eg t1 t2 t3 etc that shows how this protocol resolves the issue 3 marksPriority Inheritance Protocol 1 markIn this protocol when a thread has a lock its priority is the highest of its original priority and that of the highest priority thread waiting for that lock As other threads join the blocked set the priority of the thread with the lock could change many times When the thread gives up the lock its priority returns to its original priority 2 marksFor example if t1 is a lowpriority thread with priority 2 and t2 is a highpriority thread with priority 8 and both need lock l1 while they are executing and t3tn are medium priority threads of priority 5 that do not need the lock then we want to ensure that t3tn do not get precedence over t2t1 becomes readytorun first and starts executing It gets lock l1 and continues executing Meanwhile t2 becomes readytorun and temporarily preempts t1 However as soon as t2 attempts to get the lock it moves to l1s blocked set waiting for the lock and t1 resumes executing Although t2 has a higher priority than t1 it cannot take the lock from t1 as this would defeat the purpose of our critical sectionsIn our example when t2 attempts to get lock l1 t1s priority would increase to 8 Thus t3tn would not be able to preempt t1 As soon as t1 gives up the lock its priority returns to 2 Assuming no other threads have become readytorun t2 would get the processor next 3 marksORPriority Ceiling Protocol or Priority Protect Protocol 1 markIn this protocol every lock is assigned a priority which should be greater than
More Less

Related notes for SYSC 3303

Log In


Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.