Content ▪ Introduce to embedded OS ▪ Basics of embedded Linux ▪ Linux boot process▪ Manage Linux system▪ Git source code management... Embedded OSGoals of Operating System▪ Resource Mana
Trang 1HỆ THỐNG NHÚNG
Dr Thanh Nguyen
Email: thanh.nguyenngoc@phenikaa-uni.edu.vn Office: Room 606 - Building A4
Chapter 4: Embedded Operating System
Trang 2Content
▪ Introduce to embedded OS
▪ Basics of embedded Linux
▪ Linux boot process
▪ Manage Linux system
▪ Git source code management
Trang 3Embedded OS
Goals of Operating System
▪ Resource Management : Disk, CPU cycles, etc
must be managed efficiently to maximize
overall system performance
▪ Resource Abstraction : Software interface to
simplify use of hardware resources
▪ Virtualization : Supports resource sharing –
gives each process the appearance of an
unshared resource
Trang 4Embedded OS
Components of an OS
Trang 6Embedded OS
Structures of OS
• Simple structure:
• Do not have well defined structure and
are small, simple and limited systems
• MS-DOS is an example
• Entire system to crash if one of the user
programs fails
https://www.geeksforgeeks.org/different-approaches-or-structures-of-operating-systems/
Trang 7Embedded OS
Structures of OS
• Layers structure:
• Layers are so designed that each layer
uses the functions of the lower level
Trang 8Embedded OS
Structures of OS
• Modular structure:
• The best structure for an OS
• Involve designing of a modular kernel
• Set of core components
• Other services are added as
dynamically loadable modules
https://www.geeksforgeeks.org/different-approaches-or-structures-of-operating-systems/
Trang 9Embedded OS
Abstract View of System
Trang 10Embedded OS
Applications
Trang 11Embedded OS
Real time system
“A real time system is one in which the correctness of the computations
not only depends upon the logical correctness of the computation but also upon the time at which the result is produced If the timing constraints of the system are not met, system failure is said to have occurred.”
-Donald
Trang 12Gillies-Embedded OS
Real time OS
• Hard Real Time System
• Failure to meet deadlines is fatal
• example: Flight Control System
• Soft Real Time System
• Late completion of jobs is undesirable but not fatal
• System performance degrades as more & more jobs miss deadlines
• Online Databases
Trang 13Embedded OS
Real time OS
• Hard Real Time System
• Validation by provably correct procedures or extensive simulation
that the system always meets the timings constraints
• Soft Real Time System
• Demonstration of jobs meeting some statistical constraints suffices
Trang 14Embedded OS
Role of an OS in Real Time Systems
• Standalone Applications
• Often no OS involved
• Micro controller based Embedded Systems
• Some Real Time Applications are huge & complex
• Multiple threads
• Complicated Synchronization Requirements
• Filesystem / Network / Windowing support
• OS primitives reduce the software design time
Trang 15Embedded Linux
• embedded system: System of computing hardware with integrated
software that was designed to be used for a specific application
• Linux: free and open-source, monolithic, modular, multitasking,
Unix-like operating system kernel
Trang 16Embedded Linux
Linux history
Linus Torvalds
Trang 17Embedded Linux
Linux vs Window
Trang 18Embedded Linux
Linux vs Window
Trang 19Wide variety of computer hardware
(mobile phone, tablet, video console, super computers,…)
On PC’s desktops, laptops, servers, phones
File system support: Ext2, Ext3, Ext4 File system support: FAT, FAT32, NTFS
Text command: BASH Text command: DOS – like commands User interface: GNOME or KDE Windows Aero
Trang 20Embedded Linux
Linux kernel
• Kernel is the core of Linux operating systems
• Official website: https://kernel.org
• OS based on Linux kernel – Linux Distributions: Ubuntu, Fedora, Debian
• Almost 600 Linux Distributions exist
Trang 21Embedded Linux
Linux kernel
https://en.wikipedia.org/wiki/Linux_kernel
Trang 23Embedded Linux
Commands in Linux terminal
• pwd: print working directory
• mkdir: make directory
• rmdir: remove directory
Trang 24Embedded Linux
WiringPi
1 sudo apt-get install git-core : install git
2 git clone https://github.com/WiringPi/WiringPi.git : clone WiringPi
folder from git server
3 cd WiringPi: Change directory to home/”user”/WiringPi/
4 ./build :cài đặt theo các bước trên bộ thư viện wiringPi sẽ được
cài đặt trên máy
5 gpio -v : kiểm tra xem quá trình cái đặt có thành công hay không
6 gpio readall : cấu hình các chân hiện tại của kit Raspberry Pi
Trang 25Embedded Linux
Trang 26Summary
▪ Introduce to embedded OS
▪ Basics of embedded Linux
▪ Linux boot process
▪ Manage Linux system
▪ Git source code management