{ "topic": "gc-jvm", "type": "fill_blank", "schema_version": "1.0.0", "generated": "2026-09-02T00:00:00Z", "questions": [ { "id": "fb-001", "type": "fill_blank", "difficulty": 2, "tags": [ "jvm", "gc", "heap" ], "question": "JVM 堆内存分为两个主要代:新生代(Young Generation)和______代。", "explanation": "JVM 堆主要分为新生代(包含 Eden 和 Survivor 空间)和老年代。", "source": null, "related": [], "answer": [ "老" ], "answer_rule": "any" }, { "id": "fb-002", "type": "fill_blank", "difficulty": 2, "tags": [ "jvm", "gc", "heap" ], "question": "Eden、Survivor 0、Survivor 1 的默认比例是 ______。", "explanation": "默认情况下,新生代按 8:1:1 的比例划分为 Eden、S0 和 S1。", "source": null, "related": [], "answer": [ "8:1:1" ], "answer_rule": "any" }, { "id": "fb-003", "type": "fill_blank", "difficulty": 2, "tags": [ "jvm", "gc", "heap" ], "question": "新对象优先在新生代的 ______ 区分配。", "explanation": "新对象优先在 Eden 区分配,Eden 区满时触发 Minor GC。", "source": null, "related": [], "answer": [ "Eden" ], "answer_rule": "any" }, { "id": "fb-004", "type": "fill_blank", "difficulty": 2, "tags": [ "jvm", "gc", "heap" ], "question": "对象从新生代晋升到老年代的默认年龄阈值是 ______。", "explanation": "经历 15 次 GC(默认)仍然存活的对象会被晋升到老年代。", "source": null, "related": [], "answer": [ "15" ], "answer_rule": "any" }, { "id": "fb-005", "type": "fill_blank", "difficulty": 2, "tags": [ "jvm", "gc", "heap" ], "question": "当 Eden 区满时,会触发 ______ GC。", "explanation": "Minor GC(也叫 Young GC)在 Eden 区满时触发。", "source": null, "related": [], "answer": [ "Minor" ], "answer_rule": "any" }, { "id": "fb-006", "type": "fill_blank", "difficulty": 2, "tags": [ "jvm", "gc", "heap" ], "question": "三色标记法中,已被扫描但子对象尚未全部处理完成的对象标记为______色。", "explanation": "灰色对象已被扫描,但其子对象仍需处理。", "source": null, "related": [], "answer": [ "灰" ], "answer_rule": "any" }, { "id": "fb-007", "type": "fill_blank", "difficulty": 2, "tags": [ "jvm", "gc", "heap" ], "question": "三色标记法中,尚未被扫描、将被回收的对象标记为______色。", "explanation": "白色对象尚未被扫描,是回收的候选对象。", "source": null, "related": [], "answer": [ "白" ], "answer_rule": "any" }, { "id": "fb-008", "type": "fill_blank", "difficulty": 2, "tags": [ "jvm", "gc", "heap" ], "question": "CMS 垃圾收集器使用______更新(Incremental Update)来解决并发标记期间的漏标问题。", "explanation": "CMS 通过写屏障(Write Barrier)使用增量更新来追踪黑色对象新增对白色对象的引用。", "source": null, "related": [], "answer": [ "增量" ], "answer_rule": "any" }, { "id": "fb-009", "type": "fill_blank", "difficulty": 2, "tags": [ "jvm", "gc", "heap" ], "question": "G1 垃圾收集器使用______(Snapshot At The Beginning)来解决漏标问题。", "explanation": "G1 使用 SATB,在引用被覆盖前记录旧值。", "source": null, "related": [], "answer": [ "SATB" ], "answer_rule": "any" }, { "id": "fb-010", "type": "fill_blank", "difficulty": 2, "tags": [ "jvm", "gc", "heap" ], "question": "CMS 的四个阶段是:初始标记 → ______标记 → 重新标记 → 并发清除。", "explanation": "CMS 四阶段:Initial Mark(STW)→ Concurrent Mark → Remark(STW)→ Concurrent Sweep。", "source": null, "related": [], "answer": [ "并发" ], "answer_rule": "any" } ] }