GoConqr has a new look! Let us know what you think.

Flashcards

DS

Martin Myhrman Engineering English 36 cards

DS

Cards in this deck (36)

  1. 1Can 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
  2. 2Is Shared Memory a fast process?It is fast if done locally, and because of simultaneous read can be very efficient in terms of algorithmics
  3. 3What is Synchronisation / Mutal exclusionIt 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.
  4. 4What 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.
  5. 5Is Message passing delay incurring or not?It is typically delay incurring.
  6. 6Can, so-called, dead-locks occur in Message Passing?Yes even though synchronization is implicit
  7. 7What type of system would you use if you would only want to receive certain(classes of) messages?Publish/Subscribe systems
  8. 8What 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.
  9. 9What 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.
  10. 10What 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.
  11. 11Explain the scheme for Synchronous interactionThe scheme then:
    Make a call/request
    Wait for the execution
    Receive the result
    Possibly with a timeout
  12. 12Explain the scheme of Asynchronous InteractionThe 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
  13. 13If you compare TCP and UDP to synchronous and asynchronous. Which one which?TCP is synchronous
    UDP is asynchronous
  14. 14What 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.
  15. 15Why 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.Why is it bad to have this approach when dealing with synchronization: counter = counter + 1?
  16. 16What 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.
  17. 17Expalin these words: Destination, Socket, Ports, AddressDestination:
    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)
  18. 18What risk does Omission failures refer to within UDP?packets are not guaranteed to be delivered, nor are
    acknowledged
  19. 19Define 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.”
  20. 20What does "External data represenetation" mean?Something that “everyone” understands
  21. 21What is an Tagging interface?An interface for the purpose of its own existence. That is, it does not declare any methods!
  22. 22What 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
  23. 23What 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
  24. 24Explain the Map-reduce process1.
    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.
  25. 25What does Atomicty mean?Atomicty means that either you update everything or nothing.
  26. 26Give a few examples of failures that can occur with Concurrent AccessFor 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
  27. 27What 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
  28. 28How 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.
  29. 29What 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.
  30. 30Explain Strict two-phase lockingTo 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.
  31. 31Give me two real life examples of locking on concurrencyYour 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.
  32. 32What 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.
  33. 33What is Sawzall?Sawzall is a higher-level language for Google’s Map-Reduce.
  34. 34What 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.
  35. 35What 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.
  36. 36Why 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.

Information

Description
Engineering Flashcards on DS , created by Martin Myhrman on 07/01/2019.
Created by
Martin Myhrman
Views
36
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?