[Fundamental] Infra and OS Flashcards

1
Q

[OS] Concurrency vs Parallelism

A

Concurrency is when two or more tasks can start, run, and be completed in overlapping time periods. It doesn’t necessarily mean they’ll ever both be running at the same instant.

Parallelism is when tasks literally run at the same time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

[OS] What is a critical zone

A

It cannot be executed by more than one process at a time. Typically, the critical section accesses a shared resource

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

[Infra] Reverse Proxy

A

accepts a request from a client, forwards it to a server that can fulfill it, and returns the server’s response to the client

  • blacklist IP
  • SSL termination
  • response compression
  • Clients only see the reverse proxy’s IP, allowing you to scale servers or change their configuration
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

[Infra] Load Balancer

A

Just like a proxy, but it has a very specific purpose:
balances inbound requests across a cluster of servers

increasing responsiveness and availability

LRU, Least Connection, Least Response Time, RR

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Process and Thread

A
  • process: an instance of a program that is being executed
  • Processes need IPC (Inter-process Communication) in order to communicate with each other.
  • Multiprocessing allocates separate memory and resources for each process or program.
  • thread: unit of execution within a process (many thread in one process)
  • thread: separating code into segments
  • Multithreading threads belonging to the same process share the same memory and resources as that of the process.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Multithreading

A

multi thread: can share variables between threads, can run in parallel in multicore processor

  • problem: race condition
  • solution: mutex lock
How well did you know this?
1
Not at all
2
3
4
5
Perfectly