There is no commentSelect some text and then click Comment, or simply add a comment to this page from below to start a discussion.
OS hw1
1 Further study on process switching
Timer Interrupt is a non-cooperative approach to enforce process scheduling. To achieve this, the operating system relies on a hardware timer to generate periodic interrupts, which trigger process switching. When the timer interrupt occurs, the currently running process is halted, and control is transferred to the OS (kernel). And the scheduler determines whether the current process should continue or if another process should run. If a new process is selected, the OS saves the context (registers, program counter, stack pointer) of the current process and loads the context of the next process.
2 Basic concepts of terminal and shell
Image Not ShowingPossible Reasons
The image was uploaded to a note which you don't have access to
The note which the image was originally uploaded to has been deleted
I use tmux to seperate the terminal. 2. The process is managed by the OS, not the terminal itself. Therefore, we can kill any process run on the OS in different terminal.
3 Learning from the Linux man pages
Image Not ShowingPossible Reasons
The image was uploaded to a note which you don't have access to
The note which the image was originally uploaded to has been deleted
The third line can reflect individual CPU state percentages. As a default, percentages for these individual categories are displayed. Depending on your kernel version, the st field may not be shown.
us: is meaning of user CPU time, such as applications. When us is high, it indicates that user programs are heavily utilizing the CPU.
sy: is meaning of system CPU time, such as system calls and drivers. When sy is high, it means that system calls are consuming a significant portion of CPU time.
id: is meaning of idle. When id is low, it suggests that the CPU is under high load with little to no idle time.
Screenshot showing that the error happended. We can add the O_EXCL flag to trigger the error happened when the file already exists. According to the manual:
Image Not ShowingPossible Reasons
The image was uploaded to a note which you don't have access to
The note which the image was originally uploaded to has been deleted