Processes

An introduction to distributed processes

18 March 2020

Obed N Munoz

Cloud Software Engineer

Agenda

2

Threads

Threads are a key element of distributed systems in order to take advantage of the multicore and multiprocesses environments we have in modern computers. It will also provide proper mechanisms for defining client-server architectures.

They provide a finer granularity in the form of multiple threads per process in order to get better performance.

A thread context often consists of nothing more than the processor context, along with some other information for thread management.

The communication is simpler than processes, mainly because they can have shared memory while processes require various modes of IPC (Inter-Process Communications) like semaphores, message queues, pipes and others.

3

Virtualization

There's an illusion of parallelism on single CPU machines. We can see some kind of parallelism between threads and processes in our modern computers, that's why we're able to have many applications running in our computers.

By rapidly switching between threads and processes, the illusion of parallelism is created.

This separation between having a single CPU and being able to pretend there are more can be extended to other resources as well, leading to what is known as resource virtualization.

4

Virtualization: Princliples

In practice, every (distributed) computer system offers a programming interface to higher-level software, as shown in Figure 3.6(a).

In its essence, virtualization deals with extending or replacing an existing interface so as to mimic the behavior of another system, as shown in Figure 3.6(b).

5

Virtualization: Types 1/3

Computer systems generally offer four different types of interfaces, at three different levels:

6

Virtualization: Types 2/3

7

Virtualization: Types 3/3

8

Virtualization: Let's discuss about performance

Let's talk about the following questions/topics:

9

Virtualization: Cloud Computing 1/2

From the perspective of distributed systems, the most important application of virtualization lies in cloud computing. Below a list of the common virtualized services that are being offered in Cloud Computing:

10

Virtualization: Cloud Computing 2/2

11

Clients: Networked user interfaces

A common use case for clients is to provide the means for users to interact with a remote server. Below a chart with the 2 types of interaction that can be supported.

12

Clients: Example - The X Window System

13

Servers

A server is a process implementing a specific service on behalf of a collection of clients.

- 80   - HTTP
- 433  - HTTPS
- 22   - SSH
- 3306 - MariaDB / MySQL Databases
- 5900 - VNC
* More examples at https://www.ietf.org/rfc/rfc1700.txt?number=1700
14

Servers: Contacting Servers

15

Servers: How to deal with server's interruptions?

Let's disss the following questions:

16

Servers: Stateless vs Stateful

Let's discuss:
List the pros and cons of the following server implementations:

- Stateless Server
  - Fully stateless
  - Soft stateless
  
- Stateful Server
  - Session State
  - Permanent State
17

Servers: Example - Apache HTTP Server

18

Servers: Example - 3-tiered server cluster

19

Resources

This material is genereated thanks to some extracts from the following resources:

20

Thank you

Obed N Munoz

Cloud Software Engineer

Use the left and right arrow keys or click the left and right edges of the page to navigate between slides.
(Press 'H' or navigate to hide this message.)