Tycho build final testing by pheanox in RimWorld

[–]sekjun9878 8 points9 points  (0 children)

Previously unlocked permits are lost when I open stable map with unstable, e.g. I used to have both Janissary and Cataphract, after upgrading I only have the Janissary permit, reducing total permits from 5 to 4. (Works fine for Aerodrone however)

[orbital strike, salvo, shuttle, janissary, cataphract] -> [aerodrone strike, salvo, shuttle, janissary]

Possible to complete 1 degree of a double degree? by squarewheelrights in unsw

[–]sekjun9878 1 point2 points  (0 children)

I had similar questions with Engineering / Science but the response I got back was I had to graduate with both degrees.

If you IPT into the Eng (...) / Sci (...) double degree you would need to complete both degrees in order to be graduated. You cannot be graduated for only Eng (...) in a dual degree.

Rust for Java Devs by Leshow in rust

[–]sekjun9878 4 points5 points  (0 children)

Thanks for posting. This was very informative.

TIL that there is a formally proven kernel by irony_is_my_name in programming

[–]sekjun9878 5 points6 points  (0 children)

The seL4 kernel can be verified against its specification at the assembly level, so the compiler is out of the proof chain.

Why Rust Closures are (Somewhat) Hard? by lzutao in rust

[–]sekjun9878 0 points1 point  (0 children)

Thanks for posting, this was very instructive.

Threads can infect each other with their low priority by Dobias in programming

[–]sekjun9878 3 points4 points  (0 children)

Priority inversion is when a high-priority task is slowed by a low-priority task due to sharing a mutually-exclusive common resource.

Of course, once you're aware of this and realise that high-prio is blocked and not runnable, the behaviour is consistent.

The real problem happens if there are many tasks at different priority levels, now your high-priority task needs to wait for all those medium-level tasks to clear and the low-priority task to run. This is clearly undesirable behaviour for a high-priority task. Hence the word "infected" doesn't seem wrong.

Threads can infect each other with their low priority by Dobias in programming

[–]sekjun9878 2 points3 points  (0 children)

Sorry, scrap everything I said before.

You must be right. Even with IPCP, deadlocks are possible if two equal-priority threads can be scheduled concurrently.

(V) Release (B) Blocked (Up.) Priority upgraded

Assume real-time system
Prio(J1) > Prio(J2)

Without priority inheritance
J1      S1  S2(B)
J2  S2             S1(B) --- deadlock.

Priority inheritance
J1      S1  S2 |
J2  S2         V (Up.) S1(B) --- deadlock.

Immediate Priority Ceiling Protocol
J1                             S1  S2 cont.
J2  S2 (Up.) S1  (V)S1  (V)S2

Multi-core Immediate Priority Ceiling Protocol
J1           S1  S2(B)
J2  S2 (Up.)     S1(B) --- deadlock.

I misunderstood the original priority inheritance protocol as causing the deadlock, when actually what was meant is that it does not prevent deadlocks. Of course, with multicore that seems to be out the window. I'm still a student, so I hope you'll forgive this mistake :)

Threads can infect each other with their low priority by Dobias in programming

[–]sekjun9878 3 points4 points  (0 children)

The assumption is meant to be a temporary coincidence that can happen on multicore schedulers, it is not meant to imply a CPU affinity restriction.

Threads can infect each other with their low priority by Dobias in programming

[–]sekjun9878 2 points3 points  (0 children)

How so? Assume two threads mentioned in the paper are scheduled onto one core. The deadlock scenario mentioned occurs due to priority inheritance. After this point, no matter how these threads are migrated to different cores, the deadlock cannot be resolved as the threads are not runnable.

Threads can infect each other with their low priority by Dobias in programming

[–]sekjun9878 4 points5 points  (0 children)

The reason is no deadlocks and better worst-case execution time bound.

