
-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55


목차
1. 문제개요
2. 문제분석 (알고리즘 및 해결방안)
3. 결과 (소스 및 스크린샷)
4. 배운점 (느낀점)
5. 역할분담
2. 문제분석 (알고리즘 및 해결방안)
3. 결과 (소스 및 스크린샷)
4. 배운점 (느낀점)
5. 역할분담
본문내용
ckAddr = (ulong_t)arg_space_usable;
UserContext->stackPointerAddr = UserContext->size - 4;
UserContext->refCount = 0;
/* format argument block in user space */
Format_Argument_Block((char *)((ulong_t)UserContext->memory + (ulong_t)UserContext->argBlockAddr), numArgs, UserContext->argBlockAddr, command);
/* copy segments to user space */
memcpy(UserContext->memory + exeFormat->segmentList[0].startAddress,
exeFileData + exeFormat->segmentList[0].offsetInFile,
exeFormat->segmentList[0].lengthInFile);
memcpy(UserContext->memory + exeFormat->segmentList[1].startAddress,
exeFileData + exeFormat->segmentList[1].offsetInFile,
exeFormat->segmentList[1].lengthInFile);
/* return pointer to UserContext */
*pUserContext = UserContext;
return rc;
ERRCATCH:
if(process_space != NULL)
Free(process_space);
if(UserContext != NULL)
Free(UserContext);
return rc;
}
bool Copy_From_User(void* destInKernel, ulong_t srcInUser, ulong_t bufSize)
{
//TODO("Copy memory from user buffer to kernel buffer");
//Validate_User_Memory(NULL,0,0); /* delete this; keeps gcc happy */
/* get the currently running thread and
determine the bounds for the user process */
struct Kernel_Thread *pThread = Get_Current();
void *memory = pThread->userContext->memory;
ulong_t size = pThread->userContext->size;
/* check bounds */
if(srcInUser < 0 || srcInUser > size || bufSize < 0 || srcInUser + bufSize > size )
return false;
/* copy memory */
memcpy((void*)destInKernel, (void*)(srcInUser + (ulong_t)memory), bufSize);
return true;
}
bool Copy_To_User(ulong_t destInUser, void* srcInKernel, ulong_t bufSize)
{
//TODO("Copy memory from kernel buffer to user buffer");
/* get the currently running thread and
determine the bounds for the user process */
struct Kernel_Thread *pThread = Get_Current();
void *memory = pThread->userContext->memory;
ulong_t size = pThread->userContext->size;
/* check bounds */
if(destInUser < 0 || destInUser > size || bufSize < 0 || destInUser + bufSize > size)
return false;
/* copy memory */
memcpy((void*)((ulong_t)destInUser + (ulong_t)memory), srcInKernel, bufSize);
return true;
}
void Switch_To_Address_Space(struct User_Context *userContext)
{
//TODO("Switch to user address space using segmentation/LDT");
Load_LDTR(userContext->ldtSelector);
}
2) 스크린샷
4. 배운점 (느낀점)
1) 홍길동1 : Geekos Project3 스케줄링 과제를 시작하면서 하드디스크 마운트가 되지 않아 마운트하는 방법을 알기위해 Project1을 실행해 보고, Shell을 띄우기 위해 Project2를 작성하면서 조금씩 Project3의 과제를 이해 할 수 있었습니다. 이번 과제를 수행하면서 운영체제에서 이루어지는 시스템 콜과 스케줄링을 작성을 하며 스케줄링의 동작 알고리즘을 좀 더 이해할 수 있는 기회가 되었습니다.
2) 홍길동2 : 프로젝트0 을 마치고 바로 project3을 시작한다고 하여서 많은 걱정을 하였습니다 참고자료를 통해서 우선 geekos에서 마운트를 구현하기 위해서 소스를 수정하였습니다. 그리고 그후 조교님이 올려주신 파일을 붙여넣기 하여 오류가 난부분을 수정하기 위해서 많은 고민을 하였습니다. 스케줄링 을 구현하기 위해서 커널 스레드와 유저 스레드를 우선 geekos에 활성화 해주고 시스템 콜을 구현하기위해서 많은 고민을 하였습니다. 그후 스케줄링 구현을 위해 라운드 로빈 sjf 멀티레벨큐를 구현하기 위해서 많은 검색과 참고서적에 도움을 받았습니다. 짧은시간에 하느라 정신없이 하여서 많은 고생을 하였습니다.
5. 역할분담
1) 홍길동1 : 시스템콜 구현, Shortest Remianing Time, 멀티레벨 피드백 큐
스케줄링구현, 자료 검색
2) 홍길동2 : Round Robin, Shortest Job First 스케줄링 구현, 자료검색
UserContext->stackPointerAddr = UserContext->size - 4;
UserContext->refCount = 0;
/* format argument block in user space */
Format_Argument_Block((char *)((ulong_t)UserContext->memory + (ulong_t)UserContext->argBlockAddr), numArgs, UserContext->argBlockAddr, command);
/* copy segments to user space */
memcpy(UserContext->memory + exeFormat->segmentList[0].startAddress,
exeFileData + exeFormat->segmentList[0].offsetInFile,
exeFormat->segmentList[0].lengthInFile);
memcpy(UserContext->memory + exeFormat->segmentList[1].startAddress,
exeFileData + exeFormat->segmentList[1].offsetInFile,
exeFormat->segmentList[1].lengthInFile);
/* return pointer to UserContext */
*pUserContext = UserContext;
return rc;
ERRCATCH:
if(process_space != NULL)
Free(process_space);
if(UserContext != NULL)
Free(UserContext);
return rc;
}
bool Copy_From_User(void* destInKernel, ulong_t srcInUser, ulong_t bufSize)
{
//TODO("Copy memory from user buffer to kernel buffer");
//Validate_User_Memory(NULL,0,0); /* delete this; keeps gcc happy */
/* get the currently running thread and
determine the bounds for the user process */
struct Kernel_Thread *pThread = Get_Current();
void *memory = pThread->userContext->memory;
ulong_t size = pThread->userContext->size;
/* check bounds */
if(srcInUser < 0 || srcInUser > size || bufSize < 0 || srcInUser + bufSize > size )
return false;
/* copy memory */
memcpy((void*)destInKernel, (void*)(srcInUser + (ulong_t)memory), bufSize);
return true;
}
bool Copy_To_User(ulong_t destInUser, void* srcInKernel, ulong_t bufSize)
{
//TODO("Copy memory from kernel buffer to user buffer");
/* get the currently running thread and
determine the bounds for the user process */
struct Kernel_Thread *pThread = Get_Current();
void *memory = pThread->userContext->memory;
ulong_t size = pThread->userContext->size;
/* check bounds */
if(destInUser < 0 || destInUser > size || bufSize < 0 || destInUser + bufSize > size)
return false;
/* copy memory */
memcpy((void*)((ulong_t)destInUser + (ulong_t)memory), srcInKernel, bufSize);
return true;
}
void Switch_To_Address_Space(struct User_Context *userContext)
{
//TODO("Switch to user address space using segmentation/LDT");
Load_LDTR(userContext->ldtSelector);
}
2) 스크린샷
4. 배운점 (느낀점)
1) 홍길동1 : Geekos Project3 스케줄링 과제를 시작하면서 하드디스크 마운트가 되지 않아 마운트하는 방법을 알기위해 Project1을 실행해 보고, Shell을 띄우기 위해 Project2를 작성하면서 조금씩 Project3의 과제를 이해 할 수 있었습니다. 이번 과제를 수행하면서 운영체제에서 이루어지는 시스템 콜과 스케줄링을 작성을 하며 스케줄링의 동작 알고리즘을 좀 더 이해할 수 있는 기회가 되었습니다.
2) 홍길동2 : 프로젝트0 을 마치고 바로 project3을 시작한다고 하여서 많은 걱정을 하였습니다 참고자료를 통해서 우선 geekos에서 마운트를 구현하기 위해서 소스를 수정하였습니다. 그리고 그후 조교님이 올려주신 파일을 붙여넣기 하여 오류가 난부분을 수정하기 위해서 많은 고민을 하였습니다. 스케줄링 을 구현하기 위해서 커널 스레드와 유저 스레드를 우선 geekos에 활성화 해주고 시스템 콜을 구현하기위해서 많은 고민을 하였습니다. 그후 스케줄링 구현을 위해 라운드 로빈 sjf 멀티레벨큐를 구현하기 위해서 많은 검색과 참고서적에 도움을 받았습니다. 짧은시간에 하느라 정신없이 하여서 많은 고생을 하였습니다.
5. 역할분담
1) 홍길동1 : 시스템콜 구현, Shortest Remianing Time, 멀티레벨 피드백 큐
스케줄링구현, 자료 검색
2) 홍길동2 : Round Robin, Shortest Job First 스케줄링 구현, 자료검색
키워드
추천자료
마이크로소프트 사례분석
스마트카드의 현주소와 가능성에 관하여
유비쿼터스 영문해석
사이버상담 용어
컴퓨터의 구성요소
운영체제1장.5장.9장연습문제
컴퓨터 운영체제의 개요 - 운영체제의 역할, 역사, 구조, 종류
[유비쿼터스] 유비쿼터스의 개념과 관련기술
(A+평가 레포트)스마트폰(Smart phone)의 정의와 특징 및 역사
(A+평가 레포트)스마트폰의 개념과 특성 및 현황
스마트폰 개념과 특성과 이용현황과 중독조사와 사례 - 스마트폰의 개념과 기능, 특성, 이용...
시스템설계공학 보고서
[유비쿼터스컴퓨팅개론 공통] 현재 스마트폰에서 사용되는 안드로이드 롤리팝 운영체제의 특...
마이크로소프社 윈도우폰 경영전략[MS WINDOWPHONE STRATEGY]