[CS] Computer Science Part2 Day-86

cptkuk91·2022년 3월 22일
1

CS

목록 보기
135/139

Garbage Collection

This function automatically cleans up unused memory.

Garbage Collection Types

Tracing garbage collection

Garbage Collection visits the object every cycle and checks the flag. This is a mark and sweep method that checks flags. In-use flags are put on objects that are used, and objects that are not marked clean up memory by deleting.

Reference Counting

Cleans up memory by checking the number of variables referencing an object. If the object reference keeps decrementing or Zero, Reference Counting considers unused memory and clean up the memory.


Cache

It is a space for storing the results of tasks that require a lot of time or computation.

High-speed data storage, intended for data store. It is efficient for reuse. it can process requests faster than the default storage space.

How Cache Works

Cache data is stored on hardware that can be accessed quickly, such as RAM.
It outputs data faster than SSD and HDD and improves performance.

Advantages of Cache

  • performance improvement
  • Reduce database costs
  • 읽기 처리량(IOPS: Input, Output Operations per second) Improvement

Application of Cache in Web Services

  • Client: HTTP Cache Header, Browser
  • Network: DNS Server, HTTP Cache Header, CDN
  • Server & Database: Data store, Local Cache

profile
메일은 매일 확인하고 있습니다. 궁금하신 부분이나 틀린 부분에 대한 지적사항이 있으시다면 언제든 편하게 연락 부탁드려요 :)

0개의 댓글