DS

Description

Engineering Flashcards on DS , created by Martin Myhrman on 07/01/2019.
Martin Myhrman
Flashcards by Martin Myhrman, updated more than 1 year ago
Martin Myhrman
Created by Martin Myhrman over 5 years ago
28
0

Resource summary

Question Answer
Can multiple clients read and write the the same shared memory at the same time? False, only one can write but multiple clients can read in parallel
Is Shared Memory a fast process? It is fast if done locally, and because of simultaneous read can be very efficient in terms of algorithmics
What is Synchronisation / Mutal exclusion It is a technic used to prevent memory inconsistencies(data races). For example in a linked list when two clients trying to remove two different links only one can be removed at the same time since it a critical.
What is Message Passing? When processes exchange information by sending and receiving messages, either locally or remotely. Messages can be sent to one receiving process, several, or even broadcast.
Is Message passing delay incurring or not? It is typically delay incurring.
Can, so-called, dead-locks occur in Message Passing? Yes even though synchronization is implicit
What type of system would you use if you would only want to receive certain(classes of) messages? Publish/Subscribe systems
What does CORBA stand for and what is it? Common Object Request Broker Architecture. It is a standard defined designed to facilitate the communication of systems that are deployed on diverse platforms.
What is RPC? In distributed computing, a remote procedure call (RPC) is when a computer program causes a procedure (subroutine) to execute in a different address space (commonly on another computer on a shared network), which is coded as if it were a normal (local) procedure call, without the programmer explicitly coding the details for the remote interaction.
What is RMI? RMI (Remote Method Invocation) is a way that a programmer, using the Java programming language and development environment, can write object-oriented programming in which objects on different computers can interact in a distributed network. RMI is the Java version of what is generally known as a remote procedure call (RPC), but with the ability to pass one or more objects along with the request.
Explain the scheme for Synchronous interaction The scheme then: Make a call/request Wait for the execution Receive the result Possibly with a timeout
Explain the scheme of Asynchronous Interaction The execution time of an Asynchronous request is either not known or known to be possibly “long”. The scheme is: Make a call/request [Do own execution…]* Receive and process the result
If you compare TCP and UDP to synchronous and asynchronous. Which one which? TCP is synchronous UDP is asynchronous
What does Thread.currentThread().join(); do? Thread.currentThread().join() blocks the current thread forever unless the program is killed, e.g. with CTRL+C on Windows. Without that line, the main method would exit right after the server is started if no loops were implmentend An alternative would have been to use Thread.sleep(Long.MAX_VALUE); Thread.currentThread().join(); is a statement that takes forever to complete.
Why is it bad to have this approach when dealing with synchronization: counter = counter + 1? It is two distinct variable accesses, the variable might have been updated in between. Even though each of them is atomic. Instead, implement a method with synchronized on it. See image for example.
What class does the functions: Wait and notify(All) belong to? Object. Bonus: A basic requirement is that they have to be called from within a synchronized context for the given object.
Expalin these words: Destination, Socket, Ports, Address Destination: Internet address and local port Socket: abstraction of the connection, UDP or TCP Ports: large range (16 bits datatype), one process can use multiple ports, but one port cannot be shared between processes (with an exception for multicast) Address: a named host or direct IP address, 4 bytes A.B.C.D (for IPv4)
What risk does Omission failures refer to within UDP? packets are not guaranteed to be delivered, nor are acknowledged
Define Marshalling (unmarshalling is the opposite) “The process of taking a collection of data items and assembling them into a form suitable for transmission in a message. Marshalling consists of the translation of structured data items and primitive values into an external data representation.”
What does "External data represenetation" mean? Something that “everyone” understands
What is an Tagging interface? An interface for the purpose of its own existence. That is, it does not declare any methods!
What is XML and what is it purpose? A W3C standard (with siblings) for encoding documents and structured data in a human-readable(hence also ASCII transportable) and machine-readable form
What does JAXB stand for and what is it? Java Architecture for XML Binding and it's a framework that supports marshalling of Java objects into XML and unmarshalling XML data to Java objects
Explain the Map-reduce process 1. Break the input data into chunks, mark each chunk with somekey1. Each node gets one key with the associated data. 2. The mapping part: Each node processes (map function) one chunk and produces an intermediate result, a list of key2-value pairs. 3. The reducing part: Intermediate results from the mapping nodes are grouped by key2 and distributed to reduce nodes which consolidate the output (reduce function) for each key. Modularisation Only the map and reduce functions are user provided, the rest of the work is done by the framework / library.
What does Atomicty mean? Atomicty means that either you update everything or nothing.
Give a few examples of failures that can occur with Concurrent Access For example, if you have two bank cards for the same account and you use them in two different shops at the same time, you might have insufficient resources. People ordering from your shop online at the same time but only one of the item is available
What are the ACID Properties on transactions? Atomicity – all updates must be performed or none, also in case (and particularly) of failures Consistency – a transaction takes the system from one consistent state to another consistent state Isolation – No interference from other transactions, the intermediate effects of a transaction should not be visible to other transactions Durability – When successful, all effects of the transaction should be saved in permanent storage and recoverable even after a subsequent system crash
How is Serial / Sequential Equivalence ensured? An interleaving of two transactions is said to be serially equivalent if its results are the same as if the transactions have been executed in isolation is some order. To get serial equivalence we need to control the possible interleavings. To do that we employ different concurrency controls to ensure that possibly conflicting operation (reads or writes) happen in the right order. One of such controls is locking.
What is a Cascading Abort? When one transaction aborts, then any other transaction modifying the same data has to abort too. This, in turn, can cause aborts of the more related transaction resulting in a cascading abort.
Explain Strict two-phase locking To allow strict execution regime, any new transaction can only read/write data once the other transactions in progress have committed. This is called strict two-phase locking. It prevents dirty reads and premature writes.
Give me two real life examples of locking on concurrency Your bank account would be locked. This would be an equivalent of going there in person and taking the nummerlap for a very long queue! Ordering tickets to shows online that are very popular. You can first go in and order once the timer for the first people in cue are finished.
What are Protocol Buffers? Protocol buffers are nothing more than Google specific serializable messages (simplified and high-performance) for internal communication within the infrastructure, including remote innovation, which is language independent and open source.
What is Sawzall? Sawzall is a higher-level language for Google’s Map-Reduce.
What is GFS, Chubby and Bigtable and what do they have in common? GFS Google File System, a Distributed file system for unstructured data (files), optimized for Google style of files (=very large files). Chubby Supports distributed locking and small quantities of data. Bigtable Storage of structured data, so essentially a database infrastructure, Google style – simplified for performance, does not support full relational operators.
What is POSIX? The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines the application programming interface (API), along with command line shells and utility interfaces, for software compatibility with variants of Unix and other operating systems.
Why is time so important in DS? Imagine a legal money transaction between a merchant of some sort and a bank. Each operates on a different computer. The merchant keeps a transaction bill date according to the merchant’s clock, the bank keeps the payment record dated according to the bank’s clock. There would be certain legal requirements as to how long after the transaction the money should be or can be booked in the bank. Or just take now an everyday scenario when you buy stuff over the internet. The problem If the clocks/dates are not synchronised on both sides this can create a legal issue.
Show full summary Hide full summary

Similar

Orbital Mechanics
Luke Hansford
Software Processes
Nurul Aiman Abdu
Module 1: Introduction to Engineering Materials
Kyan Clay
Mathematics
rhiannonsian
AOCS - Attitude and orbit control systems
Luke Hansford
Ordinary Differential Equations
rhiannonsian
audio electronics
Lillian Mehler
Building Structures
Niat Habtemariam
communication system
Lillian Mehler
Advanced Propulsion
Luke Hansford