전체 글
-
1.6 Security and ProtectionTIL(today i learned)/운영체제 2023. 3. 13. 13:12
Protection:컴퓨터가 정의한 자원에 에대해 프로그램,프로세스,사용자의 접근을 제어하는 방식이다. Security:외부또는 내부로부터의 공격을 방어하는것 보호와 보안을 제공하기위해서는 시스템의 모든 사용자를 구분할수있어야한다. 사용자 식별자(User identifiers: user IDs, security IDs):사용자 ID는 해당 사용자의 모든 파일, 프로세스와 연결된다. 그룹 식별자 Privilege escalation(권한 상승)을 통해 권한을 상승 시킬수있다.Ex)유닉스에서는 프로그램이 수행될 때setuid 속성을 이용하여 현사용자의 식별자가 아니라 접근하려고하는 파일의 소유주 식별자를 이용하여 동작할수있다.강의 때 들었던걸 설명해보자면 예를 들어 root권한을 이용해야지 etc/경로에 접..
-
1.5 Resource ManagementTIL(today i learned)/운영체제 2023. 3. 11. 22:16
프로세스란 실행중인 프로그램이다. 또한 일을 수행하기위해 CPU시간,메모리,파일그리고 입출력등등 여러가지자원을 필요로한다. 프로세스가 종료되면서 os는 재사용가능한자원을 회수한다. 다시말하자면 프로그램은 실행되기전에는 디스크에 저장된 파일의내용과 같이 수동적이지만 프로세스는 능동적인 객체이다. 싱글 스레드 프로세스 하나의 프로그램 카운터(다음수행할 명령을 지정하는 기능을 가짐)를 가짐 싱글 스레드 에서 하나의프로세스는 순차적으로 진행되어야한다. 언제나 하나의 명령만 실행됨 멀티스레드 프로세스 여러개의 프로그램카운터를 가짐 이카운터들은 각 스레드가 실행할 다음 명령어를 가리키게 된다. 프로세스는 한 시스템 내의 작업의 단위이다.이러한 시스템은 프로세스의집합으로 구성되는데, 프로세스중 일부는 운영체제 프로세..
-
1.4 Operating System OperationsTIL(today i learned)/운영체제 2023. 3. 11. 13:04
Bootstrap program (초기 프로그램) 펌웨어에 저장된다. 컴퓨터가 부팅할 때 시스템을 초기화해준다. 자세한 거 여기에:https://velog.io/@gerrymandering/%EB% B6%80% ED% 8A% B8% EC% 8A% A4% ED% 8A% B8% EB% 9E% A9-%ED%94%84% EB% A1% 9C% EA% B7% B8% EB% 9E% A8 부트스트랩 프로그램 부트스트랩 프로그램이란? velog.io 운영체제 적재 및 해당시스템 실행법 적재하는 법:부트스트랩 프로그램이 운영체제 커널을 찾아 메모리에 적제 해야 함. 실행하는 법:커널이 로드되고 실행되면 시스템과 사용자에게 서비스 제공을 시작할 수 있다. 만약 아무런 이벤트가 없는 경우 OS는 조용히 기다린다. 이벤트는 대..
-
1.3 Computer-System ArchitectureTIL(today i learned)/운영체제 2023. 3. 10. 12:53
코어:명령을 실행하고 로컬로 데이터를 저장하기위한 레지스터를 포함하는 주성요소이다. Single-Processor 단일처리코어를가지는 하나의 CPU를 사용하는 시스템 현대에는 거의 없는시스템 Multiprocessor Systems 각각 단일코어 CPU가 있는 두개이상의 프로세스를가지는 시스템 ,처리량 증가 프로세스는 주변장치(Bus,clock,memory등등)를 공유하는데 이때 프로세서의 수가 많아질수록 처리속도가 올라간다. 일반적으로는 Symmetric multiprocessing (SMP) 를사용한다 Symmetric multiprocessing (SMP) 각 CPU 프로세서가 운영체제 기능및 사용자프로세스를 포함한 모든작업을 수행한다. 각각의 CPU는 개별 또는 로컬 캐시뿐만 아니라 자체 레지스터..
-
백준[16796]TIS(today i solved)/DFS\BFS 2023. 3. 9. 00:20
step 0:1차원배열이니까 그리디의 top step 1:그렇다면 브루트 포스 문제인가? X(시간초과) step 2:다익스트라 알고리즘인가? X step 3:예전에 BFS는 같은 거리비용(여기서는 한번 이동하는데 드는 비용이 1초로 똑같다) 문제에서 최단거리를 찾을 때 사용할 수 있다는 것을 본 적이 있다. step 4:비록 1차원배열이지만 X+1 X-1 2*X 연산을 돌려가며 도착하지 않은 곳을 탐색해 가는 것이 가능하다. step 5:부모 노드의 값+1을 해감으로써 초를 카운트 from collections import deque N,K=map(int,input().split()) def bfs(): q=deque() q.append(N) while q: loc=q.popleft() if loc==K..
-
[1.2.2] Storage StructureTIL(today i learned)/운영체제 2023. 3. 8. 21:59
CPU는 메모리(주로 RAM이라고부른다.)위에서 명령을실행할수 있다. 펌웨어는 읽기위주의 변경가능하지만 자주변경할수없음 또한 속도도느리다(주로 아이폰의 시리얼넘버나 하드웨어 인포메이션에 쓰임) 메모리는 항상 바이트의 배열을 제공한다.각각의 바이트는 스스로의 주소를 가지고있음 Load:메모리가 CPU안에 있는 레지스터를향해 바이트나 워드단위로데이터를옮김 Store:반대로 레지스터의 데이터를 메모리로 가져옴 이외에도 CPU가 자동으로 명령을 적재함 n비트 워드=n비트 레지스터 레지스터는 CPU가 연산을 위해 사용하는 메모리 (우리가흔히말하는 32비트,64비트 컴퓨터는 레지스터의 비트수를 의미) Von-Neumann achitecture(폰 노이만 아키텍쳐) step 0:메모리로부터 명령을 인출후 명령 레지스..
-
InterruptsTIL(today i learned)/운영체제 2023. 3. 8. 21:34
Interrupts 인터럽트 요청라인(Interrupt request line):하나의 명령어 실행을 완료할 때마다 CPU가 이 라인을 감지함 기본적인 인터럽트 메커니즘은 다음과 같다. step 1 . 디바이스 컨트롤러가 인터럽트 요청 라인을 사용 step 2. CPU가 라인을 캐치 step 3. 인터럽트 핸들러 루틴으로 이동 step 4.핸들러가 문제를 해결하고 Interrupt를 지운다 인터럽트요청은 크게2 가지로 나눠진다. 심각한 에러를 해결하기 위한 해결우선순위가 높은 Nonmaskable interrupt 디바이스컨트롤러 서비스를 위한 비교적 우선순위가 낮은 Maskable interrupt 인터럽트 핸들러는 요청을 벡터에 저장하는데 이때 요청이 벡터의 주소개수보다 많을 경우 이를 해결하기 위해..