GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

Semaphores/Sockets

Tom David Englisch

Semaphores/Sockets

Inhalt der Mindmap

Semaphores/Sockets

  1. Concurrency = Processes executed simultaneously ie. several apps running on one machine

  2. Issue? - Uncontrolled access to shared data ie. this may allow two people to book the same tickets at a concert

  3. To combat this? - Only one process allowed in the critical section at any one time

  4. Processes compete for the same, shared, resources - Without synchronisation unpredictable and incorrect executions can result

    • Synchronisation = Mutual exclusion of any process not in the critical section
      • Synchronisation is implimented by the use of Semaphores
        • Semaphores = An object with methods Called by processes sharing a resource
          • There are two types of semaphores Binary semaphore, either 0 or 1 that is essentially a flag to signal when using critical region OR Counting semaphore, > 1 Basic implementation every process issues a wait on entering critical section and Signal finished on exiting
            • See producer/consumer problem
  5. A socket is an endpoint for communication

  6. Two communicating processes over a network each use a socket to identify them

  7. Socket defined by port number and ip address

  8. How does this work? - Client-server architecture A server listens for client requests When a request is received the server uses the socket details to set up a connection.

  9. More... - Well-known services: telnet:23, ftp:21, http:80 --- All ports below 1024 are considered well-known --- The client will allocate the port number to the process initiating communication --- Random port greater than 1024.

Bilder und Dateien der Mindmap

  • Semaphores/Sockets
  • Semaphores/Sockets

Informationen

Beschreibung
Mindmap am Semaphores/Sockets, erstellt von Tom David am 20/05/2015.
Erstellt von
Tom David
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck