운영체제 연습문제 9장
- 최초 등록일
- 2010.09.29
- 최종 저작일
- 2010.04
- 4페이지/ 한컴오피스
- 가격 1,000원
소개글
운영체제 연습문제 9장 조선대학교 이준 교수님꺼
목차
없음
본문내용
9.3A page-replacement algorithm should minimize the number of page faults. We can achieve this minimization by distributing heavily used pages evenly over all memory, rather than having them compete for a small number of page frames. We can associate with each page frame a counter of the number of pages associated with that frame. Then, to replace a page, we can search for the page frame with the smallest counter.
a. Define a page-replacement algorithm using this basic idea. Specifically address these problems:
1. What is the initial value of the counter is
2. When counters are increased
3. When counters are decreased
4. How is the page to be replaced selected
-FIFO알고리즘을 개선하여 카운터의 초기값을 모두 0으로 줍니다. 그 후 참조가 일어나면 카운터를 증가시키고 5회의 명령어가 지나갈 정도의 일정시간이 지나면 모두의 카운터를 하나 감소시킵니다. 교체할 때는 카운터의 값이 가장 작은 것을 교체합니다. 이 알고리즘의 단점은 시작한지 얼마 안된 프로세스가 부른 페이지는 사용한지 얼마 안됐기 때문에 카운트 값이 작아 자주 교체되어버린다.
b. How many page faults occur for your algorithm for the following reference string, with four page frames?
1,2,3,4,5,3,4,1,6,7,8,7,8,9,7,8,9,5,4,5,4,2
-14번 일어납니다.
1 1 1 1 5 5 5 5 6 6 6 6 6 6 6 6 6 5 4 5 5
2 2 2 2 2 2 1 1 7 7 7 7 7 7 7 7 7 7 7 4
3 3 3 3 3 3 3 3 8 8 8 8 8 8 8 8 8 8 8
4 4 4 4 4 4 4 4 4 4 9 9 9 9 9 9 9 9
f f f f f h h f f f f h h f h h h f f f f => 14
참고 자료
없음