Tải bản đầy đủ (.pdf) (26 trang)

2023 1 embedded systems chapter 4

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.18 MB, 26 trang )

<span class="text_page_counter">Trang 1</span><div class="page_container" data-page="1">

<b>HỆ THỐNG NHÚNG</b>

<small>Dr. Thanh Nguyen</small>

<small>Email: : Room 606 - Building A4</small>

Chapter 4: Embedded Operating System

</div><span class="text_page_counter">Trang 2</span><div class="page_container" data-page="2">

<b>Content </b>

▪ Introduce to embedded OS ▪ Basics of embedded Linux ▪ Linux boot process

▪ Manage Linux system

▪ Git source code management

</div><span class="text_page_counter">Trang 3</span><div class="page_container" data-page="3">

<b>Embedded OS</b>

<b>Goals of Operating System</b>

<small>▪ Resource Management: Disk, CPU cycles, etc. must be managed efficiently to maximize </small>

<small>overall system performance</small>

<small>▪ Resource Abstraction: Software interface to simplify use of hardware resources</small>

<small>▪ Virtualization: Supports resource sharing –gives each process the appearance of an unshared resource</small>

</div><span class="text_page_counter">Trang 4</span><div class="page_container" data-page="4">

<b>Embedded OS</b>

<b>Components of an OS</b>

</div><span class="text_page_counter">Trang 6</span><div class="page_container" data-page="6">

<b>Embedded OS</b>

<b>Structures of OS</b>

• 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

<small> class="text_page_counter">Trang 7</span><div class="page_container" data-page="7">

<b>Embedded OS</b>

<b>Structures of OS</b>

• Layers structure:

• Layers are so designed that each layer uses the functions of the lower level

</div><span class="text_page_counter">Trang 8</span><div class="page_container" data-page="8">

<b>Embedded OS</b>

<b>Structures of OS</b>

• 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

<small> class="text_page_counter">Trang 9</span><div class="page_container" data-page="9">

<b>Embedded OS</b>

<b>Abstract View of System</b>

</div><span class="text_page_counter">Trang 10</span><div class="page_container" data-page="10">

<b>Embedded OS</b>

<b>Applications</b>

</div><span class="text_page_counter">Trang 11</span><div class="page_container" data-page="11">

<b>Embedded OS</b>

<b>Real time system</b>

“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

</div><span class="text_page_counter">Trang 12</span><div class="page_container" data-page="12">

<b>Gillies-Embedded OS</b>

<b>Real time OS</b>

• 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

</div><span class="text_page_counter">Trang 13</span><div class="page_container" data-page="13">

<b>Embedded OS</b>

<b>Real time OS</b>

• 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.

</div><span class="text_page_counter">Trang 14</span><div class="page_container" data-page="14">

<b>Embedded OS</b>

<b>Role of an OS in Real Time Systems</b>

• 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

</div><span class="text_page_counter">Trang 15</span><div class="page_container" data-page="15">

<b>Embedded Linux</b>

<b>• embedded system: </b>System of computing hardware with integrated software that was designed to be used for a specific application.

<b>• Linux: </b>free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel.

</div><span class="text_page_counter">Trang 16</span><div class="page_container" data-page="16">

<b>Embedded Linux</b>

<b>Linux history</b>

<small>Linus Torvalds</small>

</div><span class="text_page_counter">Trang 17</span><div class="page_container" data-page="17">

<b>Embedded Linux</b>

<b>Linux vs Window</b>

</div><span class="text_page_counter">Trang 18</span><div class="page_container" data-page="18">

<b>Embedded Linux</b>

<b>Linux vs Window</b>

</div><span class="text_page_counter">Trang 19</span><div class="page_container" data-page="19">

<b><small>Wide variety of computer hardware</small></b>

<small>(mobile phone, tablet, video console, super computers,…)</small>

<small>On PC’s desktops, laptops, servers, phones</small>

<small>File system support: Ext2, Ext3, Ext4File system support: FAT, FAT32, NTFS</small>

<b><small>Text command: BASH</small></b> <small>Text command: DOS – like commandsUser interface: GNOME or KDEWindows Aero</small>

</div><span class="text_page_counter">Trang 20</span><div class="page_container" data-page="20">

<b>Embedded Linux</b>

<b>Linux kernel</b>

• Kernel is the core of Linux operating systems • Official website:

• OS based on Linux kernel – Linux Distributions: Ubuntu, Fedora, Debian • Almost 600 Linux Distributions exist.

</div><span class="text_page_counter">Trang 21</span><div class="page_container" data-page="21">

<b>Embedded Linux</b>

<b>Linux kernel</b>

<small> class="text_page_counter">Trang 23</span><div class="page_container" data-page="23">

<b>Embedded Linux</b>

<b>Commands in Linux terminal• pwd: print working directory• mkdir: make directory</b>

<b>• rmdir: remove directory</b>

</div><span class="text_page_counter">Trang 24</span><div class="page_container" data-page="24">

<b>Embedded Linux</b>

<b>1. sudo apt-get install git-core : install git</b>

<b>2. git clone : clone WiringPi folder from git server

<b>3. cd WiringPi: Change directory to home/”user”/WiringPi/</b>

<b>4. ./build :cài đặt theo các bước trên bộ thư viện wiringPi sẽ được </b>

cài đặt trên máy

<b>5. gpio -v : kiểm tra xem quá trình cái đặt có thành cơng hay khơng6. gpio readall : cấu hình các chân hiện tại của kit Raspberry Pi</b>

</div><span class="text_page_counter">Trang 25</span><div class="page_container" data-page="25">

<b>Embedded Linux</b>

</div><span class="text_page_counter">Trang 26</span><div class="page_container" data-page="26">

<b>Summary </b>

<small>▪ Introduce to embedded OS▪ Basics of embedded Linux▪ Linux boot process</small>

<small>▪ Manage Linux system</small>

<small>▪ Git source code management</small>

</div>

×