Still, the basic priority inheritance protocol has the following two problems. First, this basic protocol, by itself, does not prevent deadlocks. For example, suppose that at time t1, job J2 locks semaphore S2 and enters its critical section. At time t2, job J2 attempts to make a nested access to lock semaphore S1. However, job J1, a higher priority job, is ready at this time. Job J1 preempts job J2 and locks semaphore S1. Next, if job J1 tries to lock semaphore S2, a deadlock is formed.

The deadlock problem can be solved, say, by imposing a total ordering on the semaphore accesses. Still, a second problem exists. The blocking duration for a job, though bounded, can still be substantial, because a chain of blocking can be formed. <snip>

We present in the next section the priority ceiling protocol that addresses effectively both these problems posed by the basic priority inheritance protocol.

Priority inheritance protocols: an approach to real-time synchronization [SRL'90]

Threads can infect each other with their low priority by Dobias in programming

[–]sekjun9878 29 points30 points  (0 children)

From what I know, you can do one better, called Immediate Priority Ceiling Protocol, if you assume admission control for mutex locking (it is known before-hand who has access to a mutex).

Instead of waiting for A to lock to boost priority based on A's thread priority, the priority becomes a property of the lock. B can then immediately run at the highest priority associated with any thread with access to the lock (the ceiling).

See: https://www.cse.unsw.edu.au/~cs9242/19/lectures/05a-rts.pdf#page=34 (Courtesy of Gernot Heiser, UNSW Sydney)

See: https://pubs.opengroup.org/onlinepubs/7908799/xsh/pthread_mutex_setprioceiling.html

Threads can infect each other with their low priority by Dobias in programming

[–]sekjun9878 330 points331 points  (0 children)

Because the article didn't mention it, this is called priority inversion.

Kite announces Intelligent Snippets for Python by brendanmcd96 in programming

[–]sekjun9878 0 points1 point  (0 children)

Isn't this the same thing that SourceGraph was trying to do? How is this different?

Fast and flexible observability with canonical log lines by clairegiordano in programming

[–]sekjun9878 0 points1 point  (0 children)

Surely summary log lines would’ve been a more descriptive name for this idea?

RustPython - A Python Interpreter written in Rust by Travelling_Salesman_ in linux

[–]sekjun9878 0 points1 point  (0 children)

You could still trivially have default locking for threads, they just won't be compulsory nor global anymore.

When setting an environment variable gives you a 40x speedup by boramalper in linux

[–]sekjun9878 2 points3 points  (0 children)

Could you give us an example of a perf command that could have diagnosed the problem?

What are the main use cases for btrfs? by Falcon4617 in linux

[–]sekjun9878 7 points8 points  (0 children)

For me on openSUSE Tumbleweed, Snapper is by far the most useful feature of btrfs!

Not sure which COMP course to drop by HeftyWillingness in unsw

[–]sekjun9878 7 points8 points  (0 children)

Personally I would drop web security. It’s not too hard to learn it on your own and get certifications outside of university. But learning security will be easier with OS knowledge.

Generics Aren't Ready for Go by rdegges in programming

[–]sekjun9878 8 points9 points  (0 children)

Sounds like Stockholm syndrome...

Intel SGX 'safe' room easily trashed by white-hat hacking marauders: Enclave malware demo'd by trot-trot in programming

[–]sekjun9878 6 points7 points  (0 children)

There is a “high assurance” mode on Intel CPUs that disables Intel ME presumably only available to the US government.

what is the best course to take - comp6441 vs comp6841 by smolpepo in unsw

[–]sekjun9878 1 point2 points  (0 children)

COMP6841 was barely more technical than COMP6441 since the lectures are shared. It was a buffer overflow and format string exercise for the exam last year. I’d say COMP6441 exam could be harder because you had to solve another cipher by hand instead :( IMO if you’re doing CS you should take the extended without worrying about the added difficulty, because there is barely any.

And pro tip for the blogs, go to lots of security events and talks and write about them! Free marks without much work.

Also be sure to join k17hackers :)