Sapperton – Data-Driven Decision by Translink/Government

The talk was more so centering the questions on how government collect our transportation data and what actions they took upon doing the data analysis. It wasn’t nothing data-driven, but I still learned some interesting thing from that event.

Goals for the Translink/Government

  1. mobility: seamless integration
  2. safety: compact road
  3. affordability and fair price

Continue reading

Advertisements

Bitcoin Notes

I went to a super awesome bitcoin meetup event today. It was an introductory presentation which was perfect for a noobie like me. Anyways, here’s a short note:

  • Bitcoin was introduced by Satoshi in 2008 when market crashed
  • The purpose is to create a cash flow system that cannot be controlled by banks, government, or anyone!
  • All transactions are transparent on the blockchain
  • Wallet address
  • You cannot reverse a transaction and double confirm the account number
    • no revert even for switching between wallets
    • If you send bitcoin to account that doesn’t exist, that amount of bitcoin is lost forever!!
  • Nobody can force you to pay without your permission first
    • e.g. if you didn’t pay your tax, the government can deduct money from your bank account without your permission. This act is strictly prohibited in bitcoin world

Where to spend and buy bitcoin?

  • Bitcoin can now be used on Telsa, Virgin, Microsoft, Amazon, etc. It can also be used to purchase real estate in certain areas of U.S.
  • Bitcoin can be purchased in any amount, not necessarily a whole coin.
    • coinme.com
    • gemini.com
    • AVOID coinbase.com (should be avoided because it’s closely related to IRS and is not fully transparent with everything)
    • Bitcoin ATM: 5~10% rate

Crypto-wallets

  • blockchain (works on mobile as well as web)
  • mycelium (only works on mobile)

Three ways to earn $ on bitcoin

  1. Buy and Hold: earn appreciation
  2. Buy and Trade:  buy low sell high on other cryptocurrencies such as ripple or litecoin
  3. Buy & Compound: USI tech – BTC package
    • 1 package = USD$60

Bonus vocabulary:

  • fork: any event that causes bitcoin to dip/decrease in value

Toy R Us files for Bankruptcy

This is actually an old news back from September. It was sad to hear that such big toy company is leaving. Here are some quick highlights from an article in the Economist magazine:

  • Toy R Us was 5 billions of debts!
  • 3 private-equity firms bought the company in 2005 in a leveraged buyout causing around $400 million a year in interest
  • The company is not improving themselves (which is the key to why they fall):
    • didn’t import/sell popular toy like fidget spinners or fidget cubes
    • didn’t host any events that could attract children’s or parents’ attention
  • When Amazon was still selling books in 2000, Toy R Us joined and sell their toys on Amazon’s platform. It later (4 years after) sued Amazon for breaking “the terms of their agreement”. Though Toy R Us won, they didn’t get a lot of compensation :/

09/23: Test-and-set and performance

Caching Locks

Spin lock: to acquire a lock, a process may enter an infinite loop that keeps attempting a read-modify till it succeeds

If the lock is in memory, there is heavy bus traffic -> other processes make little forward progress

Locks can be cached (Still quite expensive):
•    Cache coherence ensures that a lock update is seen by other processors
•    The process that acquires the lock in exclusive state gets to update the lock first
•    Spin on a local copy – the external bus sees little traffic

test&set

  1. Perform test and set on P1
  2. request a lock
  3. change the state to Modify
  1. Perform test and set on P2
  2. Request state change
  3. Change the state on P1 from Modify to Invalid
  4. Change P2 state to Modify

 

Coherence Traffic for a Lock (test and test & set)

If every process spins on an exchange, every exchange instruction will attempt a write ? many invalidates and the lock value keeps changing ownership (Each thread is not going to do test and set right away)

Hence, each process keeps reading the lock value – each read does not generate coherence traffic and every process spins on its locally cached copy

When the lock owner releases the lock by writing a 0, other copies are invalidated, each spinning process generates a read miss, acquires a new copy, sees the 0, attempts an exchange (requires acquiring the block in exclusive state so the write can happen), first process to acquire the block in exclusive state acquires the lock, others keep spinning.

Test and Test and Set
Lock:

test     register, location
bnz      register, lock
t&s      register, location
bnz      register, lock
CS
St       location, #0

The performance is better because the traffic in the network gets busy only when the lock is released. For the remaining of the time, each thread will just keep spinning on their lock.

 

Reference Video

09/18 – Producer and Cosumer