07 2018 档案

摘要:Using Semaphores to Schedule Shared Resources In this scenario, a thread uses a semaphore operation to notify another thread that some condition in th 阅读全文
posted @ 2018-07-29 19:07 geeklove 阅读(236) 评论(0) 推荐(0)
摘要:Shared Variables in Threaded Programs Threads Memory Model Thus, registers are never shared, whereas virtual memory is always shared. The memory model 阅读全文
posted @ 2018-07-27 12:13 geeklove 阅读(336) 评论(0) 推荐(0)
摘要:Modern operating systems provide three basic approaches for building concurrent programs: Processes. With this approach, each logical control flow is 阅读全文
posted @ 2018-07-25 17:15 geeklove 阅读(264) 评论(0) 推荐(0)
摘要:It is important to realize that clients and servers are processes and not ma- chines, or hosts as they are often called in this context. Data received 阅读全文
posted @ 2018-07-24 18:13 geeklove 阅读(203) 评论(0) 推荐(0)
摘要:An input operation copies data from an I/O device to main memory, and an output operation copies data from memory to a device. All language run-time s 阅读全文
posted @ 2018-07-23 20:11 geeklove 阅读(334) 评论(0) 推荐(0)
摘要:Working within these constraints, the author of an allocator attempts to meet the often conflicting performance goals of maximizing throughput and mem 阅读全文
posted @ 2018-07-21 13:18 geeklove 阅读(272) 评论(0) 推荐(0)
摘要:The execve Function Revisited Suppose that the program running in the current process makes the following call: Execve("a.out", NULL, NULL); Loading a 阅读全文
posted @ 2018-07-20 13:13 geeklove 阅读(303) 评论(0) 推荐(0)
摘要:ref: https://blog.csdn.net/linhuanmars/article/details/19711387 Solution 1: time complexity O(1), space complexity O(2) or time complexity O(n+nlgn) = 阅读全文
posted @ 2018-07-13 17:19 geeklove 阅读(133) 评论(0) 推荐(0)
摘要:Linux organizes the virtual memory as a collection of areas (also called segments). An area is a contiguous chunk of existing (allocated) virtual memo 阅读全文
posted @ 2018-07-13 16:12 geeklove 阅读(626) 评论(0) 推荐(0)
摘要:Integrating Caches and VM TODO peeding up Address Translation with a TLB Many systems try to eliminate even this cost by including a small cache of PT 阅读全文
posted @ 2018-07-12 19:45 geeklove 阅读(565) 评论(0) 推荐(0)
摘要:Page Hits: CPU reads a word of virtual memory which is cached in DRAM. Page Faults(缺页): 流程: 术语: Virtual memory systems use a different terminology fro 阅读全文
posted @ 2018-07-08 15:43 geeklove 阅读(423) 评论(0) 推荐(1)
摘要:Synchronizing Flows to Avoid Nasty Concurrency Bugs an example code: void handler(int sig) { pid_t pid; while ((pid = waitpid(-1, NULL, 0)) > 0) /* Re 阅读全文
posted @ 2018-07-08 12:48 geeklove 阅读(202) 评论(0) 推荐(0)
摘要:example codes: if (errno != ECHILD) unix_error("waitpid error");//Version 4 code in purple, same with version 2 if (errno != ECHILD) unix_error("waitp 阅读全文
posted @ 2018-07-07 19:04 geeklove 阅读(305) 评论(0) 推荐(0)
摘要:A signal that has been sent but not yet received is called a pending signal. At any point in time, there can be at most one pending signal of a partic 阅读全文
posted @ 2018-07-07 12:41 geeklove 阅读(175) 评论(0) 推荐(0)
摘要:Putting Processes to Sleep The sleep function suspends a process for a specified period of time. Sleep returns zero if the requested amount of time ha 阅读全文
posted @ 2018-07-04 18:59 geeklove 阅读(238) 评论(0) 推荐(0)
摘要:Process Control Obtaining Process IDs Each process has a unique positive (nonzero) process ID (PID). The getpid function returns the PID of the callin 阅读全文
posted @ 2018-07-03 13:07 geeklove 阅读(271) 评论(0) 推荐(0)
摘要:Processes The classic definition of a process is an instance of a program in execution. Each program in the system runs in the context of some process 阅读全文
posted @ 2018-07-01 17:35 geeklove 阅读(268) 评论(0) 推荐(0)