並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 92件

新着順 人気順

低レイヤーの検索結果1 - 40 件 / 92件

  • Reptar

    We have a CPU mystery! We found a way to cause some processors to enter a glitch state where the normal rules don’t apply, but what does that mean…? If you’re interested what can go wrong inside modern CPUs, read on! Introduction If you’ve ever written any x86 assembly at all, you’ve probably used rep movsb. It’s the idiomatic way of moving memory around on x86. You set the source, destination, di

    • 1,000行で作るオペレーティングシステム


      Writing an OS in 1,000 Lines 1,000OS OS 3
        1,000行で作るオペレーティングシステム
      • How does the Linux Kernel start a Process

        ...and how to ptrace the entry point and m3ss w1th da stack. In this article, you will learn what happens inside the Linux Kernel when a process calls execve(), how the Kernel prepares the stack and how control is then passed to the userland process for execution. I had to learn this for the development of Zapper - a Linux tool to delete all command line options from any process (without needing r

          How does the Linux Kernel start a Process
        • An Introduction to Interpreters and JIT Compilation

          Last week, I gave two lectures at the Programming Language Implementation Summer School (PLISS). PLISS was very well organized and the students and other presenters made for a very enjoyable week of new ideas, learning, and discussing. For my own lectures, I decided to take an approach that focused more on the high-level ideas and can introduce a wider audience to how we build interpreters and a r

          • Writing a C compiler in 500 lines of Python

            A few months ago, I set myself the challenge of writing a C compiler in 500 lines of Python1, after writing my SDF donut post. How hard could it be? The answer was, pretty hard, even when dropping quite a few features. But it was also pretty interesting, and the result is surprisingly functional and not too hard to understand! There's too much code for me to comprehensively cover in a single blog

            • advanced-computer-organization/aco-shioya-appendix-processor.pdf at master · shioyadan/advanced-computer-organization

              You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                advanced-computer-organization/aco-shioya-appendix-processor.pdf at master · shioyadan/advanced-computer-organization
              • はじめに - Writing an OS in 1,000 Lines

                本書では、小さなOSをゼロから少しずつ作っていきます。 OSと聞くと腰が引けるかもしれませんが、OS (特にカーネル) の基本機能は案外単純です。巨大なオープンソースソフトウェアとしてよく挙げられるLinuxでさえ、バージョン0.01はたった8413行でした。様々な要求に応えるために次第に肥大化していっただけで、当初は大変素朴な実装になっていました。 本書では素朴なコンテキストスイッチ、ページング、ユーザーモード、コマンドラインシェル、ディスクデバイスドライバ、ファイルの読み書きをC言語で実装します。これだけ様々な機能が詰め込まれているのに、コードは合計でたった1000行未満です。 「1000行なら1日でできそう」と思うかもしれませんが、初学者には少なくとも3日はかかるでしょう。OS自作のハマりポイントは「デバッグ」です。アプリケーション開発とは違うデバッグ手法・能力を習得する必要がありま

                  はじめに - Writing an OS in 1,000 Lines
                • Putting the "You" in CPU

                  From the beginning… Edit on GitHub I’ve done a lot of things with computers, but I’ve always had a gap in my knowledge: what exactly happens when you run a program on your computer? I thought about this gap — I had most of the requisite low-level knowledge, but I was struggling to piece everything together. Are programs really executing directly on the CPU, or is something else going on? I’ve used

                    Putting the "You" in CPU
                  • A tutorial quantum interpreter in 150 lines of Lisp

                    By Robert Smith Simulating a universal, gate-based quantum computer on a classical computer has many uses and benefits. The top benefit is the ability to inspect the amplitudes of the system’s state directly. However, while the mathematics is very well understood, implementing a general-purpose simulator has largely been folk knowledge. In this tutorial, we show how to build an interpreter for a g

                    • 無から始める自作CPU


                        CPU CPU CPU AIWebOSCPUCPU CPUCPU CPU CPUCPU CPUCPU  99%W
                        無から始める自作CPU
                      • Goコンパイラのお勉強(1) ~ゼロ幅の型によるメモリ利用の最適化と未定義動作 ~ - Techtouch Developers Blog

                        はじめに メモリアロケーションの回避 ゼロ幅の型(=ゼロサイズの型)とは アドレスの同一性に関する未定義動作 この最適化が有効な場面 1. map 2. chan 3. interface の実装 おわりに 参考文献 はじめに こんにちは。SRE の izzii です。 最近は某フィットネスゲームが習慣だったり、ボルダリングを再開したり、登山シーズンが到来したりと心身ともに調子が良いです。 さてつい先日、Go のコンパイラによる最適化について勉強したまとめを社内で共有したところ、メンバーが面白がってくれたため、細かいところを自分の手で触ってみたり、Go Forum で質問を投稿したりした上で記事にしてみました。Go コンパイラの最適化について知りたいという方だけでなく、Go に慣れた方でも意外と知らない挙動を垣間見ることのできる内容かと思います。 github.com を元にしているのです

                          Goコンパイラのお勉強(1) ~ゼロ幅の型によるメモリ利用の最適化と未定義動作 ~ - Techtouch Developers Blog
                        • There's no place like home

                          This website is dedicated to electronics enthusiasts and aspirants who believe that true knowledge comes through the persistence of constant practice. The content is divided into parts presented hereafter. Learn basic electronics – click to read Create a legendary Pong game – click to read Create a 4-bit processor – click to read Create a complete Z80 computer – click to read

                            There's no place like home
                          • パケットキャプチャで理解する TLS1.3

                            TLS は Transport Layer Security の略で、盗聴、あるいは通信相手のなりすましの可能性がある通信路において、安全に通信を行うための暗号通信プロトコルです。 本書では、Go 言語を使って TLS サーバ・クライアントを用意し、その通信を Wireshark で観察しながら、TLS のプロトコルについて説明します。 本書を読むことで、TLS の通信で実際にどのようなパケットが送受信されているかが確認でき、TLS の学習の助けになると思います。 また、TLS には複数のバージョンがありますが、本記事では、最も広く使われており、かつ最新である TLS1.3 に焦点を当てます。

                              パケットキャプチャで理解する TLS1.3
                            • Parsing time stamps faster with SIMD instructions – Daniel Lemire's blog

                              In software, it is common to represent time as a time-stamp string. It is usually specified by a time format string. Some standards use the format %Y%m%d%H%M%S meaning that we print the year, the month, the day, the hours, the minutes and the seconds. The current time as I write this blog post would be 20230701205436 as a time stamp in this format. It is convenient because it is short, easy to rea

                                Parsing time stamps faster with SIMD instructions – Daniel Lemire's blog
                              • Goでゼロから作る 自作TCP/IPプロトコル サーバー


                                TCP/IP Go Go net package TCP/IP ToDoAPI
                                  Goでゼロから作る 自作TCP/IPプロトコル サーバー
                                • A 32-Bit RISC-V CPU Core In 600 Lines Of C

                                  If you have ever wanted to implement a RISC-V CPU core in about 600 lines of C, you’re in luck! [mnurzia]’s rv project does exactly that, providing a simple two-function API. Technically, it’s a user-level RV32IMC implementation in ANSI C. There are many different possible flavors of RISC-V, and in this case is a 32-bit base integer instruction set (RV32I), with multiplication and division extensi

                                    A 32-Bit RISC-V CPU Core In 600 Lines Of C
                                  • Build Your Own Docker with Linux Namespaces, cgroups, and chroot: Hands-on Guide

                                    Introduction Containerization has transformed the world of software development and deployment. Docker ↗️, a leading containerization platform, leverages Linux namespaces, cgroups, and chroot to provide robust isolation, resource management, and security. In this guide, we’ll skip the theory (go through the attached links above if you want to learn more about the mentioned topics) and jump straigh

                                      Build Your Own Docker with Linux Namespaces, cgroups, and chroot: Hands-on Guide
                                    • 40円RISC-Vマイコン(CH32V003)をArduino IDEでLチカをしてみました

                                      秋月電子さんに新商品のマイコンが入荷したようです。1個40円の32ビットRISC-Vマイコン CH32V003J4M6 [通販コード:118062]です。あまりの安さとSOP8の可愛さで気になってしまいます。開発環境は公式のものもあるのですが、Arduino IDEもサポートしているようです。今回はお手軽なArduino IDEでセットアップをしてみます。 他にも1個50円のCH32V003F4P6 [通販コード:118061]もあり、こちらはピン数も多く高機能のようですが、まずはSOP8で扱いやすそうなCH32V003J4M6で試してみます。マイコンに書き込むためのツールのWCH-LinkEエミュレータ [通販コード:118065]も販売されていましたのでこちらも購入しました。 マイコンで簡単な回路を作ってみる CH32V003J4M6はSOP8なのでピン間隔も1.27mmと広く表面実装

                                        40円RISC-Vマイコン(CH32V003)をArduino IDEでLチカをしてみました
                                      • Goのメモリ管理 / Memory management in Go

                                        継続的プロファイルによる大規模アプリケーションの性能改善 / Improving massive application clusters with continuous profiling

                                          Goのメモリ管理 / Memory management in Go
                                        • Learn x86-64 assembly by writing a GUI from scratch

                                          Published on 2023-05-31. Learn x86-64 assembly by writing a GUI from scratch Most people think assembly is only to be used to write toy programs for learning purposes, or to write a highly optimized version of a specific function inside a codebase written in a high-level language. Well, what if we wrote a whole program in assembly that opens a GUI window? It will be the hello world of the GUI worl

                                          • Memory Allocation

                                            One thing that all programs on your computer have in common is a need for memory. Programs need to be loaded from your hard drive into memory before they can be run. While running, the majority of what programs do is load values from memory, do some computation on them, and then store the result back in memory. In this post I'm going to introduce you to the basics of memory allocation. Allocators

                                              Memory Allocation
                                            • 『低レイヤを知りたい人のためのCコンパイラ作成入門』を使ってやってみた、縛り実況と初見実況


                                              Kernel/VMVMIThsjoihsC  hsjoihshsjoihs2 2Rui Ueyama compiler book any% C-to-ELF category    hsjoihs
                                                『低レイヤを知りたい人のためのCコンパイラ作成入門』を使ってやってみた、縛り実況と初見実況
                                              • SIMってなんだ? ~セルラー通信がつながる仕組み、解説します~

                                                2023年4月6日開催「SORACOM UG Online #16 ~SIMの日イベント~」で、ソラコム今井(factory)が発表した資料です。

                                                  SIMってなんだ? ~セルラー通信がつながる仕組み、解説します~
                                                • コンピュータ講座 応用編 第1回

                                                  第1回 CPUは数百本の足を持つトランジスタのかたまり 第一回目は、CPUを物理的・電気的な部品として解説します。パソコンに使用されるCPUの外観は、数百本の足(ソケットに挿すピン)を持ち、1億個を超えるトランジスタを集積したICで、VLSI(大規模集積回路)と呼ばれます。今回は、このCPUを外側から眺めて、物理的な仕組みや電気的な働きを説明します。 CPUの構造 CPUの解説の最初に、CPUの構造を概観します。そのために少し遠回りですが、ICの製造方法に触れておきます。 ICの製造方法 ICの材料にもっとも多く使われるのはシリコンです。土や砂の主成分であり入手しやすい事や、動作が安定していること、その絶縁膜が半導体に適しているという理由からです。 実際に材料として使われるのはシリコンが酸化物と結びついた珪石です。珪石をいくつかの工程を経て、高純度化(純度99.999999999、イレブン

                                                  • The “Build Your Own Redis” Book is Completed | Blog | build-your-own.org

                                                    Read it here. Introduction Needless to say, the Redis project is quite a success. It’s an important component in backend applications. Redis could be considered one of the building blocks of modern computing. There are not many projects that fit the such role and stood the test of time. Here are some examples that meet my criteria of the “building block”: NGINX, SQLite, PostgreSQL, Kafka, Linux ke

                                                      The “Build Your Own Redis” Book is Completed | Blog | build-your-own.org
                                                    • How a CPU works: Bare metal C on my RISC-V toy CPU

                                                      I always wanted to understand how a CPU works, how it transitions from one instruction to the next and makes a computer work. So after reading Ken Shirrif’s blog about a bug fix in the 8086 processor I thought: Well, let’s try to write one in a hardware description language. This post is a write up of my learning experiment. I’ll walk through my steps of creating an emulator, compiling and linking

                                                      • 言語のスレッド実装の雑な話(Green threadからGoのgoroutineまで)


                                                        Twitter "green thread"  Green thread OS N:1 mapping OSJavagreen threadOSnonblocking使EAGAIN  EWOULDBLOCK 使 1:1 mapping OS11
                                                          言語のスレッド実装の雑な話(Green threadからGoのgoroutineまで)
                                                        • Linux システムコール 徹底入門

                                                          Linux システムコールについて調べたことをまとめる。システムコールの仕組みを理解すると、 OS とアプリケーションがどのように連携して動いているのかを理解できるようになります。 システムコールは CPU に依存する処理が多いため、 x86_64 に絞ります。 検証環境]# cat /etc/redhat-release CentOS Linux release 8.0.1905 (Core) ]# uname -a Linux localhost.localdomain 4.18.0-80.11.2.el8_0.x86_64 #1 SMP Tue Sep 24 11:32:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux ]# cat /proc/cpuinfo | head processor : 0 vendor_id : GenuineInte

                                                            Linux システムコール 徹底入門
                                                          • TLSが難しい?RustとLinuxカーネルで実装しよう!

                                                            TLS(Transport Layer Security)が難しすぎると、お嘆きのセキュリティファースト世代の皆様、RustでLinuxカーネルを実装しながら学んでみましょう! カーネルモジュールの実装は難しい?それは誤解です。TLSをアプリケーションとして実装しようとすると、各種のライブラリを検索していたつもりが、SNSを眺めていて、一日が終わっていることありますよね。カーネルモジュールを実装するために使えるのはカーネルの機能だけです。検索する必要はなく、雑念が生じる余地はありません。その集中力があれば、カーネル開発は難しくありません。 TLSとLinuxカーネル皆様の中には、LinuxカーネルはTLSをサポートしているのでは?と思っている方がいるかもしれません。TLSは実際のデータの送受信の前に、ハンドシェイクと呼ばれる、暗号鍵の合意や相手の認証を実施します。ハンドシェイク後、Linu

                                                              TLSが難しい?RustとLinuxカーネルで実装しよう!
                                                            • A Visual Guide to SSH Tunnels: Local and Remote Port Forwarding

                                                              Bridge vs. Switch: What I Learned From a Data Center TourNetworking Lab: Ethernet Broadcast DomainsNetworking Lab: L3 to L2 Segments MappingNetworking Lab: Simple VLANDon't miss new posts in the series! Subscribe to the blog updates and get deep technical write-ups on Cloud Native topics direct into your inbox. TL;DR SSH Port Forwarding as a printable cheat sheet. SSH is yet another example of an

                                                                A Visual Guide to SSH Tunnels: Local and Remote Port Forwarding
                                                              • Semiジャーナル

                                                                半導体について分かりやすく解説

                                                                  Semiジャーナル
                                                                • プロトコルスタックを写経してネットワークを完全に理解したかった日記

                                                                  Webページはどうやって表示されるのでしょうか. 「ブラウザでアドレスバーにURLを入力してEnter押してからページが表示されるまでに何が起きているか説明してください」面接で使っていた質問が面白いと話題に 上記の質問には様々なレイヤーでの回答があると思うのですが,私はネットワークの動作に興味を持ちました.というのも,TCP,IP,ARP,Ethernetといったキーワードが関連しているのは教科書や講義で聞いた気がするのですが,それ以上のことはうまく説明できなかったからです. これらのプロトコルは,普段はカーネル内部に隠れていてあまり意識できません. しかし,以下の資料を参考にプロトコルスタックを写経すれば,少しは身近に感じられるかもしれないと思いました. 3月に開催したプロトコルスタック自作キャンプの講義資料を公開しました。1週間でTCP/IPのプロトコルスタックを自作してUDPやTCP

                                                                    プロトコルスタックを写経してネットワークを完全に理解したかった日記
                                                                  • eBPFに3日で入門した話 - CADDi Tech Blog

                                                                    はじめに eBPF とはなにか ざっくり概要 「Packet Filter」なのに「Virtual Machine」? eBPFでなにができるか? カーネルイベントのフック ユーザーランドアプリケーションとのやりとり eBPFの主な用途 eBPFが注目される背景 eBPFの仕組み アーキテクチャと処理フロー カーネルモジュールとeBPFの違い eBPFプログラムの作り方 eBPFプログラムを作ってみる 環境の準備 Hello world もう少し複雑なサンプル その他のサンプル HTTPリクエストのダンプ TCP接続先の調査 tcplife dirtop filetop oomkill まとめ eBPFはなにに使えるか 参考サイト はじめに こんにちは、Platformチームの小森です。 eBPF (extended Berkley Packet Filter) について、2022年8月2

                                                                      eBPFに3日で入門した話 - CADDi Tech Blog
                                                                    • 8日で作るオレオレRISC-V CPU

                                                                      LLM とプロンプトエンジニアリング/チューターをビルドする / LLM and Prompt Engineering and Building Tutors

                                                                        8日で作るオレオレRISC-V CPU
                                                                      • 第2章 詳解QUIC ~ TCPに代わり下位層で使用する新しいトランスポートプロトコル | gihyo.jp

                                                                        本章では、HTTP/3がTCPに代わって下位層で用いるQUICについて解説します。 QUICはトランスポートプロトコル QUICはトランスポートプロトコルです。QUICの説明に入る前に、トランスポートプロトコルついておさらいします。 TCP/IPの4階層モデル プロトコルは階層で役割を分担しています。TCP/IPの4階層モデルでは、アプリケーション層、トランスポート層、インターネット層、ネットワークインタフェース層に分かれます(図1⁠)⁠。 図1 TCP/IPの4階層モデル アプリケーション層に分類されるアプリケーションプロトコルは、クライアントやサーバで動作するアプリケーションの動作に関するデータやメッセージの通信ルールを規定します。たとえばSMTP(Simple Mail Transfer Protocol)は、メールを送信する通信ルールを規定しています。HTTPはこの層に属します。

                                                                          第2章 詳解QUIC ~ TCPに代わり下位層で使用する新しいトランスポートプロトコル | gihyo.jp
                                                                        • golangで作るTLS1.2プロトコル


                                                                           TCPIP+HTTP HTTP= TLSTLS 😇😇😇 TLS TCP/IP RFC5246 SSL/TLS  TLS1.2 crypt tcpconnect使 RSA TLS_RSA_W
                                                                            golangで作るTLS1.2プロトコル
                                                                          • golangで作るTCPIPプロトコル


                                                                             IT1TCP/IP TCP/IP TCP/IPgolangTCPIP  ethernet net使 (PCIPMac使) 使syscallsendtorecvfrom socketRAW_SOCKET使 golang
                                                                              golangで作るTCPIPプロトコル
                                                                            • Rustでゲームボーイエミュレーターを書いた

                                                                              RustでTGB-Rというゲームボーイエミュレーターを書きました。 とりあえずWindowsとLinuxで動作確認をしていて、エミュレーションの精度もそれなりに出ているはずです(以下は非公式ROMによるスクリーンショット)。 GameBoy WORDLE 2048gb Hi-Colour Demo Bad Apple!! 名前は、以前私が書いていたゲームボーイエミュレーターの精神的後継だったり、Rustで書いていたりとかでこうなりました。 以前書いたエミュレーターもオープンソースで公開していたのですが、ふと検索してみたら、GitHubにプロジェクトができていて、メンテナンスが続けられていました。 私がこれを書いていた時期はGitHubどころかgit自体が存在しないような時代で、サーバーを借りてそこに手作りのアーカイブをしこしこアップロードしていたような、あまりに素朴な開発でしたが、そんな時

                                                                                Rustでゲームボーイエミュレーターを書いた
                                                                              • 表紙 - 本物のC

                                                                                このサイトは「本物の C 言語」について学習する機会の提供を目的としています。 「本物の」とはつまり、 標準規格(仕様)が C 言語をどういうものとして定めているか C プログラムが実際に CPU をどう動かすか という二つの意味合いに於いてです。 どうも巷間にはその辺りを気にせず何となくで書かれた資料が多い様なので、このサイトにより少しでも世界が最適化される事を期待します。 権利について 当然ですがこのサイト全体は著作権法により保護されています。法と良心に則って御利用下さい。 連絡はcontact<アット>real-c.infoまで。

                                                                                • コンパイラが作ったバイナリをつなぎ合わせるプログラム 「lld」の作者が語る、リンカの仕組み


                                                                                  Kernel/VMmold2 LLVMlld mold mold LLVMlld
                                                                                    コンパイラが作ったバイナリをつなぎ合わせるプログラム 「lld」の作者が語る、リンカの仕組み