안녕하세요.
|
개발자 황준현입니다.

thumbnail
OS - Memory Management (2) [Paging]

👩‍💻 OS - Memory Management (2) [Paging] 3️⃣ NonContiguous Memory Allocation - Paging, Segment 앞서 봤던 Contiguous Allocation은 외부 단편화 문제를 해결하기 위한 방법으로 NonContiguous Memory Allocation 방법들이 있습니다. 그 중 Paging과 Segment를 알아보겠습니다. Paging Paging 은 NonContiguous Allocation 방식이다. 고정된 크기로 메모리는 Frame, 프로세스는 Page로 분할하여 관리한다. 한 프로새스는 여러 Page로 나뉘고 main memory에서 필요한 page를 순서 관계없이 Frame에 mapping해준다. Paging 장점 & 단점 장점 Physical memory를 frame 단위로 분할해 사용하기 때문에 External Fragment 발생할 일이 없다. 할당/해제 가 빠르다 Shared Page를 통해 자원을 쉽…

January 01, 2023
OS
Memory
Paging
TIL
OS - Memory Management (1)

👩‍💻 OS - Memory Management (1) Preview 1️⃣ Background - Memory Mapping & Protection, MMU, Virtual Memory, Swapping 2️⃣ Contiguous Memory Allocation - Block 3️⃣ NonContiguous Memory Allocation - Paging, Segment 1️⃣ Background 🛡️Memory Mapping & Protection logical 주소를 physical 주소로 mapping 하고 Out Of Memory 관리 [ 메모리 접근 범위 관리 ] ®️ Base Register & Limit Register Base Register : Physical Address(RAM)의 시작 주소 (Relocation Register) Limit Register : 현 프로그램이 사용할 수 있는 register의 마지막 주소 위 두 Register를 통해 Logical Addess…

December 31, 2022
OS
Memory
Paging
TIL
SecurityJwtLogin - 6 [Login & Signup & logout]

SecurityJwtLogin - 6 [Login & Signup & logout] Structure 💥 전반적인 구조는 아래 그림과 같이 작성될 예정입니다. - Controller - Service - Mapper 구조 content

December 06, 2022
Spring-Security
Spring-Boot
Jwt
Login
TIL
SecurityJwtLogin - 5 [JWT Filter & ExceptionHandler]

SecurityJwtLogin - 5 [JWT Filter & ExceptionHandler] Spring Security Filter Spring-Security 는 Filter 기반으로 동작합니다. 큰 그림을 보면 아래 그림과 같습니다. 출처 : gngsn님 블로그 큰 흐름은 위와 같고, 이를 모두 이해하기엔 어려움이 있어 우선 당장 사용하는 기능들에 필요한 부분만 이용하겠습니다. UsernamePasswordAuthenticationFilter 🔥 기본적으로 Authentication(인증)을 담당하는 필터는 AbstractAuthenticationProcessingFilter이다. AbstractAuthenticationProcessingFilter는 추상 클래스로 SecurityFilterChain에 직접 들어갈 수 없습니다. UsernamePasswordAuthenticationFilter는 이를 상속받은 클래스이다. UsernamePasswordAuthenticat…

December 06, 2022
Spring-Security
Spring-Boot
Jwt
Login
TIL
SecurityJwtLogin - 4 [Token Provider]

SecurityJwtLogin - 4 [Token Provider] Token Provider 토큰을 생성, 토큰으로부터 Authentication 생성, 유효성 검사 등의 작업을 수행할 Token Provider를 작성합니다. 이 때, 인스턴스가 생성되는 시점에 필요한 작업이 있습니다. 일반적으로 생성자가 호출될 때 수행합니다. 이 경우에 어떤 문제가 발생하는지 알아보겠습니다. InitializingBean VS @PostConstruct 일반적인 생성자 호출 시점에 수행 🌈 SingleTon 으로 관리한다고 가정 new Foo() 를 수행하게 되면 Animal 이 등록되지 않았기 때문에 NULL 이 된다. 또한, Proxy 등의 이유로 Spring Framework에서 여러 번 호출될 수 있는 생성자이기 때문에 animal을 여러 번 출력하게 됩니다. 이를 생성자 주입과 @PostConstruct로 수정한 코드를 살펴보겠습니다. @PostConstruct 생성자 주입을 통해…

December 03, 2022
Spring-Security
Spring-Boot
Jwt
Login
TIL