본문 바로가기

전체 글52

[컴퓨터구조]가상 메모리(Virtual memory) 가상메모리란? 각 프로그램에 실제 주소가 아닌 가상의 주소를 주는 것, 주기억장치(DRAM)보다 큰 용량을 사용하고자 할 때 이용한다. DRAM과 HDD간의 requirement 1. 이전 게시글을 참고하면, 캐시의 속도와 메인메모리(DRAM)의 용량을 한번에 가지고 싶기에, 우리는 locality를 사용했다. 이와 같이, 가상메모리를 이용해 메인메모리(DRAM)의 속도와 하드디스크의 용량의 장점을 모두 이용한다. 2. 여러개의 프로세서 간의 메모리를 공유한다. 하지만, 서로 데이터를 read하거나 write하지 않도록 만들어 protection을 제공한다. 3.주소 공간(Address space) - 각 프로그램이 전체 메모리를 다쓰고 있는 것처럼 보이게 한다. 어떻게 ? 가상메모리를 이용한다. 왜? .. 2020. 12. 1.
MyBatis MyBatis 자바 오브젝트와 SQL문 사이의 자동 Mapping 기능을 지원하는 sql Mapper이다. 마이바티스는 JDBC로 처리하는 상당부분의 코드와 파라미터 설정 및 결과 매핑을 대신해준다. 또한 자바 POJO 를 설정해서 매핑하기 위해 XML과 Annotation을 사용할 수 있다. MyBatis 특징 SQL문과 자바 객체간의 mapping기능 제공 간단한 코드로 DB접근 가능하게 함 SQL문은 자바에서 완전히 분리하여 XML파일에 별도로 관리 : 기존에는 DAO 파일에 SQL문을 작성했음. Mybatis에서는 Mapper파일에 SQL문을 입력하고 필요할 때마다 찾아올 수 있다. Spring과 연동하여 자동화 처리 유지보수성 향상 : Mapper 파일에만 SQL 코드를 입력하고 나중에 SQL .. 2020. 12. 1.
동치관계(equivalence relation)/동치류(Equivalence Class) 동치관계(Equivalence relation) 반사관계, 대칭관계, 추이관계가 모두 성립하는 관계 R A relation on a set A is called an equivalence relation if it is reflexive, symmetric, and transitive. 동치 동치관계에 있는 관계는 서로 "동치"라고 한다. notation은 a~b이다. Two elements a, and b that are related by an equivalence relation are called equivalent. The notation a ∼ b is often used to denote that a and b are equivalent elements with respect to a par.. 2020. 11. 29.
Bean creation exception 발생 원인/appservlet 을(를) 위한 servlet.init() 호출이 예외를 발생시켰습니다 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'boardController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.my.myapp.BoardService com.my.myapp.BoardController.boardService; nested exception is org.springframework.beans.factory.BeanCreationException:.. 2020. 11. 27.
[컴퓨터구조]캐시 메모리 성능 향상 (improving cache memory performance) / three placement policy multiple word direct mapped cache : 일반 direct mapped cache에서 spatial locality를 할 수 있도록 보완한 구조 - 캐시 한 라인의 데이터 block을 한번에 인접한 여러개의 데이터를 가져다 놓음 - 다른 데이터가 miss날 것을 예방 - 4개의 data가 같은 tag와 valid를 공유하고 있다. (절약) - 추가적으로 block offset이 필요 : 한 block안에서 4개 data중 1개의 data를 구분하여 출력하게함 (mux이용) -miss가 나면 block 중에 하나의 data만 교체하는 것이 아니라 block단위로 전체를 교체해야한다. 질문) 4개의 word를 한번에 가져오는 것이 과연 이득인가? 답) 주소를 하나주고 1개의 word를.. 2020. 11. 26.
Controller parameter 정리 / 리턴 타입 정리 controller parameter 정리 1. Request를 통해 파라미터 가져오기 @RequestMapping("/request") String temp1(HttpServletRequest request) { String a = request.getParameter("p1"); String b = request.getParameter("p2"); System.out.println("p1 : " + p1); System.out.println("p2 : " + p2); return "data"; } 2.HttpServletRequest, HttpServletResponse 이용 (Servlet과 관련) @RestController public class SampleController { @GetMapp.. 2020. 11. 25.
반응형