-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetting-started.html
More file actions
411 lines (386 loc) · 17 KB
/
getting-started.html
File metadata and controls
411 lines (386 loc) · 17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
---
layout: default
title: "Getting Started - Multikernel Technologies"
description: "Get up and running with Multikernel Linux. Learn how to build, configure, and launch your first multikernel instance."
permalink: /getting-started.html
---
<style>
/* Overview step cards */
.gs-overview-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: var(--space-4);
margin-bottom: var(--space-6);
}
.gs-overview-card {
text-align: center;
padding: var(--space-5);
background: var(--gray-50);
border-radius: var(--radius-md);
border: 1px solid var(--gray-200);
border-top: 2px solid var(--accent-500);
}
.gs-overview-card .step-num {
display: inline-flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
border-radius: 50%;
background: var(--gray-900);
color: var(--accent-400);
font-family: var(--font-mono);
font-weight: 700;
font-size: var(--text-xs);
margin-bottom: var(--space-3);
}
.gs-overview-card h3 {
font-size: var(--text-sm);
font-weight: 700;
color: var(--gray-900);
margin-bottom: var(--space-1);
}
.gs-overview-card p {
font-size: var(--text-xs);
color: var(--gray-500);
line-height: var(--leading-relaxed);
margin: 0;
}
/* Step badge */
.step-badge {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
border-radius: 50%;
background: var(--accent-500);
color: var(--gray-900);
font-family: var(--font-mono);
font-weight: 700;
font-size: var(--text-xs);
flex-shrink: 0;
}
/* Code blocks */
.content-card pre {
background: var(--gray-900);
border: none;
border-radius: var(--radius-md);
padding: var(--space-5) var(--space-6);
overflow-x: auto;
font-size: var(--text-sm);
line-height: 1.7;
color: var(--gray-300);
margin: var(--space-4) 0;
}
.content-card pre code {
font-family: var(--font-mono);
color: var(--gray-300);
}
.content-card p code,
.content-card li code {
background: var(--gray-50);
padding: 2px 6px;
border-radius: var(--radius-sm);
border: 1px solid var(--gray-200);
color: var(--accent-800);
font-family: var(--font-mono);
font-size: 0.88em;
}
/* Diagram */
.gs-diagram {
background: var(--gray-900);
border: 1px solid rgba(255,255,255,0.06);
border-radius: var(--radius-md);
padding: var(--space-5);
margin: var(--space-5) 0;
overflow-x: auto;
}
.gs-diagram pre {
background: none;
border: none;
padding: 0;
margin: 0;
text-align: center;
font-size: var(--text-sm);
line-height: 1.5;
color: var(--gray-400);
}
/* Comparison table */
.gs-comparison {
overflow-x: auto;
margin: var(--space-5) 0;
border-radius: var(--radius-md);
border: 1px solid var(--gray-200);
}
.gs-comparison table {
width: 100%;
border-collapse: collapse;
font-size: var(--text-sm);
}
.gs-comparison thead th {
background: var(--gray-900);
color: rgba(255,255,255,0.8);
font-family: var(--font-mono);
font-weight: 600;
padding: var(--space-3) var(--space-4);
text-align: left;
font-size: var(--text-xs);
text-transform: uppercase;
letter-spacing: 0.06em;
}
.gs-comparison thead th:last-child {
background: var(--accent-700);
color: white;
}
.gs-comparison tbody td {
padding: var(--space-3) var(--space-4);
border-bottom: 1px solid var(--gray-200);
color: var(--gray-600);
}
.gs-comparison tbody td:first-child {
font-weight: 600;
color: var(--gray-900);
background: var(--gray-50);
}
.gs-comparison tbody td:last-child {
color: var(--gray-900);
font-weight: 600;
background: rgba(226, 162, 59, 0.05);
}
.gs-comparison tbody tr:last-child td {
border-bottom: none;
}
.gs-comparison tbody tr:hover {
background: var(--gray-25);
}
/* CTA card */
.gs-cta {
background: var(--gray-50);
text-align: center;
border-top: 2px solid var(--accent-500);
border-left: 3px solid transparent;
}
.gs-cta .button-group {
display: flex;
gap: var(--space-3);
justify-content: center;
flex-wrap: wrap;
margin-top: var(--space-5);
}
.gs-cta .btn-primary {
background: var(--accent-500);
color: var(--gray-900);
border-color: var(--accent-500);
}
.gs-cta .btn-primary:hover {
background: var(--accent-400);
color: var(--gray-900);
box-shadow: 0 0 16px rgba(226, 162, 59, 0.2);
}
.gs-cta .btn-secondary {
background: white;
color: var(--gray-700);
border-color: var(--gray-200);
}
.gs-cta .btn-secondary:hover {
background: var(--gray-50);
color: var(--gray-900);
border-color: var(--gray-300);
}
@media (max-width: 768px) {
.gs-overview-grid {
grid-template-columns: 1fr;
}
}
</style>
<main>
<section class="hero">
<div class="hero-container">
<h1>Getting Started with Multikernel</h1>
<p class="subtitle">Split your Linux kernel into independent instances for your application and device processing. No hypervisor, no virtualization overhead, full hardware access.</p>
<div class="button-group">
<a href="https://github.com/multikernel/linux" target="_blank" rel="noopener noreferrer" class="btn btn-primary">
<i data-lucide="github"></i>
View on GitHub
</a>
<a href="/technology.html" class="btn btn-secondary">
<i data-lucide="cpu"></i>
Learn the Architecture
</a>
</div>
</div>
</section>
<section class="content-page">
<div class="content-container">
<!-- Overview -->
<div class="content-card">
<div class="gs-overview-grid">
<div class="gs-overview-card">
<div class="step-num">1</div>
<h3>Build the Kernel</h3>
<p>Clone and compile the multikernel-enabled Linux kernel</p>
</div>
<div class="gs-overview-card">
<div class="step-num">2</div>
<h3>Configure Boot</h3>
<p>Reserve a memory pool for spawned kernel instances</p>
</div>
<div class="gs-overview-card">
<div class="step-num">3</div>
<h3>Launch Instances</h3>
<p>Use kerf to create, configure, and run kernel instances</p>
</div>
</div>
</div>
<!-- What is Multikernel -->
<div class="content-card">
<h2><i data-lucide="layers"></i>What is Multikernel Linux?</h2>
<p>Multikernel splits the Linux kernel into independent instances running simultaneously on the same physical machine. Your application gets its own kernel with dedicated CPUs, memory, and zero interrupt interference. Device drivers and I/O processing run in a separate kernel on separate cores. No hypervisor, native performance.</p>
<div class="gs-diagram"><pre>
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Web Server │ │ Database │ │ ML Training │
├─────────────────┤ ├─────────────────┤ ├─────────────────┤
│ Linux Kernel │ │ Linux Kernel │ │ Linux Kernel │
│ (Web-tuned) │ │ (I/O-optimized)│ │ (GPU-optimized)│
├─────────────────┤ ├─────────────────┤ ├─────────────────┤
│ CPU + NIC │ │ CPU + NVMe │ │ CPU + GPU │
└─────────────────┘ └─────────────────┘ └─────────────────┘
</pre></div>
<p>Each workload runs inside its own kernel with a tailored configuration, fully isolated from other instances. A driver crash or kernel exploit in one instance cannot affect the others. Resources can be rebalanced between kernels at runtime using standard Linux hotplug.</p>
<div class="gs-comparison">
<table>
<thead>
<tr>
<th></th>
<th>Containers</th>
<th>VMs</th>
<th>Multikernel</th>
</tr>
</thead>
<tbody>
<tr>
<td>Isolation</td>
<td>Shared kernel</td>
<td>Full (hypervisor)</td>
<td>Separate kernels</td>
</tr>
<tr>
<td>Performance</td>
<td>Near-native</td>
<td>5-20% overhead</td>
<td>Native</td>
</tr>
<tr>
<td>Kernel customization</td>
<td>No</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Dynamic resources</td>
<td>Yes</td>
<td>Limited</td>
<td>Yes (hotplug)</td>
</tr>
<tr>
<td>Zero-downtime updates</td>
<td>App only</td>
<td>With orchestration</td>
<td>Kernel + app</td>
</tr>
<tr>
<td>Attack surface</td>
<td>Full kernel</td>
<td>Reduced</td>
<td>Minimal per instance</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Step 1: Build -->
<div class="content-card">
<h2><i data-lucide="hammer"></i><span class="step-badge">1</span> Build the Multikernel Kernel</h2>
<p>Clone the multikernel-enabled Linux kernel and build it with multikernel support enabled.</p>
<pre><code>git clone https://github.com/multikernel/linux.git
cd linux
make menuconfig # Enable CONFIG_MULTIKERNEL
make -j$(nproc)
sudo make install</code></pre>
<p>This produces a standard Linux kernel with multikernel extensions. It runs as your normal kernel and can additionally spawn new kernel instances.</p>
</div>
<!-- Step 2: Configure -->
<div class="content-card">
<h2><i data-lucide="settings"></i><span class="step-badge">2</span> Reserve a Memory Pool</h2>
<p>Spawned kernels need a contiguous memory region. Add the following kernel boot parameter to your bootloader (GRUB, systemd-boot, etc.):</p>
<pre><code>mkkernel_pool=1023M@0x40000000</code></pre>
<p>This reserves 1023 MB starting at physical address 0x40000000 for multikernel use. The primary kernel will not use this memory, and it becomes available for spawned instances.</p>
<p>Alternatively, you can use <a href="https://github.com/multikernel/lazy_cma" target="_blank" rel="noopener noreferrer">Lazy CMA</a> to allocate this memory at runtime without any boot parameter.</p>
</div>
<!-- Step 3: Install kerf -->
<div class="content-card">
<h2><i data-lucide="terminal"></i><span class="step-badge">3</span> Install the Kerf Management Tool</h2>
<p>Kerf is the command-line tool for creating, configuring, and managing multikernel instances. It handles resource allocation, kernel loading, and instance lifecycle.</p>
<pre><code>git clone https://github.com/multikernel/kerf.git
cd kerf
pip install -e .</code></pre>
</div>
<!-- Step 4: Launch -->
<div class="content-card">
<h2><i data-lucide="rocket"></i><span class="step-badge">4</span> Launch Your First Instance</h2>
<p>Initialize a resource pool, create an instance, and launch it:</p>
<pre><code># Initialize: make CPUs 4-31 available for spawned kernels
kerf init --cpus=4-31
# Create an instance with 4 CPUs and 2 GB of memory
kerf create web-server --cpus=4-7 --memory=2GB
# Load a kernel and initrd into the instance
kerf load web-server --kernel=/boot/vmlinuz --initrd=/boot/initrd.img
# Boot the instance
kerf exec web-server</code></pre>
<p>The spawned kernel boots on the assigned CPUs and memory, running directly on hardware. It has its own scheduler, its own network stack, and its own view of the devices assigned to it.</p>
</div>
<!-- Key Components -->
<div class="content-card">
<h2><i data-lucide="box"></i>Key Components</h2>
<p>The multikernel stack is composed of several open-source projects:</p>
<ul>
<li><strong><a href="https://github.com/multikernel/linux" target="_blank" rel="noopener noreferrer">Multikernel Linux</a></strong> - Kernel patches that enable spawning and managing additional kernel instances using the kexec subsystem</li>
<li><strong><a href="https://github.com/multikernel/kerf" target="_blank" rel="noopener noreferrer">Kerf</a></strong> - Orchestration tool for managing kernel instances, resources, and lifecycle</li>
<li><strong><a href="https://github.com/multikernel/daxfs" target="_blank" rel="noopener noreferrer">DAXFS</a></strong> - Shared filesystem across kernel instances using direct memory access, enabling shared container rootfs and zero-copy data sharing</li>
<li><strong><a href="https://github.com/multikernel/lazy_cma" target="_blank" rel="noopener noreferrer">Lazy CMA</a></strong> - Runtime contiguous memory allocator, provides memory pools for spawned kernels without boot-time reservation</li>
</ul>
</div>
<!-- How it works -->
<div class="content-card">
<h2><i data-lucide="cog"></i>How It Works Under the Hood</h2>
<ul>
<li><strong>Kernel spawning via kexec</strong> - New kernels are launched using Linux's existing kexec mechanism, extended to run alongside the primary kernel rather than replacing it</li>
<li><strong>Resource partitioning</strong> - CPUs, memory, and devices are split between kernels using standard hotplug interfaces</li>
<li><strong>Hardware queue sharing</strong> - Modern NICs and SSDs have multiple hardware queues; each kernel gets exclusive access to specific queues for true hardware-level isolation</li>
<li><strong>Inter-kernel communication</strong> - Kernels communicate over shared memory using vsock, a standard Linux socket type that applications can use without modification</li>
<li><strong>Docker integration</strong> - Spawned kernels can boot directly into Docker images using DAXFS to share the container rootfs, with no OS init layer</li>
</ul>
</div>
<!-- CTA -->
<div class="content-card gs-cta">
<h2><i data-lucide="check-circle"></i>Ready to Try It?</h2>
<p>All multikernel components are open source. Explore the code, file issues, or reach out for a technical evaluation.</p>
<div class="button-group">
<a href="https://github.com/multikernel" target="_blank" rel="noopener noreferrer" class="btn btn-primary">
<i data-lucide="github"></i>
GitHub
</a>
<a href="https://calendar.app.google/nc1upkqQoUeoukdD9" target="_blank" rel="noopener noreferrer" class="btn btn-secondary">
<i data-lucide="calendar"></i>
Schedule a Demo
</a>
<a href="https://www.youtube.com/@multikernel-tech" target="_blank" rel="noopener noreferrer" class="btn btn-secondary">
<i data-lucide="play-circle"></i>
Watch Demos
</a>
</div>
</div>
</div>
</section>
</main>