2014年7月26日 内核抢占和内核控制路径的设计
内核抢占的一种定义:如果进程正在内核态执行内核函数时,允许发生内核切换(就是被替换的进程是内核函数所在进程),这个内核就是抢占的。
linux内核提供了内核抢占的开启和关闭功能,在current_thread_info的preempt_count字段大于0时,内核就是不能抢占的。可以通过preempt_disable和preempt_...
分类:
系统相关 时间:
2014-07-27 11:29:02
阅读次数:
255
#pragma warning(disable:4996)
#include <cstdio>
#include <Windows.h>
#include <tchar.h>
/*
submit time : 3
1. Time Limit Exceeded
23, 12
request :
A robot is located at the top-left corn...
分类:
其他好文 时间:
2014-07-25 11:40:41
阅读次数:
315
#pragma warning(disable:4996)
#include <cstdio>
#include <Windows.h>
#include <tchar.h>
/*
submit time : 4
can not remember
request :
Given a list, rotate the list to the right by k places,...
分类:
其他好文 时间:
2014-07-25 00:04:04
阅读次数:
197
#pragma warning(disable:4996)
#include <Windows.h>
#include <tchar.h>
#include <cstdio>
#include <vector>
using namespace std;
/*
submit time : 1
request :
Given a set of non-overlapping inte...
分类:
其他好文 时间:
2014-07-24 12:32:05
阅读次数:
238
禁止写入日志到Sqlnet.log和Listener.log...
分类:
数据库 时间:
2014-07-24 10:33:14
阅读次数:
267
#pragma warning(disable:4996)
#include <cstdio>
#include <Windows.h>
#include <tchar.h>
#include <vector>
using namespace std;
/*
submit time : 2
1. Runtime Error
[]
request :
Given a ma...
分类:
其他好文 时间:
2014-07-23 21:34:35
阅读次数:
274
1,主键的删除
ALTER TABLE TABLENAME DROP PRIMARY_KEY
执行上面的SQL可以删除主键;如果不成功可以用
ALTER TABLE TABLENAME DROP CONSTRAINTS COLUMN CASCADE; --删除约束
ALTER TABLE TABLENAME DISABLE PRIMARY_COLUMN ; --设置被设置为主键的列为...
分类:
数据库 时间:
2014-07-23 21:01:55
阅读次数:
237
#pragma warning(disable:4996)
#include <Windows.h>
#include <tchar.h>
#include <cstdio>
/*
submit time : 1
request :
Follow up for N-Queens problem.
Now, instead outputting board configura...
分类:
其他好文 时间:
2014-07-23 18:13:56
阅读次数:
284
#pragma warning(disable:4996)
#include <cstdio>
#include <tchar.h>
#include <Windows.h>
/*
submit time : 3
1.Runtime Error
34.00515, -3
2.Runtime Error
1.00000, -2147483648
request :
...
分类:
其他好文 时间:
2014-07-23 17:39:11
阅读次数:
268
#pragma warning(disable:4996)
#include <Windows.h>
#include <tchar.h>
#include <cstdio>
#include <vector>
using namespace std;
/*
submit time : 1 // But I don‘t know how to deal with "Follow u...
分类:
其他好文 时间:
2014-07-23 13:55:36
阅读次数:
280