ECF Signal

shell signals sent from the kernel to process info: sig id and the fact that it arrived 2 SIGINT user typed ctrl-c 9 SIGKILL 11 SIGSEGV: seg fault 17 SIGCHLD, child stopped Sending a Signal Kernel sends a signal to destination process by setting some state in the context of the dest process (nothing happens except some bits changed in the context, no immediate impact) Kernel sends by two reasons: it detects some event happens, seg-fault, divide-by-zero, etc....

November 13, 2022

Notes on Sleep

I used to think sleeping is a waste of time, but sleeping is just as productive and important as we do throughout the day. If you are going to be successful, you got be willing to give up sleep. -Eric Thomas, from his speech I watched this video while I was in school, and really thought he was right. I slept only 2 hours before our final match in RoboCup, but lose by mis-spelling a variable in our python script and our robots just hangs because the python runtime keeps throwing exception because of undefine variable....

November 13, 2022

Substrate Weight

blockchain has limited resource limited window per producer limited amount of data per block: MaximumBlockLength given MaximumBlockWeight and weight of extrinsic in the tx pool, we select the set of extrinsic to saturate the block, while not exceeding the limit weight system for developer to tell the block production process how heavy an extrinsic is e Fees total_fee = base_fee + length_fee + weight_fee

November 12, 2022

ICS-CMU notes: Lec 14: ECF Exceptions & Processes

Exceptional Control Flow: Exceptions and Processes Control flow branch and jumps => program state can’t react to changes in system state event outside the system: data from disk, keyboard input, network adapter instruction divides by zero timer expires … Exceptional Control Flow ubiquitous at all level of computer system Asynchronous Exceptions (Interrupts) processor’s interrupt pin example: Timer interrupt used by kernel I/O interrupt Synchronous Exception Traps Intentional Example: system call, looks like a call, but in fact transferring control to the kernel Faults...

November 12, 2022

consciousness

Consciousness, cognition and memory are the most precious resources for human beings. But most of us waste them unconsciously, without knowing that they are not infinite resources, they are bounded by our life, or time. That I’m writing this post using visual studio code, hhkb keyboard, viewing on a aoc monitor with a x86 computer running an intel 12th-gen i7 cpu, all of this is a miracle. But most of the time, we didn’t recognize it....

November 11, 2022

ICS-CMU notes: Lec13 Linking

Linking todo add markmind automatically why modular .. ELF Object File Format ELF header Segment header table .text: should be .code, named for historical reason .rodata: read only data, separating the HEAP into two parts. .data: initialized global data .bss: block starting symbol, un-initialized global(static) data, .symtab: symbol table .rel.text, .rel.data: hints for the linker? .debug: debug symbols, line numbers, etc. Section header table Linker Symbols Global: non-static func & var External: refer symbols defined in other modules Local: static var & func, C’s private, information hiding, abstraction Linking Step 1: Symbol Resolution find where is the symbol we’re referencing...

November 11, 2022

Hello World

It sucks, but Ok();

November 11, 2022