100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Judgments

COMP35112 Chip Multiprocessors.pdf

Rating
-
Sold
-
Pages
6
Uploaded on
01-11-2023
Written in
2023/2024

Judgement of 6 pages for the course computer science at computer science (COMP35112 Chip M)

Institution
Course

Content preview

COMP35112


Two hours




UNIVERSITY OF MANCHESTER
SCHOOL OF COMPUTER SCIENCE




Chip Multiprocessors




Date: Thursday 2nd June 2016
Time: 09:45 - 11:45




Please answer any THREE Questions from the FOUR Questions provided

This is a CLOSED book examination

The use of electronic calculators is permitted provided they
are not programmable and do not store text




[PTO]

, COMP35112




Note: Where a question asks for instruction-level code, a format similar to ARM assembler
is expected. However, marks will not be lost if the format is incorrect, as long as the
meaning of each instruction is clear (from an accompanying explanation and/or
comments).

Question 1.

a) In the context of thread-based data-sharing parallel programming in Java, briefly
explain why synchronisation constructs, such as barriers, locks, semaphores and
monitors, are needed by a programmer.
(3 marks)

b) Give instruction-level code for implementing a binary semaphore using conventional
load (ldr) and store (str) instructions (plus compare and branch instructions) only. Use
this code to explain why it is necessary to provide hardware-level support for
synchronisation operations in a multicore processor.
(3 marks)

c) Describe the operation of a ‘test-and-set’ (tas) instruction and explain how it can be
used to safely implement a binary semaphore.
(3 marks)

d) Explain why instructions that read-modify-write a value in memory atomically (i.e.
guarantee that no other instruction can access the variable while the read-modify-write
is in progress) cause implementation problems in a modern RISC multicore processor.
(2 marks)

e) Explain how the pair of instructions ‘load linked’ (ldl) and ‘store conditional’ (stc)
can be used to implement a binary semaphore and discuss how these instructions
overcome the problems identified in your answer to part d). Your answer should
include an indication of the code required at instruction-level.
(4 marks)

f) The simplest form of barrier has a single shared variable initialised with a value N and
has a ‘wait’ function that is executed by a thread wanting to synchronise at the barrier.
A thread calling ‘wait’ will decrement the variable and if the value is now zero will
exit immediately otherwise it will wait at the barrier until the value has been reduced
to zero by other threads. Give instruction-level code that implements this barrier using
‘load linked’ and ‘store conditional’ instructions and explain how it works.
(5 marks)




Page 2 of 6

Written for

Course

Document information

Uploaded on
November 1, 2023
Number of pages
6
Written in
2023/2024
Type
Judgments

Subjects

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Studyabroad Oxford University
Follow You need to be logged in order to follow users or courses
Sold
67
Member since
4 year
Number of followers
29
Documents
1985
Last sold
2 months ago
schoooldays

shop affordably

5.0

2 reviews

5
2
4
0
3
0
2
0
1
0

Trending documents

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions