본문 바로가기

전체 글18

CPU Scheduling Algorithms (3) CPU Scheduling Algorithms (3) Shortest Remaining Time First(SRTF) Scheduleing Algorithm Preemptive version of SJF. Response time = start process time(?) - arrival time In any non-preemptive scheduleing algorithm, Response time = Waiting time but this not be true for preemptive scheduling algorithms First Come First Served(FCFS) Scheduling Algorithm - The process which has the least arrival time .. 2021. 12. 5.
CPU Scheduling Algorithms (2) CPU Scheduling Algorithms preemptive scheduling algorithms non-preemptive scheduling algorithms CPU scheduling algorithms are applied only to processes which are in the ready state. Processes which are in I/O state will be blocked and so those processes will not be considered by schedulling algorithms while scheduling Shortest Job First Scheduling Algorithms process Id Arrival time burst time 1 .. 2021. 11. 28.
CPU Scheduling Algorithms (1) CPU Scheduling Algorithms (1) 1) Long Term Scheduler RAM -> CPU 2) Short Term Scheduler Disk -> RAM 3) Medium Term Scheduler if RAM is FULL: decide what process changed(swaped?) RAM -> Disk context switch various times related to a process 1) arrival time RAM -> CPU arrival time 2) burst time (also called execution time) 3) completion time 4) turn-around time arrival time to completion time => (.. 2021. 11. 28.
Operating System Concepts Operating System Concepts 1. Program vs Process, States of a process 실행중인 프로그램을 프로세스라고 한다. A program in execution is called as process Program vs Process 프로그램을 설치하면 Disk에 Compile이 된 상태로 저장된다. 그리고 이 프로그램을 실행하면 RAM에 프로그램을 복사한다. 이 과정을 자세히 보면 다음과 같다. 1. Disk에 인스턴스를 생성한다. (이것을 Process라고 한다.) 2. 생성한 인스턴스를 RAM으로 옮긴다. States of a process New State Disk에 인스턴스가 생성된 상태 Ready State 인스턴스가 RAM으로 이동되어 CPU가 처리할.. 2021. 11. 25.
Introduction to Operating Systems Introduction to Operating Systems 1. Introduction to Operating Systems 컴퓨터는 문제를 풀기위한 하드웨어와 소프트웨어, 데이터로 구성된 시스템 combination of hardware, software and data which are used to solve problem of human beings 하드웨어 구성요소 CPU(Central Processing Unit) 컴퓨터에서 연산을 처리하는 유닛. Memory RAM 접근속도가 빠르지만 휘발성이다.(컴퓨터 종료시 사라짐) DISK 영구적으로 저장이 가능하지만 접근속도가 느리다. CACHE CPU 내부에 있는 저장공간 REGISTER 2. How hardware devices work toge.. 2021. 11. 25.
[SQL] SELECT (IN) [SQL] SELECT (IN) 여러 값 중 하나의 값에 해당하는 데이터를 조회하고 싶을때 IN 키워드를 사용할 수 있습니다. 사용법은 다음과 같습니다. SELECT color FROM table WHERE color IN ('value1', 'value2') 예) HERO COLOR Iron-man RED Hulk GREEN Captain America BLUE Black Widow BLACK SELECT hero, color FROM table WHERE color IN ('RED', 'GREEN') 결과) HERO COLOR Iron-man RED Hulk GREEN 2020. 9. 22.
[SQL] SELECT (LIMIT, BETWEEN) [SQL] SELECT (LIMIT, BETWEEN) 조회할 데이터의 갯수를 제한하고 싶을때, LIMIT 키워드를 사용할 수 있습니다. SELECT * FROM payment ORDER BY payment_date DESC LIMIT 5; SELECT * FROM payment WHERE amount != 0.00 ORDER BY payment_date DESC LIMIT 5; 특정 값들 사이의 데이터를 조회하고 싶을때는 1. (value high)처럼 OR을 이용한 두가지 조건값으로 제한할 수 있습니다. 2. value NOT BETWEEN low AND high 처럼 BETWEEN 키워드를 사용할 수도 있습니다. BETWEEN 키워드는 date타입에도 사용할 수 있지.. 2020. 9. 22.
[SQL] SELECT (ORDER BY, ASC, DESC) [SQL] SELECT (part 3) 데이터를 오름차순 또는 내림차순으로 정렬하여 조회하고 싶을때는 ORDER BY 키워드를 사용합니다. 오름차순으로 정렬하고 싶을때는 ASC 키워드를, 내림차순으로 정렬하고 싶을때는 DESC 키워드를 함께 사용합니다. (ASC sort in ascending order / DESC sort in descending order) ASC, DESC키워드를 사용하지 않았을때는 ASC가 기본 값으로 적용됩니다. (default is ASC) 사용법은 다음과 같습니다. culumn_1과 column_2를 조회할건데, column_1을 기준으로 [오름차순 / 내림차순] 으로 정렬한다. SELECT [column_1, column_2] FROM table ORDER BY [colu.. 2020. 9. 22.
[SQL] SELECT (WHERE, AND, OR) [SQL] SELECT (WHERE, AND, OR) 이번에는 특정 조건에 맞는 데이터를 조회하는 방법에 대해 알아보겠습니다. Name Choice Aiden Coffee Jarvis Coffee Aiden Cake Tony Juice SELECT문법에 조건을 추가할때는 WHERE 키워드를 사용합니다. WHERE 키워드는 다음과 같이 사용합니다. 먼저 이름이 Aiden인 데이터는 아래처럼 조회할 수 있습니다. SELECT name FROM table WHERE name = 'Aiden'; Name Choice Aiden Coffee Aiden Cake 두가지 조건을 동시에 주는 경우는 어떻게 할 수 있을까요? AND 또는 OR을 이용해 조건을 추가할 수 있습니다. # 이름이 Aiden이고 Coffee를 .. 2020. 9. 22.
[SQL] SELECT ( SELECT, DISTINCT, COUNT ) [SQL] SELECT ( SELECT, DISTINCT, COUNT ) SQL에서 제일 많이쓰이는 SELECT에 대한 글입니다. SELECT는 데이터를 조회할 때 사용하는 SQL입니다. [table]에서 [column]조회하기 SELECT [column] FROM [table]; [table]에서 여러 column 조회하기 SELECT [column1, column2, ...] FROM [table]; 중복값을 제외한 값들에 대해 조회하고 싶을땐 어떻게 할 수 있을까요? DISTINCT를 사용하면 쉽게 유니크 값을 조회할 수 있습니다. DISTINCT는 다음과 같이 두 가지 방법으로 사용할 수 있습니다. #1 SELECT DISTINCT [column] FROM [table]; #2 SELECT DIS.. 2020. 9. 22.
MAC - iTerm2 소개 MAC - iTerm2 소개 MacOS에는 기본 터미널이 제공되지만, 화면 분할, 멀티탭 등 편리한 기능이 추가된 iTerm2를 소개합니다. -공식 페이지 iTerm2 - iterm2.com/ iTerm2 - macOS Terminal Replacement iTerm2 by George Nachman. Website by Matthew Freeman, George Nachman, and James A. Rosen. Website updated and optimized by HexBrain iterm2.com -자주 사용하는 단축키입니다. 새 창 열기 Command + n 새 탭 열기 Command + t 탭 이동하기 Command + [탭 번호] Command + [방향키] 세로방향으로 탭 분할하기 Co.. 2020. 9. 11.
Linux Screen이란 무엇인가? Linux Screen이란 무엇인가? Screen은 하나의 인스턴스에 여러 세션을 만들어 각각 다른 작업을 할 수 있게 도와주는 도구입니다. 설치 방법 sudo apt-get install screen Screen 만드는 방법 screen Screen 이름을 지정하여 만드는 방법 screen -S [name] Screen을 만든 후에 작업을 하고 Detach를 하는 방법은 [Ctrl + A] + [D]입니다. (*Detach: 세션은 실행중인 상태로 연결을 끊는 것) 실행중인 Screen을 보는 방법 screen -ls Screen에 재진입을 하는 방법 screen -r [name] [-r] 옵션은 Detach인 [name]의 Screen이 있을땐 재진입, 없을땐 생성해줍니다. screen -x [nam.. 2020. 9. 8.
SSH는 무엇인가? (with SSH Config) SSH는 무엇인가? (with SSH Config) SSH는 Secure SHell입니다. 네트워크 상의 다른 컴퓨터에 로그인하거나, 명령어를 실행하고 파일도 복사(SCP, Secure CoPy)할 수 있는 프로토콜 및 응용프로그램을 말합니다. SSH는 사유 소프트웨어이기 때문에, 대안으로 OPEN SOURCE인 OPEN SSH가 개발되었습니다. open ssh - https://www.openssh.com/ OpenSSH OpenSSH 8.3 released May 27, 2020 OpenSSH is the premier connectivity tool for remote login with the SSH protocol. It encrypts all traffic to eliminate eavesdr.. 2020. 9. 7.
Node.js / Express.js에서 Middleware란? Node.js / Express.js에서 Middleware란? Middleware는 req와 res사이에 있는 어떤 기능입니다. Express.js에서는 use()라는 함수로 Middleware를 추가합니다. const express = require('express'); const app = express(); app.use((req, res, next) => { console.log("I'm Middleware"); //Middleware는 req, res, next를 args로 받는 함수. }) app.listen(3000); args의 req, res는 request, response이고 next는 다음 Middleware로 넘어가는 함수입니다. #1) const express = require.. 2020. 9. 1.
Node.js / Express.js 소개 Node.js / Express.js 소개 Express.js는 Node.js에서 Http서버를 쉽게 만들 수 있게 도와주는 모듈입니다. 설치방법 // use npm npm install express // use yarn yarn add express #1) Node.js Core-Module http를 이용한 방법 const http = require("http"); const requestListener = require((req, res) => { console.log(" I'm requestListener"); }); const server = http.createServer(requestListener); server.listen(3000); #2-1) http + express.js를 이용한.. 2020. 9. 1.