0%

In previous memos, I briefly mentioned that read() and write() functions in libc are wrappers of system call read and write. Note that they are very different animals not to be confused. In short, libc functions provide a higher-level interface for common programming tasks, while system calls offer direct access to kernel services and are used for privileged operations.

System calls, also known as syscalls, enable applications to request services and resources from the operating system. By invoking specific system calls, applications can perform operations such as file I/O, process management, memory allocation, and hardware interaction. System calls facilitate privileged operations by transferring control from user mode to kernel mode, where the operating system handles the requested tasks.

Read more »

The C standard library, often referred to as libc, is a standard library for the C programming language. It provides a collection of functions and macros that are widely used in C programs. The functions mentioned in this memo series, such as printf, strcpy, and memmove, are part of the libc.

Read more »

As a C programmer, debugging memory issues can be one of the most frustrating tasks. When your code is dealing with memory, the slightest mistake can cause your program to crash or produce unexpected results. Therefore, it is crucial to be equipped with handy tools and techniques to effectively and elegantly debug memory issues.

In this memo, I will cover some tips and tricks for troubleshooting 90% of memory issues in C for the CSCI 4210 Operating System, based on my observation as a TA/mentor over semesters.

Read more »

每个人在每个领域里想要获得源源不断的内驱力,都该找到自己的三驾马车。

观察

成就霸权的三驾马车:军事,科技与金融。在这种三要素驱动的模型中,其中任意一个因素均受益于其他两者的进步

三驾马车提供源源不断的强大内驱力,且整体不会由于单个因素暂时受阻而停滞不前,因此相比于双要素驱动(例如,教学相长)稳定性更胜一筹。

三驾马车的本质是三要素之间相互叠加的杠杆带来的规模效应。

Read more »