2023(14)
-
3장 - 컴퓨터 시스템의 동작 원리 : 인터럽트 핸들링
인터럽트 핸들링 인터럽트 핸들링(Interrupt Handling) 인터럽트가 발생한 경우 처리해야 할 일의 절차 CPU에서 명령이 실행될 때 CPU내부의 임시 기억장치인 레지스터(Register)에서 데이터를 읽거나 쓰면서 작업을 하는데, 이때 인터럽트 발생으로 새로운 명령을 실행하면 기존의 레지스터 값들이 지워지게 되므로 CPU내의 이러한 상태를 저장한 이후에 인터럽트 처리가 이루어질 수 있도록 한다. PCB(Process Control Block) : 프로세스 제어블록 운영체제가 현재 시스템 내에서 실행되는 프로그램들을 관리하기 위해 두는 자료구조 EX ) 1. 프로그램 실행 중 인터럽트 발생 2. 프로그램이 실행 중이던 코드의 메모리 주소와 레지스터 값, 하드웨어 상태 등을 PCB에 저장 3. C..
2023.11.17 -
3장 - 컴퓨터 시스템의 동작 원리 : 입출력 구조
입출력 구조 입출력 방식 동기식 입출력(Synchronous I/O) : 입출력 요청이 있을 때, 입출력 작업이 완료된 후에 그 프로그램의 후속 작업 수행 가능한 방식 CPU 제어권이 입출력 하는 동안에는 인터럽트에 있기 때문에 입출력 연산이 끝날 때 까지 CPU는 인터럽트를 기다리면서 자원을 낭비하게 된다. 또한 CPU의 명령속도는 빠르지만 입출력 장치에서 데이터를 읽어오는 등의 입출력 연산은 상대적으로 느리다. 이러한 이유로 일반적으로 프로그램이 입출력을 수행 중인 경우에는 CPU를 다른 프로그램에 이양해 CPU가 계속 쉬지 않고 계속 일 할 수 있도록 관리한다. 입출력이 완료될 때 까지 해당 프로그램에는 CPU를 할당하지 않는다. 따라서 이를 관리하기 위해 운영체제는 프로그램을 몇가지 상태로 나누고..
2023.11.17 -
3장 - 컴퓨터 시스템의 동작 원리 : CPU연산과 I/O연산
CPU연산과 I/O연산 "컴퓨터에서 연산을 한다는 것 = CPU가 무엇인가 일을 한다는 것" 입출력 장치의 I/O 연산은 입출력 컨트롤러사 담당하고, 컴퓨터 내에서 수행되는 연산은 메인 CPU가 담당하며, 입출력 장치와 메인 CPU는 동시에 수행 가능 로컬버퍼(Local Buffer) 각 장치마다 이를 제어하기 위해 설치된 장치 컨트롤러는 장치로부터 들어오고 나가는 데이터를 ㅇ미시로 저장하기 위한 작은 메모리를 가지고 있음 기본적으로 CPU는 매 시점 메모리에서 명령을 하나씩 읽어서 수행하는데, 그때마다 CPU 옆의 인터럽트 라인에서 신호가 들어오는지 확인한다. 인터럽트가 발생하면 다음 명령을 수행하기 전에 인터럽트를 처리하고 다름 명령을 계속 수행한다. 인터럽트(Interrupt) 키보드 입력 또는 요..
2023.11.17 -
1장 - 컴퓨터 및 정보기술의 역사 : 근대의 컴퓨터
근대적 컴퓨터의 역사 1세대 컴퓨터 1940 후반 ~ 진공관 기반의 컴퓨터 2세대 컴퓨터 1950 후반 ~ 트랜지스터 기반의 컴퓨터 3세대 컴퓨터 1960 후반 ~ 집적회로(IC) 기반의 컴퓨터 4세대 컴퓨터 1970 후반~ 고밀도 집적회로(VLSI) 기반의 컴퓨터 1940년대 후반 ~ 19050년대 초반 : ENIAC, UNIVAC I 등 진공관 기반의 컴퓨터 진공관은 전구 크기의 유리관으로 구성되며 스위칭 회로를 내장하고 있다. 전문 기술자가 컴퓨터를 프로그램하고, 관리해야한다. 부피가 매우커서 하나의 컴퓨터가 센터 건물 전체를 차지 수명이 짧아 신뢰성 문제 발생 * 컴퓨터 자체의 처리 능력에 대한 발전과 함께 과학적인 목적의 대용량 수치 계산이 가능해지는 등 컴퓨터의 응용에 대해서도 많은 발전이 시..
2023.11.17 -
(재) 17143번 - 낚시왕
작년에 풀고 다시 한번 풀어봤는데... 로직도 다르고 훨씬 많이 줄어들었다! 그때는 왜 지금처럼 생각 못했을까나...! # 낚시왕 오른쪽으로 한 칸 이동 # 상어중 가장 땅과 가까운 상어 잡음 (격자판에서 상어 사라짐) # 상어 이동 - 격자판의 경계를 넘는 경우 방향을 바꿔 이동 # 상어가 두마리 이상 있을수 있는데 큰 상어가 나머지 상어를 모두 잡아먹음 def move(graph, R, C): dir = [0, [-1, 0], [1, 0], [0, 1], [0, -1]] newGraph = [[0]*(C+1) for _ in range(R+1)] # 상어 이동후 그래프 for i in range(1, R+1): for j in range(1, C+1): if graph[i][j] != 0: s, d,..
2023.03.27 -
2장 - 운영체제 개요 : 운영체제 예
운영체제의 예 1. MS 윈도우 (윈도우 95 -> 윈도우 XP -> 윈도우 Vista -> 윈도우 7 -> 윈도우 10) DOS 운영체제 위에서 수행되는 프로그램이 아닌 그 자체가 하나의 온전한 운영체제가 되도록 제작한 윈도우 95 나옴 윈도우 XP부터는 인터페이스 측면에서 다른 운영체제에 이미 익숙한 사용자를 비롯해 컴퓨터를 처음 다루는 초보자에게도 쉽게 배울 수 있는 방법을 제공 시스템에 새로운 하드웨어를 장착하면 OS가 자동으로 하드웨어를 감지해 그에 맞게 설정 -> "Plug and Play" 기능 네트워크 프로그램을 지원하여 윈도우 사용자들끼리 파일을 공유하거나, 프린터 등의 하드웨어를 공유할 수 있는 기능을 가지고 있음 * 윈도우 NT : MS 윈도우 중에서 안정성이 높고, 웹서버 등 다중 ..
2022.05.23