IP Library Granted Patent US 12,656,952
Granted Patent B2
US 12,656,952 · App. 18/088,087 · Granted Jun 16, 2026

Memory management method and electronic device using the same

Inventors: Geunsik Lim (Suwon-si, KR); Myungjoo Ham (Suwon-si, KR)
Assignee: SAMSUNG ELECTRONICS CO., LTD.
G06F3/0611G06F3/0644G06F3/0679
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,656,952
App. No.
18/088,087
Granted
Jun 16, 2026
Kind
B2
Abstract

A memory management method or an electronic device for managing memory is provided. The method may include checking available capacity to allocate new process to first memory. The method may include determining whether to swap out the page of the first process to the first memory or the second memory, based on the available capacity and characteristics of the first process that is running in the first memory. The method may include allocating, as a swap space, a partial region of the first memory or the second memory that is determined. The method may include swapping out the page of the first process from the first memory to the swap space. The method may include identifying whether the swapped-out page is swapped-in from the swap space to the first memory. The method may include releasing the swap space.

Claims (40)

1 . An electronic device comprising:

a first memory;

a second memory; and

at least one processor configured to execute a first process by loading, to the first memory, pages of the first process related to an application stored in the second memory,

wherein the at least one processor is further configured to:

determine an available capacity of the first memory for executing a new process,

determine whether to swap out the page of the first process to the first memory or the second memory, based on the available capacity, and based on characteristics of the first process that is running in the first memory, by:

when a space in the first memory is insufficient for allocating a region of the first memory as a swap space, determine a first page among the pages of the first process, based on a number of times that the pages of the first process are referred to by a plurality of processes, and remove the first page from the first memory,

when the available capacity for allocating the new process to the first memory is still insufficient even after removing the first page from the first memory, identify whether a space in the second memory is sufficient to swap-out a page of a process that is running in the first memory, and

when the space in the second memory is insufficient, determine a second page among pages written to the second memory, based on a time at which the pages written to the second memory were swapped out to the second memory, and remove the second page from the second memory,

allocate a partial region of the first memory or the second memory that is determined as a new swap space,

swap-out the page of the first process from the first memory to the new swap space, identify whether the swapped-out page is swapped-in from the new swap space to the first memory, and

release the new swap space based on the new swap space being empty by the identifying that the swapped-out page is swapped-in.

2 . The electronic device of claim 1 , wherein the characteristics of the first process comprise at least one of a reaction time of the application or a degree of state preservation of a process.

3 . The electronic device of claim 2 , wherein the at least one processor is configured to determine the number of times the page of the first process is referred to by the plurality of processes.

4 . The electronic device of claim 1 , wherein the pages of the first process comprise a shared object (SO) page belonging to a shared library.

5 . The electronic device of claim 1 , wherein the first page and the second page comprise a shared object (SO) page belonging to a shared library.

6 . The electronic device of claim 1 , wherein the at least one processor is further configured to, when the available capacity for allocating the new process to the first memory is still insufficient even after removing the second page from the second memory, calculate a required time for driving each process of a plurality of processes that are running in the first memory,

determine, based on the calculated times, an order of terminating the plurality of processes that are running in the first memory, and

terminate at least one process from among the plurality of processes that are running in the first memory.

7 . The electronic device of claim 6 , wherein the required time comprises at least one of a time required for searching for an SO symbol of the page of the process or a time required for executing an extensible Markup Language (XML)-based User Interface (UI) process.

8 . A memory management method of an electronic device, the memory management method comprising:

determining an available capacity of a first memory for executing a new process,

determining whether to swap out a page of a first process to the first memory or to a second memory, based on the available capacity, and based on characteristics of the first process that is running in the first memory, by:

when a space in the first memory is insufficient for allocating a region of the first memory as a swap space, determining a first page among pages of the first process, based on a number of times that the pages of the first process are referred to by a plurality of processes, and removing the first page from the first memory,

when the available capacity for allocating the new process to the first memory is still insufficient even after removing the first page from the first memory, identifying whether a space in the second memory is sufficient to swap-out a page of a process that is running in the first memory,

when the space in the second memory is insufficient, determining a second page among pages written to the second memory, based on a time at which the pages written to the second memory were swapped out to the second memory, and removing the second page from the second memory,

allocating a partial region of the first memory or the second memory that is determined as a new swap space,

swapping out the page of the first process from the first memory to the new swap space,

identifying whether the swapped-out page is swapped-in from the new swap space to the first memory, and

releasing the new swap space based on the new swap space being empty by the identifying that the swapped-out page is swapped-in.

9 . The memory management method of claim 8 , wherein the characteristics of the first process comprise at least one of a reaction time of an application or a degree of state preservation of a process.

10 . The memory management method of claim 9 , further comprising determining the number of times the page of the first process is referred to by the plurality of processes.

11 . The memory management method of claim 8 , wherein the pages of the first process comprise a shared object (SO) page belonging to a shared library.

12 . The memory management method of claim 8 , wherein the first page and the second page comprise a shared object (SO) page belonging to a shared library.

