레이블이 운영체제인 게시물을 표시합니다. 모든 게시물 표시
레이블이 운영체제인 게시물을 표시합니다. 모든 게시물 표시

2016년 6월 9일 목요일

임베디드 OS 6/9 - 리눅스 파일 시스템

리눅스 파일 시스템


  • Virtual Filesystem
  • General characteristics of Ext2 filesystem
  • Ext2 disk data structures
  • Ext2 memory data structures
  • Ext2 methods
  • Managing Ext2 disk space
  • The Ext3 filesystem
  • The Ext4 filesystem
강의 슬라이드:

2016년 6월 7일 화요일

임베디드OS 6/7 - 파일 관리/시스템

파일 관리/시스템


  • 파일/파일 메타데이터
  • 디렉토리 트리 구조
  • 파일 블록 할당
  • 가용 공간(블록) 관리
  • UNIX 파일 시스템
  • Inode
  • VFS(Virtual File System)


https://drive.google.com/open?id=0B5tRdB4hr8DfbW5TUkNqclpwQVE

2016년 5월 10일 화요일

리눅스 페이지 교체 정책에 대해


리눅스 커널 페이지 교체 정책에 대해

Linux 2.4 page replacement changes in detail

[중략]

Page aging

[중략]

However, in some situations the LFU page aging of Linux 2.0 is known to have too much CPU overhead and adjust to changes in system load too slowly. Furthermore, research has shown that recency of access is a more important criteria for page replacement than frequency.

These two problems are solved by doing exponential decline of the page age (divide by two instead of substracting a constant) whenever we find a page that wasn't accessed, resulting in page replacement which is closer to LRU than LFU. This reduces the CPU overhead of page aging drastically in some cases; however, no noticable change in swap behaviour has been observed.

정리하면,

LFU방식인 page aging (교재에 나온 방법)이 리눅스 2.0에서 사용되었으나, 이는 오버헤드가 컸고, 2.4에서는 exponential decline(age를 2로 나누어서 줄임)을 적용하였는데, 이는 LFU보다는 LRU에 더 가까운 방법으로 보인다.
즉, LFU와 LRU방식이 모두 섞여 있다고 보면 됨.

출처:

https://www.usenix.org/legacy/event/usenix01/freenix01/full_papers/riel/riel_html/

임베디드 OS 4/26, 5/3, 5/10 - 가상메모리

가상메모리(Virtual Memory)

페이징

- 페이지 테이블
세그멘테이션

교체정책


강의 슬라이드:

https://drive.google.com/open?id=0B5tRdB4hr8Dfa1g0Z3V4TzZPbzQ

2016년 4월 7일 목요일

임베디드 OS 4/7 - 경쟁조건,상호배제 실습

경쟁조건,상호배제 실습

POSIX Thread 라이브러리를 사용하여 경쟁조건과 상호배제를 실습

경쟁조건(race condition)

https://github.com/jyheo/OperatingSystemExercise/blob/master/race_cond.c

상호배제(mutual exclusion)

https://github.com/jyheo/OperatingSystemExercise/blob/master/race_mutex.c

빌드&실행

$ gcc race_cond.c -o race_cond -l pthread

Makefile을 이용하기
https://github.com/jyheo/OperatingSystemExercise/blob/master/Makefile

해보기.

https://github.com/jyheo/OperatingSystemExercise/blob/master/race_cond_2.c

실행결과가 원하는 값 2000000이 나오지 않는 이유는?
해결하기 위한 방법은?

2016년 3월 27일 일요일

임베디드 OS 3/29 - 스레드

스레드


  • 프로세스와 스레드
  • 사용자 수준(User-level) 스레드와 커널 수준(Kernel-level) 스레드
  • 멀티코어와 멀티스레드, 암달(Amdahl)의 법칙

강의 슬라이드:

https://drive.google.com/file/d/0B5tRdB4hr8DfLTNuUVU1Q1NlbDg/view?usp=sharing

2016년 3월 20일 일요일

임베디드 OS 3/22 - 프로세스 기술과 제어

운영체제 프로세스 기술과 제어

  • 프로세스(process)란?
  • 프로세스 상태(state)
  • 프로세스 기술(description) = PCB(Process Control Block)
  • 프로세스 제어
    • 모드 전환(Mode Switch), 커널 모드와 유저 모드
    • 프로세스 전환(Process Switch)
    • 프로세스 생성

강의 슬라이드

https://drive.google.com/file/d/0B5tRdB4hr8DfZ0FFa1pOQVdFdzg/view?usp=sharing