SlideShare uma empresa Scribd logo
1 de 21
이중으로 연결된 목록 아꿈싸 이재정
이중 링크드 리스트 RLINK(LLINK(X)) = LLINK(RLINK(X)) = X 두번째 것이 선호할만한 주된 이유다.
이중 링크드 리스트
노드 제거 RLINK(LLINK(X)) <- RLINK(X)
노드제거 LLINK(RLINK(X)) <- LLINK(X)
노드제거 AVAIL <= X
친구추가
친구추가 P<=AVAIL,  LLINK(P) <- X
친구추가 RLINK(P) <- RLINK(X)
친구추가 LLINK(RLINK(X)) <- P
친구추가 LLINK(RLINK(X)) <- P
칼텍(Caltech)의 엘리베이터
엘리베이터 시뮬레이션
엘리베이터 변수 CALLUP[ j], 0 <= j <= 4 CALLDOWN[ j], 0 <= j <= 4 CALLCAR[ j], 0 <= j <= 4 FLOOR STATE, {GOINGUP, GOINGDOWN, NEUTRAL} ELEVATOR, 엘레베이터에 타고있는 이용자 스택 QUEUE[ j], 0 <= j <= 4, j층에서 기다리는 이용자 대기열
엘리베이터 변수 D1, 사람들이 승강기에 타고 내리는 동안이 아니면 0인 변수 D2, 승강기가 30초 이상 움직이지 않고 한 층에 머물러 있으면 0이 되는 변수 D3, 문이 열렸지만 아무도 타고 내리지 않는 동안이 아니면 0인 변수
이용자 변수 IN, 이용자가 시스템에 들어온 층 OUT, 이용자가 가고자 하는 층 GIVEUPTIME INTERTIME
이용자 코루틴 U1(진입, 초기값설정) -> U2(신호대기, CALLUP/DOWN 설정 혹은 E3, E4로 넘어감) -> U3(대기열진입, QUEUE[IN]에 유저 삽입, 엘레베이터가 오면 E4에의해 U5로 넘어감) -> U4(대기, Giveup시간만큼 대기 QUEUE[IN]에서 제거) -> U5(타기, CALLCAR 설정) -> U6(내리기, ELEVATOR에서 제거)
엘리베이터 코루틴 E1, E2, E3, E4, E5, E6, E7, E8, E9
스케쥴링의 필요성 E4, E5, E9가 동시에 수행될 수 도 있다. 링크드 리스트를 이용해서 스케쥴링을 구현한다.
자료구조
끝 감사합니다. ^^;

Mais conteúdo relacionado

Destaque

why SB should come to IU
why SB should come to IUwhy SB should come to IU
why SB should come to IUMaddie Newquist
 
Christopher rios
Christopher riosChristopher rios
Christopher riosHRBranham
 
World Famous Prayer Interpretation By Dr. Shriniwas Kashalikar
World Famous Prayer Interpretation By Dr. Shriniwas KashalikarWorld Famous Prayer Interpretation By Dr. Shriniwas Kashalikar
World Famous Prayer Interpretation By Dr. Shriniwas Kashalikarguestad0b03
 
The Hero's Journey November
The Hero's Journey November The Hero's Journey November
The Hero's Journey November Peter de Kuster
 
Manchester City Council Presentation
Manchester City Council PresentationManchester City Council Presentation
Manchester City Council PresentationOpen Data Manchester
 
Math chapter 4
Math chapter 4Math chapter 4
Math chapter 4aelowans
 
The Biggest Picture: Situational Awareness on a Global Level
The Biggest Picture: Situational Awareness on a Global LevelThe Biggest Picture: Situational Awareness on a Global Level
The Biggest Picture: Situational Awareness on a Global LevelInside Analysis
 
Improving road safety in Morocco
Improving road safety in MoroccoImproving road safety in Morocco
Improving road safety in MoroccoCNPAC
 
