ACTUAL Exam Questions and CORRECT
Answers
Slices - CORRECT ANSWER - - Dynamic arrays.
- Special structure with three values: Length, Capacity, and Pointer to the head of an actual static
array.
- Use make and append to respectively allocate array space and adding elements to an existing
slice.
- Main data structure in Go.
Functions - CORRECT ANSWER - - Use when possible.
- Similar to Java methods, but does not need to be part of a class.
- Can use recursion.
Channels - CORRECT ANSWER - Communication tool that enables safe data exchange
and synchronisation between goroutines.
goRoutines - CORRECT ANSWER - A lightweight thread of execution managed by the
Go runtime, aka. concurrently executing functions.
gRPC - CORRECT ANSWER - gRemote Procedure Call developed by Google. Uses
protocol buffers for serializing structued data.
- IDL(interface definition language), define messages
- Both synchronous and asynchronous support
- Unary / Serverside / Client / Bidirectional streaming
Pointers - CORRECT ANSWER - used to 'point' to specific things in Go. E.g. *int =
"pointer to an int)", and &x = "address of x".
,sync.Mutex - CORRECT ANSWER - - Special structure for guarding access
- Declare a variable sync.Mutex
- Use methods to Lock() and Unlock() for guarding access
A Distributed System - CORRECT ANSWER - A distributed system is one in which
components located at networked computers communicate and coordinate their actions only by
passing messages.
Network - CORRECT ANSWER - A (computer) network is a collection of entities that can
execute software and interact by exchanging information and sharing resources.
Node - CORRECT ANSWER - Each entity in the network is usually called a node.
Depending on the level of abstraction of the network, a node can be a physical device or more
abstract entities.
Communication - CORRECT ANSWER - The nodes of a network can interact with each
other by means of communication. In this course, we always assume that the network provides
some sort of communication means through which nodes can exchange messages.
Concurrency - CORRECT ANSWER - In a concurrent system, two or more activities
(processes or programs) progress in some manner parallel to each other. E.g. execution of a set of
multiple instruction sequences at the same time.
Parallelism - CORRECT ANSWER - Concurrent execution of multiple tasks or processes
to achieve improved performance and efficiency.
Global Clock - CORRECT ANSWER - An agreed upon time and place, that usually all
nodes and the network follows, leading to perfect alignment.
Interaction - CORRECT ANSWER - Interaction(i)
, - Latency (from start of transmission to beginning of receipt)
- Bandwidth (e.g. bits/second)
- Jitter (a variation of delivery time)
Interaction (ii)
- Synchronous
- Asynchronous
Interaction(iii)
- Event ordering - no global time
Asynchronous - CORRECT ANSWER - - No bounds on execution steps
- No time bound on transmission
- Arbitrary clock drift
Synchronous - CORRECT ANSWER - - Bounds on execution steps
- Guaranteed transmission in bounded time
- Clock drift bounds
Failures - CORRECT ANSWER - A deviation of a system or component from its expected
behaviour.
Faults - CORRECT ANSWER - A fault is the underlying cause of a failure.
Call-by-value - CORRECT ANSWER - Functions take values as input and return other
values as output.
Call-by-reference - CORRECT ANSWER - Pointers take a reference, and return that
reference.