随笔分类 -  计算机基础知识

本科所涉猎范围
摘要:1 #include<iostream> 2 #include<vector> 3 using namespace std; 4 5 6 struct Sort { 7 8 inline void operator()(vector<int>&vec){ 9 for (int N = vec.siz 阅读全文
posted @ 2020-10-16 10:04 世界を変える御宅族 阅读(178) 评论(0) 推荐(0)
摘要:1. First, write a simple program called null.c that creates a pointer to an integer, sets it to NULL, and then tries to dereference it. Compile this i 阅读全文
posted @ 2020-07-09 17:58 世界を変える御宅族 阅读(350) 评论(0) 推荐(0)
摘要:2. Now, run free, perhaps using some of the arguments that might be useful (e.g., -m, to display memory totals in megabytes). How much memory is in yo 阅读全文
posted @ 2020-07-02 00:16 世界を変える御宅族 阅读(249) 评论(0) 推荐(0)
摘要:1. Compute the solutions for simulations with 3 jobs and random seeds of 1, 2, and 3. siuwhat@siuwhat-PC:~/Desktop/HW-Lottery$ ./lottery.py -j 3 -s 1 阅读全文
posted @ 2020-07-01 18:19 世界を変える御宅族 阅读(179) 评论(0) 推荐(0)
摘要:1. Run a few randomly-generated problemswith just two jobs and two queues; compute the MLFQ execution trace for each. Make your life easier by limitin 阅读全文
posted @ 2020-06-26 15:31 世界を変える御宅族 阅读(138) 评论(0) 推荐(0)
摘要:1. Compute the response time and turnaround time when running three jobs of length 200 with the SJF and FIFO schedulers. 没区别, 响应时间 周转时间 等待时间 1 0 200 0 阅读全文
posted @ 2020-06-23 23:26 世界を変える御宅族 阅读(420) 评论(0) 推荐(0)
摘要:测试上下文时间 Homework (Measurement) ASIDE: MEASUREMENT HOMEWORKS Measurement homeworks are small exercises where you write code to run on a real machine, i 阅读全文
posted @ 2020-06-23 13:14 世界を変える御宅族 阅读(381) 评论(0) 推荐(0)
摘要:1. Write a program that calls fork(). Before calling fork(), have the mainprocess access a variable (e.g., x) and set its value to something (e.g., 10 阅读全文
posted @ 2020-06-12 13:28 世界を変える御宅族 阅读(496) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-05-10 23:20 世界を変える御宅族 阅读(167) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-05-06 19:59 世界を変える御宅族 阅读(140) 评论(0) 推荐(0)
摘要:Linux描述符表和描述符高速缓存 (摘自http://hengch.blog.163.com/blog/static/107800672009028105929795/)推荐对DOS感兴趣的看一下他的博客 在80x86的CPU里,描述符的概念实在是太重要了。 在实模式下,大家都知道物理地址是由段地 阅读全文
posted @ 2020-05-03 16:49 世界を変える御宅族 阅读(274) 评论(0) 推荐(0)
摘要:看csapp时候,看一下char*[8],以为char*也是一字节,但是指针是地址,64位编译器下是8字节,所以sizeof(B)是64字节 后来又看strlen()。 1 #include"stdio.h" 2 #include"string.h" 3 int main(void){ 4 char 阅读全文
posted @ 2020-02-05 18:30 世界を変える御宅族 阅读(627) 评论(0) 推荐(0)
摘要:今日遇到一个报错如下: No enclosing instance of type test is accessible. Must qualify the allocation with an enclosing instance of type test (e.g. x.new A() wher 阅读全文
posted @ 2020-01-08 08:35 世界を変える御宅族 阅读(516) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-12-08 15:30 世界を変える御宅族 阅读(1247) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-11-29 21:28 世界を変える御宅族 阅读(187) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-11-24 08:03 世界を変える御宅族 阅读(277) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-11-23 08:26 世界を変える御宅族 阅读(261) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-11-17 18:12 世界を変える御宅族 阅读(818) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-11-16 22:09 世界を変える御宅族 阅读(222) 评论(0) 推荐(0)
摘要:计算机操作系统锁机制. 在多线程编程中,操作系统引入了锁机制。通过锁机制,能够保证在多核多线程环境中,在某一个时间点上,只能有一个线程进入临界区代码,从而保证临界区中操作数据的一致性。 所谓的锁,可以理解为内存中的一个整型数,拥有两种状态:空闲状态和上锁状态。加锁时,判断锁是否空闲,如果空闲,修改为 阅读全文
posted @ 2019-11-14 10:28 世界を変える御宅族 阅读(908) 评论(0) 推荐(1)