principles - modrpc/info GitHub Wiki

Table of Contents

System Modeling

Abstract Data Type

  • Life cycle of "data": you have to be able to create, delete, update
  • Who encloses "life cycle"? Be a good which can look over the "lives" of data. Depending on the module, data can exist only during "program execution" or it can persist across "program execution". In the latter, you should model the "program execution" itself.

Policy vs Mechanism

  • Unix gives all primitives (basis) upon which to build anything

Separation of Concerns

  • AKA: Preprocessing

Preprocessing

Abstraction

Barriers

  • EXAMPLE: Compiler IR (m-t-n => m-to-1 + 1-to-n)

Problem Reduction

  • PXP: MIMD problem to SIMD (Data Parallel)

Divide and Conquer

Add Dimension

  • SPACIAL vs TEMPORAL

Performance

Metrics

  • Latency
  • Bandwidth

Cache

  • WHY: Use faster technology to hide latency of slower technology
  • TODO: Maintain consistency between cache and disk

Exploiting Concurrency

Exploiting Parallelism

Data Parallelism

Regularity

Pipelining

  • Overlap Statges -- SPATIAL to TEMPORAL

Speculation

  • WHAT: Rather than waiting for result, do something (even if it may not be
  used)

Prefetching

Pipelining

Load balancing

Replication

  • Let two resources do the same thing and pick the faster result
  • TODO: Make the operation ideempotent

Sharing

MUXing

  • Sharing is essentially MUX'ing

Virtual Resources

  • Give a user illusion that they own the resource himself
  • EXAMPLE: Virtual memory (map address space into one physical mem)
  • HOWTO:
    • Break the shared resource into small elements
    • Use per-user table into shared resource

Fault Tolerance

Replication for Robustness

  • EXAMPLE: Replicated State Mahcines (RSM)

전산학 산책

오랜 시간 후에 얻게된 작은 깨달음들의 모음

알고리즘

  • Sorting vs Paging: online vs offline

시스템

  • Where is the wheel?

Trade off

Pipelining

Level of abstractions

Tables, tables, tables

Locality

Synchronization

Cache behavior

Time-Space tradeoff

    • 시간을 아끼든지, space를 아끼든지
    • EDA example: resource을 duplicate함으로써 시간을 줄일수 있다 (fanin cone copy)
    • Backend scheduling을 예로

Self-added constraints

  • clocks vs async circuits
  • clock을 통해 constraint를 줌으로써 문제를 단순화

기타 (from Wunderlist)

  • interpreter vs compied lang; 어디서부터가 "runtime"인지 어디부터가 lower-level인지
  • environment/context/etc.
  • myth hand-written assembly vs compiler : baduk; 완력 vs 이론;
  • Coroutine vs Threads
  • reflective tower. UVM example -- what's native and what is on top of that?
  • class Monitor vs class Monitor : pub Component (UVM extra layer)
  • 변수와 상수; 왜 functional programming에서 side-effect store를 표시하는게 힘든가
    • 수학은 주어진 특정 시간에서의 props; programming은 시간을 따라 변화하는 상황
  • who is the master; two peers; one master the other slave -- run vs tbrun where to put the master? (faster one)
  • polling vs interrupts
    • 그러나 underneath에서는 모두 polling 뿐이다.

kernel 동작 원리

  • 왜 concurrency가 중요한지

Asynchonous Programming

  • web server를 고려
  • single-process의 경우 blocking server의 문제점
  • 해결책은 "event loop" (see Bluetooth Programming book)
    • 하나의 event만 기다리지 말고, 모든 event를 기다리고, 이 event에 따라 다른 처리
    • state machine
    • CAR Hoare의 guarded command 참고
  • 또는, verilog 식으로 multiple process들; 각 process하나는 잘 정의된 독립된 기능
    • 이경우, process간의 communication이 문제가 됨
⚠️ **GitHub.com Fallback** ⚠️