13 . The memory management method of claim 8 , further comprising:

when the available capacity for allocating the new process to the first memory is still insufficient even after removing the second page from the second memory, calculating a required time for driving each process of a plurality of processes that are running in the first memory;

determining an order of terminating the plurality of processes that are running in the first memory, based on the calculated times; and

terminating at least one process from among the plurality of processes that are running in the first memory.

14 . The memory management method of claim 13 , wherein the required time comprises at least one of a time required for searching for an SO symbol of the page of the process or a time required for executing an extensible Markup Language (XML)-based User Interface (UI) process.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 23, 2022
From: LIM, GEUNSIK; HAM, MYUNGJOO
To: SAMSUNG ELECTRONICS CO., LTD.
Reel/Frame 062197/0193 →
Priority Claims (2)
KR 10-2021-0186591 · Dec 23, 2021 · national
KR 10-2022-0075779 · Jun 21, 2022 · national
Continuity (2)
Continuation PCTKR2022020344 · Dec 14, 2022
Related Publication 20230214122A1 · Jul 6, 2023
References Cited (81)
US 5212786A · Sathi · 1993 [cited by applicant]
US 5724300A · Tanaka et al. · 1998 [cited by applicant]
US 5734913A · Iwamura et al. · 1998 [cited by applicant]
US 5778419A · Hansen et al. · 1998 [cited by applicant]
US 5860083A · Sukegawa · 1999 [cited by applicant]
US 6401167B1 · Barth et al. · 2002 [cited by applicant]
US 6684345B2 · Harari et al. · 2004 [cited by applicant]
US 6990547B2 · Ulrich et al. · 2006 [cited by applicant]
US 7389315B1 · Scott · 2008 [cited by applicant]
US 8484405B2 · Mashtizadeh et al. · 2013 [cited by applicant]
US 8493482B2 · Cote et al. · 2013 [cited by applicant]
US 8510743B2 · Hackborn et al. · 2013 [cited by applicant]
US 8595460B2 · Bhat et al. · 2013 [cited by applicant]
US 9195581B2 · Barbou-Des-Places et al. · 2015 [cited by applicant]
US 9250958B2 · Mark et al. · 2016 [cited by applicant]
US 9501238B2 · Yun et al. · 2016 [cited by applicant]
US 9678687B2 · Woodward et al. · 2017 [cited by applicant]
US 9712319B2 · Avanzi · 2017 [cited by applicant]
US 9811260B2 · Bonzini et al. · 2017 [cited by applicant]
US 10133601B2 · Apparao et al. · 2018 [cited by applicant]
US 10216536B2 · Banerjee et al. · 2019 [cited by applicant]
US 10423435B1 · Khafizov et al. · 2019 [cited by applicant]
US 10635337B2 · Apparao et al. · 2020 [cited by applicant]
US 10915245B2 · Stabrawa et al. · 2021 [cited by applicant]
US 11409648B2 · Choi et al. · 2022 [cited by applicant]
US 20050268067A1 · Lee · 2005 [cited by examiner]
US 20100023565A1 · Colbert · 2010 [cited by examiner]
US 20120159111A1 · Kim et al. · 2012 [cited by applicant]
US 20130262738A1 · Kwon et al. · 2013 [cited by applicant]
US 20150347042A1 · Kim et al. · 2015 [cited by applicant]
US 20160098203A1 · Chang · 2016 [cited by examiner]
US 20200004677A1 · Firoozshahian · 2020 [cited by examiner]
US 20210200463A1 · Seo · 2021 [cited by examiner]
CN 102623053A · 2012 [cited by applicant]
JP 756800A · 1995 [cited by applicant]
JP 2008217208A · 2008 [cited by applicant]
KR 1020120069475A · 2012 [cited by applicant]
KR 101371338B1 · 2014 [cited by applicant]
KR 1020150139017A · 2015 [cited by applicant]
KR 101924022B1 · 2019 [cited by applicant]
KR 1020190117294A · 2019 [cited by applicant]
KR 1020200056046A · 2020 [cited by applicant]
KR 102165460B1 · 2020 [cited by applicant]
KR 102559784B1 · 2023 [cited by applicant]
WO 2014104509A1 · 2014 [cited by applicant]
Axboe, “swap: fix swapfile read/write offset” index : kernel/git/torvalds/linux.git, Mar. 2021, Total 1 page. [cited by applicant]
Larabel, “Google Proposes Multi-Generational LRU For Linux To Yield Much Better Performance,” Mar. 2021, Total 2 pages. [cited by applicant]
Kay, “Linux Swap Space,” Linux Journal, Feb. 2011, Total 11 pages. [cited by applicant]
Isy00dna, “swap linux,” Hangeul's Blog, Nov. 2007, Total 3 pages. [cited by applicant]
Corbet, “2.6 swapping behavior,” LWN.net, May 2004, Total 6 pages. [cited by applicant]
Zacchiroli, Programmation Systèmes, Cours 9—Memory Mapping, Nov. 2011, Total 81 pages (http://upsilon.cc/zack/teaching/1112/progsyst/). [cited by applicant]
Prep Insta, “Swapping in Operating System (OS),” 2022, Total 3 pages. [cited by applicant]
Zhu et al., “SmartSwap: High-performance and user experience friendly swapping in mobile systems,” 2017 54th ACM/EDAC/IEEE Design Automation Conference (DAC), 2017, Total 3 pages. [cited by applicant]
Hahn et al., “FastTrack: Foreground App-Aware I/O Management for Improving User Experience of Android Smartphones,” The Advanced Computing Systems Association, 2018 USENIX Annual Technical Conference, Jul. 2018, Total 1… [cited by applicant]
Lebeck et al., “End the Senseless Killing: Improving Memory Management for Mobile Operating Systems,” The Advanced Computing Systems Association, 2020 USENIX Annual Technical Conference, Jul. 2020, Total 16 pages. [cited by applicant]
Liang et al., “Acclaim: Adaptive Memory Reclaim to Improve User Experience in Android Systems,” The Advanced Computing Systems Association, 2020 USENIX Annual Technical Conference, Jul. 2020, Total 15 pages. [cited by applicant]
Son et al., “ASAP: Fast Mobile Application Switch via Adaptive Prepaging,” The Advanced Computing Systems Association, 2021 USENIX Annual Technical Conference, Jul. 2021, Total 15 pages. [cited by applicant]
“low memory killer daemon,” Last updated Aug. 4, 2022, Total 4 pages. [cited by applicant]
Chen, “Why Mobile Applications Need UFS,” Flash Memory Summit 2014, Santa Clara, CA, 2014, Total 7 pages. [cited by applicant]
Han et al., “A Hybrid Swapping Scheme Based On Per-Process Reclaim for Performance Per-Process Reclaim for Performance Improvement of Android Smartphones (Aug. 2018), ” IEEE Access, vol. 6, pp. 56099-56108, 2018. [cited by applicant]
Larabel, “Zswap Could See Better Performance Thanks To A B-Tree Search Implementation,” Nov. 2019, Total 1 page. [cited by applicant]
Wool, “[Patch] zswap: use B-tree for search,” Nov. 2019, Total 5 pages. [cited by applicant]
Zhao, “[Patch v1 00/14] Multigenerational LRU,” Mar. 2021, Total 4 pages. [cited by applicant]
Moon, “Swap -1- (Basic, initialization),” Oct. 2019, Total 30 pages. [cited by applicant]
Moon, “Zoned Allocator -6- (Watermark),” Jun. 2016, Total 23 pages. [cited by applicant]
Anonymous, “Chapter 10 Page Frame Reclamation,” Jun. 2016, Total 7 pages. [cited by applicant]
Aixxe, “Loading, unloading & reloading shared libraries,” Last updated Feb. 24, 2022, Total 5 pages. [cited by applicant]
Kerrisk, “dlopen(3)—Linux manual page,” Linux/UNIX systems programming training, Linux Programmer's Manual, 2021, Total 5 pages. [cited by applicant]
Jung et al., “Performance Characterization of Prelinking and Preloading for Embedded Systems,” Conference Paper, Jan. 2007, Total 9 pages. [cited by applicant]
Gorman, “Swap-over-NFS without deadlocking V9,” Jul. 2012, Total 2 pages. [cited by applicant]
Anonymous, “Coreutils—GNU core utilities,” Free Software Foundation, Inc. 2016, Total 2 pages. [cited by applicant]
Anonymous, “SwapSpace,” openmokowiki, Last modified Aug. 15, 2010, Total 2 pages. [cited by applicant]
Anonymous, “What Swapspace does for you, Where it comes from, How it compares, and When not to use it,” Swapspace—swap file manager for Linux, May 2020, Total 2 pages. [cited by applicant]
Mrchrisj, “Best way to disable the Swap File on Raspbian #20,” Feb. 2016, Total 2 pages. [cited by applicant]
Anonymous, “Factory Images for Nexus and Pixel Devices,” Last updated Dec. 5, 2022, Total 4 pages. [cited by applicant]
Google Pixel 5—Full phone specifications, Oct. 2020, Total 3 pages. [cited by applicant]
Qualcomm, “Snapdragon 765G 5G Mobile Platform,” 2022, Total 7 pages. [cited by applicant]
Zhu et al., “Revisiting Swapping in Mobile Systems with SwapBench,” Preprint submitted to Journal of Latex Templates, Apr. 2016, Total 41 pages. [cited by applicant]
Moon, “Zone Bitmap (API),” Apr. 2016, Total 7 pages. [cited by applicant]
International Search Report (PCT/ISA/210) and Written Opinion (PCT/ISA/237) issued by the International Searching Authority on Mar. 13, 2023 in corresponding International Application No. PCT/KR2022/020344. [cited by applicant]
Communication dated Mar. 26, 2025, issued by European Patent Office in European Patent Application No. 22911762.7. [cited by applicant]