Top Banner
with our tiny.magic.wands Unix Magic
12

Leverage from Unix abstractions

Apr 13, 2017

Download

Documents

Kaji Bikash
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Leverage from Unix abstractions

with our tiny.magic.wands

Unix Magic

Page 2: Leverage from Unix abstractions

Unix Detour - Abstraction USER-land vs KERNAL-land

Page 3: Leverage from Unix abstractions

Unix Detour - Abstraction USER-land vs KERNAL-land contd.

Page 4: Leverage from Unix abstractions

Unix Detour - AbstractionSignals/System calls

JUST LIKE AN API

SIGNALS + SYSCALLS

Page 5: Leverage from Unix abstractions

Unix Detour - AbstractionsExecution Existence aka Process

INIT is the mother of all

Page 6: Leverage from Unix abstractions

Unix Detour - Abstractions Everything is a file

Biggest abstraction pulled over your eyes by the unix

The trick is to provide a common abstraction for all of these resources, each of which the UNIX fathers called a “file”. Since every “file” is exposed through the same API1, you can use the same set of basic commands to read/write to a disk, keyboard, document or network device.

2 key takeaways:

In UNIX everything is a stream of bytesIn UNIX the filesystem is used as a universal name space

Page 7: Leverage from Unix abstractions

DEMO

Page 8: Leverage from Unix abstractions

Toolchain Get your hands dirty

Page 9: Leverage from Unix abstractions

Process Monitoring

HTOP TOP WATCH

Page 10: Leverage from Unix abstractions

Log Monitoring

TAIL LESS GREP

Page 11: Leverage from Unix abstractions

Terminal multiplexing

SCREEN

Page 12: Leverage from Unix abstractions

Implementation in our EC2