进程的管理与调度
进程管理
进程描述符及任务结构
进程存放在叫做任务队列(tasklist)的双向循环链表中。链表中的每一项包含一个具体进程的所有信息,类型为task_struct,称为进程描述符(process descriptor),该结构定义在文件中。
Linux通过slab分配器分配task_struct结构,这样能达到对象复用和缓存着色(cache colorin...
分类:
系统相关 时间:
2014-08-09 13:29:07
阅读次数:
993
邻接表using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace LH.GraphConsole{ public struct AdjacencyListGraph ...
分类:
其他好文 时间:
2014-08-09 13:18:07
阅读次数:
199
坑,直接把公路看成X轴来做,然后,排序扫描一下,你懂的。#include #include #include #include using namespace std;const int MAXN=10100;struct Village{ double l,r;};Village p[MAXN];...
分类:
其他好文 时间:
2014-08-09 13:16:27
阅读次数:
191
#include
#include
main()
{
struct objects{
char name[20];
int size;
char color[10];
float weight;
float height;
};
struct objects obj1;
struct objects *p;
p=&obj1;
strcpy(obj1.nam...
分类:
其他好文 时间:
2014-08-09 11:49:17
阅读次数:
277
#include
#include
struct node
{
int data;
struct node *next;
};
typedef struct node MODETYPE;
main()
{ MODETYPE s1,s2,s3,*begin,*p;
s1.data=100;
s2.data=200;
s3.data=300;
begin=&s1;
s1.next=...
分类:
其他好文 时间:
2014-08-09 11:43:57
阅读次数:
223
//5种迭代器,为了激活重载机制,定义的5个类型。每种迭代器就是一个类型。
struct input_iterator_tag{};
struct output_iterator_tag{};
struct forward_iterator_tag : public input_iterator_tag{};
struct bidirectional_iterator_tag:public fo...
分类:
其他好文 时间:
2014-08-09 11:43:17
阅读次数:
275
#include#includeusing namespace std;struct point{ int x, y;};point bufa[8] ={ {-2, 1}, {-1, 2}, {1, 2}, {2, 1}, {2, -1}, {1, -2}, {-1, -2}, {-2, -1}};...
分类:
其他好文 时间:
2014-08-09 11:29:47
阅读次数:
290
//BFS#include #include using namespace std;bool used[8][8];int move[8][2]={1,2, -1,2, -2,1, -2,-1, -1,-2, 1,-2, 2,-1, 2,1};struct position{ int i,j...
分类:
其他好文 时间:
2014-08-09 11:21:17
阅读次数:
245
1 #include 2 #include 3 4 char en[11],fr[11]; 5 int st; 6 struct Tire{ 7 int next[26]; 8 char eng[11]; 9 }node[200005];10 void insert(char...
分类:
其他好文 时间:
2014-08-09 02:27:38
阅读次数:
266
/** \brief poj 3253
*
* \param date 2014/8/8
* \param state AC
* \return memory 1124K time 125ms
*
*/
#include
#include
#include
#include
using namespace std;
struct number
{
//int x;...
分类:
其他好文 时间:
2014-08-08 21:33:06
阅读次数:
291