資源簡介
操作系統buddy源代碼。這是我在操作體統課程中做的一個簡便模擬程序。
代碼片段和文件信息
#include?
#include?
#define?TIME_SPAN?100
#define?MEMORY_SIZE?1024//the?memory?size?is?512B
#define?MAX_PROC_SIZE???256?//the?max?memory?which?process?can?get?is?256B
#define?bool?int
#define?true?1
#define?false?0
struct?process_node
{
?????int?flag;//indicate?if?this?process?get?memory.1?true0?false
?????int?process_id;//the?process?id
?????int?ready_time;//the?time?process?need?memory
?????int?duration;//the?duration?of?process?need?memory
?????int?need_size;//the?size?that?the?process?need
?????struct?process_node*?next_node;//the?next?node
};
struct?memory_node
{
??????int?size;//the?size?of?this?block
??????int?start_address;//the?start?address?of?this?block
??????int?process_id;//the?id?of?the?process?occupying?this?block
??????int?is_allocated;//indicate?if?th
- 上一篇:DELPHI GDI+用到的幾個PAS文件
- 下一篇:chrome插件開發文檔
評論
共有 條評論