[운영체제]OS 과제 프로세스 스케줄링
- 최초 등록일
- 2006.01.11
- 최종 저작일
- 2006.01
- 28페이지/ 압축파일
- 가격 2,500원
소개글
OS수업 과제입니다. 주제는 `프로세스 스케줄링`입니다. 그대로 복사하시기보다는 직접 작성할 때 참고하는 용도로 사용하시기 바랍니다^^
컴파일 실행환경
- OS: Redhat Linux 9 (2.4.20-8)
- compiler: gcc 3.2.2
- editer: vi Improved 6.1
본문내용
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <string.h>
#include <sys/msg.h>
#include <errno.h>
#include <iostream>
#include <fstream>
using namespace std;
#define MAX_IO 100
#define MAX_PROCESS 200
#define MAX_QUEUE 100
#define TIME_QUANTUM 10
struct q_entry {
long mtype; // message type
int ppid; // 부모 프로세스의 id
int p_num; // process number
int p_num2; // 시뮬레이터에 입력으로 들어오는 프로세스의 순차적인 번호
int lifetime; // process의 lifetime
int passedtime; // 특정 프로세스가 수행한 총 시간
int priority; // priority
int next_io_time; // 다음에 io를 요청해야 시간
int next_io_device; // 다음에 io를 요청할 장치
int p_state; // process state
int tsc2; // time stamp counter
int order;
int s_mode; // scheduling mode
FILE *ofp;
};
struct tsc_entry {
long mtype; // message type
int p_time; // child process가 수행한 시간
int io_req; // io를 요청하였는가를 나타내는 flag
int next_io_device; // 다음에 io를 요청할 장치
};
struct pcb {
int load_time; // loading time
int lifetime; // process의 lifetime
int passedtime; // process가 수행한 총 시간
int overtime; // process수행을 마쳤을 당시에 계산한 해당프로세스의 io종료후 초과시간
int priority; // 현재 priority
int ori_priority; // 원래 priority
int io_time[MAX_IO]; // io를 요청할 시간 배열
int io_device[MAX_IO]; // io를 요청할 io장치
...
압축파일 내 파일목록
os_hw1.tar
os_hw1_report.hwp
참고 자료
없음