OPERATING SYSTEM (GeekOS - project3)
닫기
  • 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
해당 자료는 10페이지 까지만 미리보기를 제공합니다.
10페이지 이후부터 다운로드 후 확인할 수 있습니다.

목차

1. 문제개요
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 스케줄링 구현, 자료검색

키워드

  • 가격3,000
  • 페이지수55페이지
  • 등록일2011.08.14
  • 저작시기2011.8
  • 파일형식한글(hwp)
  • 자료번호#694793
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니