본문 바로가기

전체 글3722

[CS] PCB(Process Control Block) PCB(Process Control Block)CB(Process Control Bolock)는 운영체제가 프로세스를 제어하기 위해 정보를 저장해 놓는 곳으로, 프로세스의 상태 정보를 저장하는 자료구조입니다. 프로세스 상태 관리와 문맥 교환(Context switch)을 위해서 필요하고 운영체제에서 프로세스는 PCB로 표현됩니다. 프로세스가 생성될 때마다 고유의 PCB가 생성되고, 프로세스가 완료되면 PCB도 함께 제거됩니다. 운영체제에 따라 PCB에 포함되는 항목이 다를 수 있지만, 일반적으로 아래와 같은 정보가 포함되어 있습니다. Pointer : 프로세스의 현재 위치를 저장하는 포인터 정보입니다.Process State : 현재 이 프로세스의 각 상태 (생성, 준비, 실행, 대기, 종료)를 기록.. 2026. 1. 24.
[백준/Java] 2573번 빙산 -Codeimport java.io.*;import java.util.*;public class BOJ2573 { static class Pos { int row, col; public Pos (int row, int col) { this.row = row; this.col = col; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Pos pos = (.. 2026. 1. 24.
[백준/Java] 13913번 숨바꼭질 4 -Codeimport java.io.*;import java.util.*;public class BOJ13913 { static class Info { int pos, time; public Info(int pos, int time) { this.pos = pos; this.time = time; } } static Integer[] parents = new Integer[100001]; static { Arrays.fill(parents, null); } public static void main(String[] args) throws Exception { Buffere.. 2026. 1. 24.
[백준/Java] 7798번 Hotel -Codeimport java.io.*;import java.util.*;public class BOJ7798 { static class HotelInfo { int bedSize, capacity, rooms, price; String name; public HotelInfo(int bedSize, int capacity, int rooms, int price, String name) { this.bedSize = bedSize; this.capacity = capacity; this.rooms = rooms; this.price = price; this.name.. 2026. 1. 24.
[백준/Java] 6593번 상범 빌딩 -Codeimport java.io.*;import java.util.*;public class BOJ6593 { static class Pos { int height, row, col, time; public Pos (int height, int row, int col, int time) { this.height = height; this.row = row; this.col = col; this.time = time; } } static int heightSize; static int rowSize; static int colSize; static char.. 2026. 1. 24.
[백준/Java] 4179번 불! -Codeimport java.io.*;import java.util.*;public class BOJ4179 { static class PosInfo { int row, col; boolean isFire; public PosInfo(int row, int col, boolean isFire) { this.row = row; this.col = col; this.isFire = isFire; } } static int rowSize; static int colSize; static boolean[][] visited; static char[][] miro; .. 2026. 1. 23.