Sunday, February 23, 2020

Processes on Linux

Process ID Description:
0 The Scheduler
1 The init process
2 kflushd
3 kupdate
4 kpiod
5 kswapd
6 mdrecoveryd

(https://unix.stackexchange.com/questions/83322/which-process-has-pid-0

Saturday, February 22, 2020

Linux Networking


I got this picture from https://epickrram.blogspot.com/2016/05/navigating-linux-kernel-network-stack.html?m=0, and the idea is that this is how the interaction between the network card and the driver running on on the CPU (in the interrupt handler?) works. The kernel module copies into a buffer called skbuff, which looks like this:
https://opensourceforu.com/2016/10/network-performance-monitoring/ and the kernel populates (copies) the data into the sk_buff data structure which look like this:

Go to this link for some deep dive on Raw sockets: https://packetstormsecurity.com/files/72743/SOCK_RAW-Demystified.html

Wednesday, February 5, 2020

Concurrency Control

Paraphrasing https://vladmihalcea.com/how-does-mvcc-multi-version-concurrency-control-work/

In Concurrency Control theory, there are two ways you can deal with conflicts:
  • You can avoid them, by employing a pessimistic locking mechanism (e.g. Read/Write locks, Two-Phase Locking)
  • You can allow conflicts to occur, but you need to detect them using an optimistic locking mechanism (e.g. logical clock, MVCC) - this is essentially that same concept of "tokens" I was previously exposed to in the context of distributed locks. 

Tuesday, February 4, 2020

Java

Some links that I am collecting to understand Java better.


Some dependency injection frameworks
  • Guice: I liked this quick video which shows the basic ideas of Guice - modules and "injecting" dependencies into the global map of sorts using BIND, so that later we can use the appropriate class as needed. https://www.youtube.com/watch?v=fe1n8VIXZ-k 

Build Tools: