IT業界、40年やってます (老人の独り言) 

現在68歳、IT関連で勉強したい事が盛りだくさんで、目移り状態です(^o^)

はじめに

やっぱりラズパイに戻ってきてラズパイ3を買っちゃいました。

教育用 OS PintOS のアマゾン本を書きたいと思ってます。(一応4冊アマゾン本を出版してます)

その前に今のOSの知識な無さすぎて、今OSの教科書を読んでます。

イメージ 1
具体的なプログラムと難しい内容を平易な説明で、とても良い教科書だと思います。第7版に関して翻訳が有り

本書は,大学の学部3~4年レベル,あるいは大学院修士課程1年レベルにおける,オペレーティングシステム入門コースの教科書として作成した。また,現場の専門家に役に立つことも想定している。本書では,オペレーティングシステムの根底にある諸「概念」を明確に記述している。基本的なデータ構造,コンピュータ構成,およびC言語などの高水準言語に読者が親しんでいることが,本書の前提である。オペレーティングシステムを理解する上で必要なハードウェアの話題は,第1章に含まれている。コード例には,大部分はC言語,一部でJava言語を用いた。ただし,これらの言語の詳細を知らなくても読者がアルゴリズムを理解できるようにしてある。本書では,各種の概念を直感的に記述している。重要な理論的結果を包含しているが,形式的証明は省略した。

と説明されている本です。

年末プリンタが壊れてブラザーにしました

年末の年賀状の時期に、8年使ったキヤノンのプリンタが壊れた(電源入れてもエラー)ので、最初2大メーカーのプリンタを調べました。

どれもこれもインク・カートリッジが小さくて色が6種と多く、たった2セット買うとプリンタ本体が買える値段と驚きの状況。

なので、ブラザーを買いました。A4 インクジェット複合機 PRIVIO DCP-J968N-W ホワイト (両面印刷/ADF/レーベル印刷/有線・無線LAN対応) とにかく多機能に驚きです。キャッシュバックが3千円あり、それ入れると約一万円と安価です。

インクが安くて、ADF(スキャナ原稿自動送り)無線LAN など便利です。2大メーカーのプリンタに比べると解像度などの仕様上は落ちますが、実用面は十分です。
書類整理でスキャナで自動原稿送り便利でした。

スマホからの出力・スキャン出来てホント便利ですね。

アメリカのOSの教科書「 Operating System Concepts」第9版

これがアメリカの大学で OS の入門コースで一番使われている教科書の様です。

スタンフォード大学のOSのコースでも利用してます。

今ざっと読んでます。終わってから、じっくりと演習問題も含めて読んでみたいです。



Table of Contents
Cover Page
Title Page
Copyright
Dedication
Preface
Content of This Book
The Ninth Edition
Programming Environments
Linux Virtual Machine
Supporting Website
Notes to Instructors
Notes to Students
Contacting Us
Acknowledgments
Contents
PART ONE: OVERVIEW
Chapter 1 Introduction
1.1 What Operating Systems Do
1.2 Computer-System Organization
1.3 Computer-System Architecture
1.4 Operating-System Structure
1.5 Operating-System Operations
1.6 Process Management
1.7 Memory Management
1.8 Storage Management
1.9 Protection and Security
1.10 Kernel Data Structures
1.11 Computing Environments
1.12 Open-Source Operating Systems
1.13 Summary
Exercises
Bibliographical Notes
Chapter 2 Operating-System Structures
2.1 Operating-System Services
2.2 User and Operating-System Interface
2.3 System Calls
2.4 Types of System Calls
2.5 System Programs
2.6 Operating-System Design and Implementation
2.7 Operating-System Structure
2.8 Operating-System Debugging
2.9 Operating-System Generation
2.10 System Boot
2.11 Summary
Exercises
Bibliographical Notes
PART TWO: PROCESS MANAGEMENT
Chapter 3 Processes
3.1 Process Concept
3.2 Process Scheduling
3.3 Operations on Processes
3.4 Interprocess Communication
3.5 Examples of IPC Systems
3.6 Communication in Client–Server Systems
3.7 Summary
Exercises
Bibliographical Notes
Chapter 4 Threads
4.1 Overview
4.2 Multicore Programming
4.3 Multithreading Models
4.4 Thread Libraries
4.5 Implicit Threading
4.6 Threading Issues
4.7 Operating-System Examples
4.8 Summary
Exercises
Bibliographical Notes
Chapter 5 Process Synchronization
5.1 Background
5.2 The Critical-Section Problem
5.3 Peterson's Solution
5.4 Synchronization Hardware
5.5 Mutex Locks
5.6 Semaphores
5.7 Classic Problems of Synchronization
5.8 Monitors
5.9 Synchronization Examples
5.10 Alternative Approaches
5.11 Summary
Exercises
Bibliographical Notes
Chapter 6 CPU Scheduling
6.1 Basic Concepts
6.2 Scheduling Criteria
6.3 Scheduling Algorithms
6.4 Thread Scheduling
6.5 Multiple-Processor Scheduling
6.6 Real-Time CPU Scheduling
6.7 Operating-System Examples
6.8 Algorithm Evaluation
6.9 Summary
Exercises
Bibliographical Notes
Chapter 7 Deadlocks
7.1 System Model
7.2 Deadlock Characterization
7.3 Methods for Handling Deadlocks
7.4 Deadlock Prevention
7.5 Deadlock Avoidance
7.6 Deadlock Detection
7.7 Recovery from Deadlock
7.8 Summary
Exercises
Bibliographical Notes
PART THREE: MEMORY MANAGEMENT
Chapter 8 Main Memory
8.1 Background
8.2 Swapping
8.3 Contiguous Memory Allocation
8.4 Segmentation
8.5 Paging
8.6 Structure of the Page Table
8.7 Example: Intel 32 and 64-bit Architectures
8.8 Example: ARM Architecture
8.9 Summary
Exercises
Bibliographical Notes
Chapter 9 Virtual Memory
9.1 Background
9.2 Demand Paging
9.3 Copy-on-Write
9.4 Page Replacement
9.5 Allocation of Frames
9.6 Thrashing
9.7 Memory-Mapped Files
9.8 Allocating Kernel Memory
9.9 Other Considerations
9.10 Operating-System Examples
9.11 Summary
Exercises
Bibliographical Notes
PART FOUR: STORAGE MANAGEMENT
Chapter 10 Mass-Storage Structure
10.1 Overview of Mass-Storage Structure
10.2 Disk Structure
10.3 Disk Attachment
10.4 Disk Scheduling
10.5 Disk Management
10.6 Swap-Space Management
10.7 RAID Structure
10.8 Stable-Storage Implementation
10.9 Summary
Exercises
Bibliographical Notes
Chapter 11 File-System Interface
11.1 File Concept
11.2 Access Methods
11.3 Directory and Disk Structure
11.4 File-System Mounting
11.5 File Sharing
11.6 Protection
11.7 Summary
Exercises
Bibliographical Notes
Chapter 12 File-System Implementation
12.1 File-System Structure
12.2 File-System Implementation
12.3 Directory Implementation
12.4 Allocation Methods
12.5 Free-Space Management
12.6 Efficiency and Performance
12.7 Recovery
12.8 NFS
12.9 Example: The WAFL File System
12.10 Summary
Exercises
Bibliographical Notes
Chapter 13 I/O Systems
13.1 Overview
13.2 I/O Hardware
13.3 Application I/O Interface
13.4 Kernel I/O Subsystem
13.5 Transforming I/O Requests to Hardware Operations
13.6 STREAMS
13.7 Performance
13.8 Summary
Exercises
Bibliographical Notes
PART FIVE: PROTECTION AND SECURITY
Chapter 14 Protection
14.1 Goals of Protection
14.2 Principles of Protection
14.3 Domain of Protection
14.4 Access Matrix
14.5 Implementation of the Access Matrix
14.6 Access Control
14.7 Revocation of Access Rights
14.8 Capability-Based Systems
14.9 Language-Based Protection
14.10 Summary
Exercises
Bibliographical Notes
Chapter 15 Security
15.1 The Security Problem
15.2 Program Threats
15.3 System and Network Threats
15.4 Cryptography as a Security Tool
15.5 User Authentication
15.6 Implementing Security Defenses
15.7 Firewalling to Protect Systems and Networks
15.8 Computer-Security Classifications
15.9 An Example: Windows 7
15.10 Summary
Exercises
Bibliographical Notes
PART SIX: ADVANCED TOPICS
Chapter 16 Virtual Machines
16.1 Overview
16.2 History
16.3 Benefits and Features
16.4 Building Blocks
16.5 Types of Virtual Machines and Their Implementations
16.6 Virtualization and Operating-System Components
16.7 Examples
16.8 Summary
Exercises
Bibliographical Notes
Chapter 17 Distributed Systems
17.1 Advantages of Distributed Systems
17.2 Types of Network-based Operating Systems
17.3 Network Structure
17.4 Communication Structure
17.5 Communication Protocols
17.6 An Example: TCP/IP
17.7 Robustness
17.8 Design Issues
17.9 Distributed File Systems
17.10 Summary
Exercises
Bibliographical Notes
PART SEVEN: CASE STUDIES
Chapter 18 The Linux System
18.2 Design Principles
18.3 Kernel Modules
18.4 Process Management
18.5 Scheduling
18.6 Memory Management
18.7 File Systems
18.8 Input and Output
18.9 Interprocess Communication
18.10 Network Structure
18.11 Security
18.12 Summary
Exercises
Bibliographical Notes
Chapter 19 Windows 7
19.1 History
19.2 Design Principles
19.3 System Components
19.4 Terminal Services and Fast User Switching
19.5 File System
19.6 Networking
19.7 Programmer Interface
19.8 Summary
Exercises
Bibliographical Notes
Chapter 20 Influential Operating Systems
20.1 Feature Migration
20.2 Early Systems
20.3 Atlas
20.4 XDS-940
20.5 THE
20.6 RC 4000
20.7 CTSS
20.8 MULTICS
20.9 IBM OS/360
20.10 TOPS-20
20.11 CP/M and MS/DOS
20.12 Macintosh Operating System and Windows
20.13 Mach
20.14 Other Systems
Exercises
Bibliographical Notes
Credits
Index

Unix V6 互換 OS xv6 をMac OS X El Capitan(v10.11)で Homebrew で動かす

El Capitan (v10.11) にて Homebrew パッケージ管理システムを使ったクロスコンパイル環境構築を行いました。

UNIXはもともと DEC社のPDP-11上に実装されて, C も古代の Pre K&R で書かれていて、今の時代適用できないとUNIX V6 は 現代風Xv6 へと、さらに進化します\(^o^)/

xv6 けっこう以前から話題になってた様です。

xv6(x86 version 6)は、MITマサチューセッツ工科大学Operating Systems Engineering (6.828)という講義の教材として使うために、UNIX V6ANSI Cに書換え、x86に移植したOS

でこれを動かす環境を Mac OS X El Capitan (OS X v10.11) の上で動作する環境構築を行いました。

ほぼ http://attonblog.blogspot.jp/2015/04/32bit-xv6-yosemite.html こちらのサイトの通り実行しました。

1. Install Xcode. After installing Xcode install the Command Line Tools from the Downloads section of Xcode's preferences. I've installed Xcode Version 7.3.1(7D1014).
*** 最新の Xcode 7.3.1 がインストールされてます。

2. Install Homebrew
$ brew doctor <- 何かおまじないが必要(^_^;)

$ brew install homebrew/versions/gcc49
まずは GCC を導入

$ brew tap dongz9/devel
標準の homebrew にはXv6 の開発環境が無いので、追加のリポジトリ定義ファイルを利用させてもらう
https://github.com/dongz9/homebrew-devel に定義ファイルが管理されている。 

$ brew install --HEAD i386-elf-qemu
PC エミュレータをインストール

$ brew install i386-elf-binutils i386-elf-gcc i386-elf-gdb
ツールチェーン言われる一連の開発環境を導入

以上で Mac OSX 上に xv6 の開発環境が出来たので、 xv6 のソースコードを入手します。

$ git clone git://github.com/mit-pdos/xv6-public.git

あとは Makefile
35:   TOOLPREFIX = i386-elf-
54:   QEMU = qemu-system-i386
と修正して

$ make qemu-nox 
で  qemu 上でxv6 が動きます。
qumu を終了するには Ctrl-A x

あとは、xv6 のサイト (xv6, a simple Unix-like teaching operating system)や 関連の話題ググると日本語情報を含めて沢山の情報が出てきますので、Unix OS の勉強になります。

* xv6 は ラズパイに移植されたり、仮想記憶を付け加える事もされているそうです。

アマゾンの定額読み放題 開始

アマゾンの定額で電子書籍の読み放題が始まりました。一ヶ月の無償体験が有るのでさっそく申し込みました。

Mac Fan, DOS/V Power Report が有るので、これだけでも月額の費用は元が取れます。

気になっていたコンピュータ関連では以下の本を読んでます。

Windows 上で QEMU って CPU エミュレータ上でウインドウOSを作った、700ページの本です。分かりやすいと評判が良いようです。

簡単な内容かと思いましたが、内容はかなり深く本格的なのはびっくりしました。いきなりパーセプトロンで文字認識から始まります。

まだ読んでませんが、x86 を勉強したかったので、楽しみです。

図書館で一度借りましたが、読み終えず返してしまった本。かなり読みやすい印象です。

一ヶ月で読み終えられるかですが、楽しみです。


ハーバード大、ブラウン大、スタンフォード大の教育用 OS

以前まとめてみましたが

他にハーバード大学ブラウン大学が教科書を出版していることを見つけました。


教科書はこちらです。

MIPS CPU を仮想環境(System/161)下で動かして、その上で OS/161 を動作させる方法を取ってます。

既に日本の早稲田の学生が卒論で ARM 上で OS/161 を動かす事を研究してました。とても貴重な試料です。


こちらの大学で使われている教科書は

でコースで作った教材 OS は Weenixで以下からソースコードをゲット出来ます。




教科書は特に無く、John Ousterhout先生の講義ノートがメイン。参考書として
教材のOSは PintOSソースコード
から手に入れられます。

Deep Learing 深層学習の学習(^O^)

図書館で「人工知能は人間を超えるか ディープラーニングの先にあるもの (角川EPUB選書)」を借りて読んだら久々に感動しました。

イメージ 1

1980年代にアメリカのコンピュータ会社に就職したので第2次人工知能ブームのまっただ中でした。当時の通産省が数百億円を予算化して、かなりばらまいていた記憶があります。今から見ると、CPUの速度と、インターネットが無かったので、上手く行かなかった様です。その後下火になり、人工知能研究は長いトンネルに入ったそうです。

この本によると、2013年に Google の画像認識コンペでカナダ トロント大学ジェフリー・ヒントンの開発したディープラーニングが圧倒的な成績を収め、この辺から第3次人工知能ブームが訪れました。

そこで、ミーハーな自分は、まずは資料と

イメージ 2
こんな本を買っちまいました。ざっくりと見た感じは比較的分かりやすい数学(線形代数)を使って理論を説明してます。基本は脳のニューロンをモデルにしてますので、コンピューターで有りながら、生物を関連が有って、かなり興味が有る分野です。