My Faults My Own

…beleaguered by the same

negation and despair,

show an affirming flame.

IN WHICH Ross Rheingans-Yoo, a sometimes-poet and erstwhile student of Computer Science and Math, oc­cas­ion­al­ly writes on things of int­erest.

Reading Feed (last update: October 15)

A collection of things that I was happy I read. Views expressed by linked authors are chosen because I think they're interesting, not because I think they're correct, unless indicated otherwise.


(15)

Blog: Marginal Revolution | Is the World Bank lending too much to China? — "As I understand it, the World Bank makes money on these loans and there is a cross-subsidy of other Bank activities, most of all aid. A World Bank that stopped such loans would be poorer and less skilled, and over time could devolve into one of the poorer, less effective poverty-fighting parts of the United Nations, without much of a political power base at that."


(14)

Blog: Marginal Revolution | Blade Runner 2049 (some Straussian spoilers) — "It hardly makes any concessions to the Hollywood vices of this millennium and indeed much of the Tysons Corner

READ MORE

[Meta] My Faults My Own is now (happily) hosted by Digital Ocean

discount code: If you sign up for Digital Ocean with my referral link, you get $10 of credit and I get $25 of credit after you've spent your first $25. This link should be good indefinitely, and I'm getting no compensation for this review.


Amongst all of the large transitions happening in my life about now, I found it necessary to move my blog server from "some borrowed machine on the Harvard network" to a real-adult location, like "the cloud". After asking a few friends for recommendations, I decided to rent server time from Digital Ocean, at least as a stopgap measure until the end of the summer, when I'd be able to pick out my own internet plan.

I'm glad to report that I couldn't be happier with DO's service. Spinning up a new virtual server and migrating Faults to it was probably the easiest piece of system

READ MORE

[CS161] The Classic CV Error

This is a very technical post, largely for the benefit of the students of CS161: Operating Systems, for which I am a Teaching Fellow this semester. It may be useful to you if you're interested in operating systems for some reason, but if you're not in a CS mood today, maybe just move along.

From what I've seen as a TF for this course, it is very, very normal to write condition-variables code that looks like this:
struct cv {  
    struct semaphore *sem;
    volatile int waiters;
}

void cv_wait(struct cv *cv, struct lock *lock) {  
    KASSERT(lk_do_i_hold(lock));

    cv->waiters++;
    lk_release(lock);
    P(cv->sem);
    lk_acquire(lock);
}

void cv_broadcast(struct cv *cy struct lock *lock) {  
    KASSERT(lk_do_i_hold(lock));

    for (; cv->waiters > 0; cv->waiters--)
        V(cv->sem);
}
This code is wrong (or, more specifically, badly synchronized). And it is such a common
READ MORE

[CS161] On Scheduling

This is a very technical post, largely for the benefit of the students of CS161: Operating Systems, for which I am a Teaching Fellow this semester. It may be useful to you if you're interested in operating systems for some reason, but if you're not in a CS mood today, maybe just move along.

Why Do We Schedule, Master Bruce?

A scheduler, as you know, is responsible for determining which threads run, for how long, and in what order. As much as possible, it should give the shared illusion that each process is running constantly to completion, using the entire processor. To this end, there are three major desiderata:

  • That interactive threads (in particular, user-interactive threads) are responsive.
  • That no process starves.
  • That the system, on average, runs quickly.

These high-level desiderata factor into the low-level conditions that:

  • Threads which block expecting a response are rescheduled promptly after waking.
  • Time
READ MORE
1 / 1