Nachos Thread Synchronization Code Program
- 최초 등록일
- 2008.07.27
- 최종 저작일
- 2007.07
- 압축파일
- 가격 3,000원
소개글
기존 루틴 분석을 통해 Nachos 구현 후
Thread::Join() Test Routine, Scheduling Test Routine을 거쳐
Synchronization 동기화 실험을 한 코드 입니다.
관련문서는 제 박스 내 Report 폴더의 문서를 참조해주시기 바랍니다.
컴파일 실행환경
없음
본문내용
◆ Thread.h
...
#ifdef CHANGED
Thread::Thread(char* threadName, bool joinable, int priority)
{
name = threadName;
stackTop = NULL;
stack = NULL;
status = JUST_CREATED;
for (int i = 0; i < MachineStateSize; i++) {
machineState[i] = NULL; // not strictly necessary, since
// new thread ignores contents
// of machine registers
}
...
#ifdef CHANGED
//----------------------------------------------------------------------
// Thread::Join
//
//----------------------------------------------------------------------
void
Thread::Join()
{
ASSERT(joinable);
// disable interrupt
IntStatus oldLevel = kernel->interrupt->SetLevel(IntOff);
ASSERT(joiner==NULL);
ASSERT(this!=kernel->currentThread);
joiner = kernel->currentThread;
DEBUG(dbgThread, kernel->stats->totalTicks
<< " " << joiner->name << " joined to " << name);
...
압축파일 내 파일목록
alarm.cc
alarm.h
debug.h
join_result.log
kernel.cc
kernel.h
main.cc
main.h
ourhome.cc
Readme.txt
scheduler.cc
scheduler.h
sched_result.log
switch.h
synch.cc
synch.h
synchlist.cc
synchlist.h
sync_result.log
sync_rs_result.log
thread.cc
thread.h
참고 자료
없음