Badger Sheriff's Association Conference - Stag USA Presentation
Badger Sheriff's Association Conference - Stag USA PresentationBadger Sheriff's Association Conference - Stag USA Presentation
Badger Sheriff's Association Conference - Stag USA PresentationWisconsin Clean Cities
 
Internet 4 Parents
Internet 4 ParentsInternet 4 Parents
Internet 4 ParentsIwith.org
 

Destaque (11)

why SB should come to IU
why SB should come to IUwhy SB should come to IU
why SB should come to IU
 
Christopher rios
Christopher riosChristopher rios
Christopher rios
 
World Famous Prayer Interpretation By Dr. Shriniwas Kashalikar
World Famous Prayer Interpretation By Dr. Shriniwas KashalikarWorld Famous Prayer Interpretation By Dr. Shriniwas Kashalikar
World Famous Prayer Interpretation By Dr. Shriniwas Kashalikar
 
The Hero's Journey November
The Hero's Journey November The Hero's Journey November
The Hero's Journey November
 
Manchester City Council Presentation
Manchester City Council PresentationManchester City Council Presentation
Manchester City Council Presentation
 
Math chapter 4
Math chapter 4Math chapter 4
Math chapter 4
 
The Biggest Picture: Situational Awareness on a Global Level
The Biggest Picture: Situational Awareness on a Global LevelThe Biggest Picture: Situational Awareness on a Global Level
The Biggest Picture: Situational Awareness on a Global Level
 
Improving road safety in Morocco
Improving road safety in MoroccoImproving road safety in Morocco
Improving road safety in Morocco
 
Self Service Usability
Self Service UsabilitySelf Service Usability
Self Service Usability
 
Badger Sheriff's Association Conference - Stag USA Presentation
Badger Sheriff's Association Conference - Stag USA PresentationBadger Sheriff's Association Conference - Stag USA Presentation
Badger Sheriff's Association Conference - Stag USA Presentation
 
Internet 4 Parents
Internet 4 ParentsInternet 4 Parents
Internet 4 Parents
 

Mais de 재정 이

Tcpl 14장 예외처리
Tcpl 14장 예외처리Tcpl 14장 예외처리
Tcpl 14장 예외처리재정 이
 
Tcpl 12장 파생클래스
Tcpl 12장 파생클래스Tcpl 12장 파생클래스
Tcpl 12장 파생클래스재정 이
 
The c++ programming language 10장 클래스 발표
The c++ programming language 10장 클래스 발표The c++ programming language 10장 클래스 발표
The c++ programming language 10장 클래스 발표재정 이
 
6장 표현식 및 문장
6장 표현식 및 문장6장 표현식 및 문장
6장 표현식 및 문장재정 이
 
이중으로 연결된 목록
이중으로 연결된 목록이중으로 연결된 목록
이중으로 연결된 목록재정 이
 

Mais de 재정 이 (9)

Tcpl 14장 예외처리
Tcpl 14장 예외처리Tcpl 14장 예외처리
Tcpl 14장 예외처리
 
Tcpl 12장 파생클래스
Tcpl 12장 파생클래스Tcpl 12장 파생클래스
Tcpl 12장 파생클래스
 
The c++ programming language 10장 클래스 발표
The c++ programming language 10장 클래스 발표The c++ programming language 10장 클래스 발표
The c++ programming language 10장 클래스 발표
 
6장 표현식 및 문장
6장 표현식 및 문장6장 표현식 및 문장
6장 표현식 및 문장
 
이중으로 연결된 목록
이중으로 연결된 목록이중으로 연결된 목록
이중으로 연결된 목록
 
유향트리
유향트리유향트리
유향트리
 
유향트리
유향트리유향트리
유향트리
 
Mix 설명
Mix 설명Mix 설명
Mix 설명
 
이항계수
이항계수이항계수
이항계수
 

이중으로 연결된 목록