카테고리 338 Paging Paging Physical memory를 fixed sized block (frame)으로 나눈다. Logical memory를 같은 크기의 block인 page로 나눈다. frame과 page는 같은 것으로 physical memory인지 logical memory인지를 구분하기 위해 달리 표현하는 것이다. 운영체제는 모든 free frame들을 기록해야 한다. Page Table 목적 아래의 문제들을 해결하기 위해 page table을 사용한다. 운영체제와 하드웨어는 매핑 정보를 가지고 있어야 한다. 너무 많은 relocation register를 필요로 할 수 있다. Relcoation register는 virtual address space의 최대 page 수 만큼 필요하다. Page Table.. 2021. 6. 20. Memory Management Memory Management Multitasking을 위해서는 대상이 되는 프로그램들을 메모리에 올려놓고 실행해야 한다. 이를 위해서 memory management가 필요하다. Memory management는 운영체제에서 가장 복잡한 것 중 하나이다. 목적 Memory management의 일반적인 목적는 다음과 같다. 프로세스 별로 하나의 contiguous, protected 메모리 공간을 배정한다. 물리적으로 주어지는 메모리보더 더 많고 분리된 메모리를 프로세스마다 배정한다. Tricks address translation paging, segmentation address translation을 통해서 noncontiguous한 physical emmory allocation을 효율적으로 .. 2021. 6. 20. Deadlock Handling Deadlock Handling 일반적으로 운영체제는 deadlock ignorance를 채택한다. prevention, avoidance, detection은 성능적인 비용이 많이 들기 때문이다. deadlock preventation : deadlock을 예방함으로써 deadlock을 해결한다. deadlock avoidance : deadlock이 발생할 가능성은 있지만, 발생하지 않도록 자원을 운용한다. deadlock detection and recovery : deadlock이 발생하도록 냅두고, 발생하면 처리한다. deadlock ignore : deadlock이 발생해도 무시한다. 프로그래머가 deadlock이 발생하지 않도록 해야 한다. Deadlock Prevention deadlock.. 2021. 6. 20. Deadlock Deadlock concurrent하게 실행되는 프로세스가 있을 때, 그 프로세스들이 progress를 만들지 못하고 영원히 정지되는 현상을 말한다. 다음과 같은 상황은 deadlock에 빠질 수 있다. Deadlock의 조건 Deadlock이 발생하기 위해서는 아래 4가지 조건이 충족되어야 한다. 역은 성립하지 않는다. 즉, 아래 4가지 조건이 충족되어도 무조건 deadlock은 아니다. mutual exclusion critical section에 오직 하나의 프로세스만 들어갈 수 있다. hold and wait 어떤 프로세스가 이미 critical section에 들어가있고, 다른 critical section에도 들어가기 위해서 기다린다. 다른 프로세스에서 이미 들어가있는 critical sect.. 2021. 6. 20. Synchronization Problems Classical Synchronization Problems 여러 전통적인 synchronization 문제가 있다. Semaphore와 mutex는 단지 primitive로, 실제 프로그래밍을 할 때 발생하는 문제에 대해서는 단순히 이용해서는 안되고 응용해야 한다. readers and writers problem dining-philosopher problem Readers and Writers Problem Critical section에 접근하는 프로세스가 2종류인 상황을 의미한다. reader : critical section에 읽기만 가능하다. writer : critical section에 쓰기만 가능하다. Race condition은 여러 프로세스가 동시에 한 shared resource.. 2021. 6. 20. 이전 1 ··· 36 37 38 39 40 41 42 ··· 68 다음