100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4,6 TrustPilot
logo-home
Opiniones

COMP35112 Chip Multiprocessors.pdf

Puntuación
-
Vendido
-
Páginas
6
Subido en
01-11-2023
Escrito en
2023/2024

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

Institución
Grado

Vista previa del contenido

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

Escuela, estudio y materia

Grado

Información del documento

Subido en
1 de noviembre de 2023
Número de páginas
6
Escrito en
2023/2024
Tipo
Opiniones

Temas

$6.19
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Studyabroad Oxford University
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
67
Miembro desde
4 año
Número de seguidores
29
Documentos
1985
Última venta
2 meses hace
schoooldays

shop affordably

5.0

2 reseñas

5
2
4
0
3
0
2
0
1
0

Documentos populares

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes