调度器完成以下任务: 时钟中断(或类似的定时器)时间内刷新进程的时间片,设置进程调度标志 系统调用返回或中断完成时检查调度标志 schedule函数 内核代码中完成进程调度的函数为schedule(),该函数中包含以下调用: put_prev_task(rq, prev); next = pick_ ...
分类:
系统相关 时间:
2018-05-16 20:44:42
阅读次数:
222
cherry pick 可以局部代码合并。 cherry pick不仅可以用在不同分支之间,还可以用在同一个分支上。 比如说你在某一个向某个分支中添加了一个功能,后来处于某种原因把它给删除了,然而后来某一天你又要添加上这个功能了, 这时候就可以使用cherry pick把添加那个功能的commit, ...
分类:
其他好文 时间:
2018-05-16 13:00:31
阅读次数:
154
[抄题]: Given an array of integers with possible duplicates, randomly output the index of a given target number. You can assume that the given target nu ...
分类:
其他好文 时间:
2018-05-16 12:59:59
阅读次数:
127
POJ_2653_Pick-up sticks_判断线段相交 Description Stan has n sticks of various length. He throws them one at a time on the floor in a random way. After finis ...
分类:
其他好文 时间:
2018-05-10 11:16:01
阅读次数:
151
https://leetcode.com/problems/random-pick-index/description/ Reservoir Sampling ...
分类:
其他好文 时间:
2018-05-06 16:28:32
阅读次数:
118
10 free hours run on AWS click this one click on new machine pick a region choose linux ubuntu 16 250GB is preferred ctrl shift v to paste your passwo ...
分类:
其他好文 时间:
2018-05-05 19:42:32
阅读次数:
309
蓄水池抽样——《编程珠玑》读书笔记 382. Linked List Random Node 398. Random Pick Index 蓄水池抽样——《编程珠玑》读书笔记 382. Linked List Random Node 398. Random Pick Index 问题:如何随机从n个 ...
分类:
编程语言 时间:
2018-04-30 13:37:33
阅读次数:
283
[抄题]: Given m arrays, and each array is sorted in ascending order. Now you can pick up two integers from two different arrays (each array picks one) a ...
分类:
编程语言 时间:
2018-04-23 00:12:44
阅读次数:
193
给定一个可能含有重复元素的整数数组,要求随机输出给定的数字的索引。 您可以假设给定的数字一定存在于数组中。注意:数组大小可能非常大。 使用太多额外空间的解决方案将不会通过测试。示例:int[] nums = new int[] {1,2,3,3,3};Solution solution = new ...
分类:
其他好文 时间:
2018-04-16 11:06:30
阅读次数:
160
题目大意:给定一系列线段,以及放在平面上的顺序,给出没有被其他覆盖的线段。 解题关键:线段相交的判断。 满足两个条件即可:快速排斥实验、跨立实验。 ...
分类:
其他好文 时间:
2018-04-06 18:36:09
阅读次数:
143