Tài liệu PDF Digestive Systems tài liệu, giáo án, bài giảng , luận văn, luận án, đồ án, bài tập lớn về tất cả các lĩnh v...
Sự thiển cận trong Marketing Realtime Operating Systems Concepts and Implementation of Microkernels for Embedded Systems Dr. Jürgen Sauermann, Melanie Thelen 2 Contents List of Figures .v List of Tables .vi Preface 1 1 Requirements 3 1.1 General Requirements .3 1.2 Memory Requirements 3 1.3 Performance .4 1.4 Portability 5 2 Concepts .7 2.1 Specification and Execution of Programs 7 2.1.1 Compiling and Linking .7 2.2 Loading and Execution of Programs .11 2.3 Preemptive Multitasking 12 2.3.1 Duplication of Hardware .12 2.3.2 Task Switch .14 2.3.3 Task Control Blocks 16 2.3.4 De-Scheduling .19 2.4 Semaphores .21 2.5 Queues .26 2.5.1 Ring Buffers 26 2.5.2 Ring Buffer with Get Semaphore 28 2.5.3 Ring Buffer with Put Semaphore 29 2.5.4 Ring Buffer with Get and Put Semaphores .30 3 Kernel Implementation .33 3.1 Kernel Architecture .33 3.2 Hardware Model 34 3.2.1 Processor .34 3.2.2 Memory Map .35 3.2.3 Peripherals .35 3.2.4 Interrupt Assignment .36 3.2.5 Data Bus Usage .36 3.3 Task Switching 39 3.4 Semaphores .46 3.4.1 Semaphore Constructors 46 ii 3.4.2 Semaphore Destructor .46 3.4.3 Semaphore P() .46 3.4.4 Semaphore Poll() .48 3.4.5 Semaphore V() 49 3.5 Queues .51 3.5.1 Ring Buffer Constructor and Destructor .51 3.5.2 RingBuffer Member Functions 52 3.5.3 Queue Put and Get Functions 53 3.5.4 Queue Put and Get Without Disabling Interrupts 53 3.6 Interprocess Communication .54 3.7 Serial Input and Output .59 3.7.1 Channel Numbers 62 3.7.2 SerialIn and SerialOut Classes and Constructors/Destructors 63 3.7.3 Public SerialOut Member Functions .65 3.7.4 Public SerialIn Member Functions 69 3.8 Interrupt Processing .71 3.8.1 Hardware Initialization 71 3.8.2 Interrupt Service Routine 73 3.9 Memory Management .77 3.10 Miscellaneous Functions Digestive Systems Digestive Systems Bởi: OpenStaxCollege Animals obtain their nutrition from the consumption of other organisms Depending on their diet, animals can be classified into the following categories: plant eaters (herbivores), meat eaters (carnivores), and those that eat both plants and animals (omnivores) The nutrients and macromolecules present in food are not immediately accessible to the cells There are a number of processes that modify food within the animal body in order to make the nutrients and organic molecules accessible for cellular function As animals evolved in complexity of form and function, their digestive systems have also evolved to accommodate their various dietary needs Herbivores, Omnivores, and Carnivores Herbivores are animals whose primary food source is plant-based Examples of herbivores, as shown in [link] include vertebrates like deer, koalas, and some bird species, as well as invertebrates such as crickets and caterpillars These animals have evolved digestive systems capable of handling large amounts of plant material Herbivores can be further classified into frugivores (fruit-eaters), granivores (seed eaters), nectivores (nectar feeders), and folivores (leaf eaters) 1/16 Digestive Systems Herbivores, like this (a) mule deer and (b) monarch caterpillar, eat primarily plant material (credit a: modification of work by Bill Ebbesen; credit b: modification of work by Doug Bowman) Carnivores are animals that eat other animals The word carnivore is derived from Latin and literally means “meat eater.” Wild cats such as lions, shown in [link]a and tigers are examples of vertebrate carnivores, as are snakes and sharks, while invertebrate carnivores include sea stars, spiders, and ladybugs, shown in [link]b Obligate carnivores are those that rely entirely on animal flesh to obtain their nutrients; examples of obligate carnivores are members of the cat family, such as lions and cheetahs Facultative carnivores are those that also eat non-animal food in addition to animal food Note that there is no clear line that differentiates facultative carnivores from omnivores; dogs would be considered facultative carnivores Carnivores like the (a) lion eat primarily meat The (b) ladybug is also a carnivore that consumes small insects called aphids (credit a: modification of work by Kevin Pluck; credit b: modification of work by Jon Sullivan) Omnivores are animals that eat both plant- and animal-derived food In Latin, omnivore means to eat everything Humans, bears (shown in [link]a), and chickens are example of vertebrate omnivores; invertebrate omnivores include cockroaches and crayfish (shown in [link]b) Omnivores like the (a) bear and (b) crayfish eat both plant and animal based food (credit a: modification of work by Dave Menke; credit b: modification of work by Jon Sullivan) 2/16 Digestive Systems Invertebrate Digestive Systems Animals have evolved different types of digestive systems to aid in the digestion of the different foods they consume The simplest example is that of a gastrovascular cavity and is found in organisms with only one opening for digestion Platyhelminthes (flatworms), Ctenophora (comb jellies), and Cnidaria (coral, jelly fish, and sea anemones) use this type of digestion Gastrovascular cavities, as shown in [link]a, are typically a blind tube or cavity with only one opening, the “mouth”, which also serves as an “anus” Ingested material enters the mouth and passes through a hollow, tubular cavity Cells within the cavity secrete digestive enzymes that break down the food The food particles are engulfed by the cells lining the gastrovascular cavity The alimentary canal, shown in [link]b, is a more advanced system: it consists of one tube with a mouth at one end and an anus at the other Earthworms are an example of an animal with an alimentary canal Once the food is ingested through the mouth, it passes through the esophagus and is stored in an organ called the crop; then it passes into the gizzard where it is churned and digested From the gizzard, the food passes through the intestine, the nutrients are absorbed, and the waste is eliminated as feces, called castings, through the anus (a) A gastrovascular cavity has a single opening through which food is ingested and waste is excreted, as shown in this hydra and in this jellyfish medusa (b) An alimentary canal has two openings: a mouth for ingesting food, and an anus for eliminating waste, as shown in this nematode 3/16 Digestive Systems Vertebrate Digestive Systems Vertebrates have evolved more complex digestive systems to adapt to their dietary needs Some animals have a single stomach, while others have multi-chambered stomachs Birds have developed a digestive system adapted to eating unmasticated food Monogastric: Single-chambered Stomach As the word monogastric suggests, this type of digestive system consists of one (“mono”) stomach chamber (“gastric”) Humans and many animals have a monogastric digestive system as ... in a computer system. Hardware and software cooperate in a computer system to accomplish complex tasks. The nature of that cooperation and the purpose of various hardware components are important prerequisites to the study of software develop- ment. Furthermore, computer networks have revolutionized the manner in which computers are used, and they now play a key role in even basic software development. This chapter explores a broad range of com- puting issues, laying the founda- tion for the study of software development. ◗ Describe the relationship between hardware and software. ◗ Define various types of software and how they are used. ◗ Identify the core hardware compo- nents of a computer and explain their purposes. ◗ Explain how the hardware compo- nents interact to execute programs and manage data. ◗ Describe how computers are con- nected together into networks to share information. ◗ Explain the impact and significance of the Internet and the World Wide Web. ◗ Introduce the Java programming language. ◗ Describe the steps involved in pro- gram compilation and execution. ◗ Introduce graphics and their repre- sentations. chapter objectives This book is about writing well-designed software. To understand software, we must first have a fundamental understanding of its role 1 computer systems 2 CHAPTER 1 computer systems 1.0 introduction We begin our exploration of computer systems with an overview of computer processing, defining some fundamental terminology and showing how the key pieces of a computer system interact. basic computer processing A computer system is made up of hardware and software. The hardware compo- nents of a computer system are the physical, tangible pieces that support the com- puting effort. They include chips, boxes, wires, keyboards, speakers, disks, cables, plugs, printers, mice, monitors, and so on. If you can physically touch it and it can be considered part of a computer system, then it is computer hardware. The hardware components of a computer are essentially useless without instructions to tell them what to do. A program is a series of instructions that the hardware executes one after another. Software consists of programs and the data those programs use. Software is the intangible counterpart to the physical hardware components. Together they form a tool that we can use to solve problems. The key hardware components in a computer system are: ◗ central processing unit (CPU) ◗ input/output (I/O) devices ◗ main memory ◗ secondary memory devices Each of these hardware components is described in detail in the next section. For now, let’s simply examine their basic roles. The central processing unit (CPU) is the device that executes the individual commands of a program. Input/output (I/O) devices, such as the keyboard, mouse, and monitor, allow a human being to interact with the computer. Programs and data are held in storage devices called memory, which fall into two categories: main memory and secondary memory. Main memory is the stor- age device that holds the software while it is being processed by the CPU. Secondary memory devices store software in a relatively permanent manner. The most important secondary memory device of a typical computer system is the hard disk that resides inside the main computer box. A floppy disk is similar to a hard disk, but it cannot store nearly as much information as a hard disk. Floppy A computer system page 0 A C + B C * B B T1 ST2 A⋅= T1 T2 T3 T4 ST1 ST2 ST3 FS = first scan ST1 ST1 T1+()T2⋅ FS+= ST2 ST2 T2 T3++()T1 T4⋅⋅= ST3 ST3 T4 T1⋅+()T3⋅= T2 ST1 B⋅= T3 ST3 CB⋅()⋅= T4 ST2 CB+()⋅= ST2 A ST1 B ST3 C B T1 T2 T3 T4 ST2 C B ST1 T2 ST1 T1 first scan ST2 T1 ST2 T2 T3 ST3 T3 ST3 T4 T4 T1 Automating Manufacturing Systems with PLCs (Version 4.2, April 3, 2003) Hugh Jack page i Copyright (c) 1993-2003 Hugh Jack (jackh@gvsu.edu). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This document is provided as-is with no warranty, implied or otherwise. There have been attempts to eliminate errors from this document, but there is no doubt that errors remain. As a result, the author does not assume any responsibility for errors and omissions, or damages resulting from the use of the information pro- vided. Additional materials and updates for this work will be available at http://clay- more.engineer.gvsu.edu/~jackh/books.html page ii 1.1 TODO LIST 1.4 2. PROGRAMMABLE LOGIC CONTROLLERS . . . . . . . . . . . . . 2.1 2.1 INTRODUCTION 2.1 2.1.1 Ladder Logic 2.1 2.1.2 Programming 2.6 2.1.3 PLC Connections 2.10 2.1.4 Ladder Logic Inputs 2.11 2.1.5 Ladder Logic Outputs 2.12 2.2 A CASE STUDY 2.13 2.3 SUMMARY 2.14 2.4 PRACTICE PROBLEMS 2.15 2.5 PRACTICE PROBLEM SOLUTIONS 2.15 2.6 ASSIGNMENT PROBLEMS 2.16 3. PLC HARDWARE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 3.1 INTRODUCTION 3.1 3.2 INPUTS AND OUTPUTS 3.2 3.2.1 Inputs 3.3 3.2.2 Output Modules 3.7 3.3 RELAYS 3.13 3.4 A CASE STUDY 3.14 3.5 ELECTRICAL WIRING DIAGRAMS 3.15 3.5.1 JIC Wiring Symbols 3.17 3.6 SUMMARY 3.21 3.7 PRACTICE PROBLEMS 3.21 3.8 PRACTICE PROBLEM SOLUTIONS 3.24 3.9 ASSIGNMENT PROBLEMS 3.27 4. LOGICAL SENSORS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 4.1 INTRODUCTION 4.1 4.2 SENSOR WIRING 4.1 4.2.1 Switches 4.2 4.2.2 Transistor Transistor Logic (TTL) 4.3 4.2.3 Sinking/Sourcing 4.3 4.2.4 Solid State Relays 4.10 4.3 PRESENCE DETECTION 4.11 4.3.1 Contact Switches 4.11 4.3.2 Reed Switches 4.11 4.3.3 Optical (Photoelectric) Sensors 4.12 4.3.4 Capacitive Sensors 4.19 4.3.5 Inductive Sensors 4.23 4.3.6 Ultrasonic 4.25 4.3.7 Hall Effect 4.25 page iii 4.3.8 Fluid Flow 4.26 4.4 SUMMARY 4.26 4.5 PRACTICE PROBLEMS 4.27 4.6 PRACTICE PROBLEM SOLUTIONS 4.30 4.7 ASSIGNMENT PROBLEMS 4.36 5. LOGICAL ACTUATORS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 5.1 INTRODUCTION 5.1 5.2 SOLENOIDS 5.1 5.3 VALVES 5.2 5.4 CYLINDERS 5.4 5.5 HYDRAULICS 5.6 5.6 PNEUMATICS 5.8 5.7 MOTORS 5.9 5.8 OTHERS 5.10 5.9 SUMMARY 5.10 5.10 PRACTICE PROBLEMS 5.10 5.11 PRACTICE PROBLEM SOLUTIONS 5.10 5.12 ASSIGNMENT PROBLEMS 5.11 6. BOOLEAN LOGIC DESIGN . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 6.1 INTRODUCTION 6.1 6.2 BOOLEAN ALGEBRA 6.1 6.3 LOGIC DESIGN 6.6 6.3.1 Boolean Algebra Techniques 6.13 6.4 COMMON LOGIC FORMS 6.14 6.4.1 Complex Gate Forms 6.14 6.4.2 Multiplexers 6.15 6.5 SIMPLE DESIGN CASES 6.17 6.5.1 Basic Logic Functions 6.17 6.5.2 Car Safety System 6.18 6.5.3 Motor Forward/Reverse 6.18 6.5.4 A Burglar Alarm 6.19 6.6 SUMMARY 6.23 6.7 PRACTICE PROBLEMS 6.24 6.8 PRACTICE PROBLEM SOLUTIONS 6.27 6.9 ASSIGNMENT PROBLEMS 6.37 7. KARNAUGH MAPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1 7.1 INTRODUCTION 7.1 7.2 SUMMARY 7.4 7.3 PRACTICE PROBLEMS 7.4 7.4 PRACTICE PROBLEM SOLUTIONS 7.10 page iv 7.5 ASSIGNMENT PROBLEMS 7.16 8. PLC OPERATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1 8.1 INTRODUCTION 8.1 8.2 OPERATION SEQUENCE 8.3 8.2.1 The Input and Output Scans 8.4 8.2.2 The Logic Scan 8.4 page 0 A C + B C * B B T1 ST2 A⋅= T1 T2 T3 T4 ST1 ST2 ST3 FS = first scan ST1 ST1 T1+()T2⋅ FS+= ST2 ST2 T2 T3++()T1 T4⋅⋅= ST3 ST3 T4 T1⋅+()T3⋅= T2 ST1 B⋅= T3 ST3 CB⋅()⋅= T4 ST2 CB+()⋅= ST2 A ST1 B ST3 C B T1 T2 T3 T4 ST2 C B ST1 T2 ST1 T1 first scan ST2 T1 ST2 T2 T3 ST3 T3 ST3 T4 T4 T1 Automating Manufacturing Systems with PLCs (Version 4.2, April 3, 2003) Hugh Jack page i Copyright (c) 1993-2003 Hugh Jack (jackh@gvsu.edu). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This document is provided as-is with no warranty, implied or otherwise. There have been attempts to eliminate errors from this document, but there is no doubt that errors remain. As a result, the author does not assume any responsibility for errors and omissions, or damages resulting from the use of the information pro- vided. Additional materials and updates for this work will be available at http://clay- more.engineer.gvsu.edu/~jackh/books.html page ii 1.1 TODO LIST 1.4 2. PROGRAMMABLE LOGIC CONTROLLERS . . . . . . . . . . . . . 2.1 2.1 INTRODUCTION 2.1 2.1.1 Ladder Logic 2.1 2.1.2 Programming 2.6 2.1.3 PLC Connections 2.10 2.1.4 Ladder Logic Inputs 2.11 2.1.5 Ladder Logic Outputs 2.12 2.2 A CASE STUDY 2.13 2.3 SUMMARY 2.14 2.4 PRACTICE PROBLEMS 2.15 2.5 PRACTICE PROBLEM SOLUTIONS 2.15 2.6 ASSIGNMENT PROBLEMS 2.16 3. PLC HARDWARE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 3.1 INTRODUCTION 3.1 3.2 INPUTS AND OUTPUTS 3.2 3.2.1 Inputs 3.3 3.2.2 Output Modules 3.7 3.3 RELAYS 3.13 3.4 A CASE STUDY 3.14 3.5 ELECTRICAL WIRING DIAGRAMS 3.15 3.5.1 JIC Wiring Symbols 3.17 3.6 SUMMARY 3.21 3.7 PRACTICE PROBLEMS 3.21 3.8 PRACTICE PROBLEM SOLUTIONS 3.24 3.9 ASSIGNMENT PROBLEMS 3.27 4. LOGICAL SENSORS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 4.1 INTRODUCTION 4.1 4.2 SENSOR WIRING 4.1 4.2.1 Switches 4.2 4.2.2 Transistor Transistor Logic (TTL) 4.3 4.2.3 Sinking/Sourcing 4.3 4.2.4 Solid State Relays 4.10 4.3 PRESENCE DETECTION 4.11 4.3.1 Contact Switches 4.11 4.3.2 Reed Switches 4.11 4.3.3 Optical (Photoelectric) Sensors 4.12 4.3.4 Capacitive Sensors 4.19 4.3.5 Inductive Sensors 4.23 4.3.6 Ultrasonic 4.25 4.3.7 Hall Effect 4.25 page iii 4.3.8 Fluid Flow 4.26 4.4 SUMMARY 4.26 4.5 PRACTICE PROBLEMS 4.27 4.6 PRACTICE PROBLEM SOLUTIONS 4.30 4.7 ASSIGNMENT PROBLEMS 4.36 5. LOGICAL ACTUATORS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 5.1 INTRODUCTION 5.1 5.2 SOLENOIDS 5.1 5.3 VALVES 5.2 5.4 CYLINDERS 5.4 5.5 HYDRAULICS 5.6 5.6 PNEUMATICS 5.8 5.7 MOTORS 5.9 5.8 OTHERS 5.10 5.9 SUMMARY 5.10 5.10 PRACTICE PROBLEMS 5.10 5.11 PRACTICE PROBLEM SOLUTIONS 5.10 5.12 ASSIGNMENT PROBLEMS 5.11 6. BOOLEAN LOGIC DESIGN . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 6.1 INTRODUCTION 6.1 6.2 BOOLEAN ALGEBRA 6.1 6.3 LOGIC DESIGN 6.6 6.3.1 Boolean Algebra Techniques 6.13 6.4 COMMON LOGIC FORMS 6.14 6.4.1 Complex Gate Forms 6.14 6.4.2 Multiplexers 6.15 6.5 SIMPLE DESIGN CASES 6.17 6.5.1 Basic Logic Functions 6.17 6.5.2 Car Safety System 6.18 6.5.3 Motor Forward/Reverse 6.18 6.5.4 A Burglar Alarm 6.19 6.6 SUMMARY 6.23 6.7 PRACTICE PROBLEMS 6.24 6.8 PRACTICE PROBLEM SOLUTIONS 6.27 6.9 ASSIGNMENT PROBLEMS 6.37 7. KARNAUGH MAPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1 7.1 INTRODUCTION 7.1 7.2 SUMMARY 7.4 7.3 PRACTICE PROBLEMS 7.4 7.4 PRACTICE PROBLEM SOLUTIONS 7.10 page iv 7.5 ASSIGNMENT PROBLEMS 7.16 8. PLC OPERATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1 8.1 INTRODUCTION 8.1 8.2 OPERATION SEQUENCE 8.3 8.2.1 The Input and Output Scans 8.4 8.2.2 The Logic Scan 8.4 Sự thiển cận trong Marketing Realtime Operating Systems Concepts and Implementation of Microkernels for Embedded Systems Dr. Jürgen Sauermann, Melanie Thelen 2 Contents List of Figures .v List of Tables .vi Preface 1 1 Requirements 3 1.1 General Requirements .3 1.2 Memory Requirements 3 1.3 Performance .4 1.4 Portability 5 2 Concepts .7 2.1 Specification and Execution of Programs 7 2.1.1 Compiling and Linking .7 2.2 Loading and Execution of Programs .11 2.3 Preemptive Multitasking 12 2.3.1 Duplication of Hardware .12 2.3.2 Task Switch .14 2.3.3 Task Control Blocks 16 2.3.4 De-Scheduling .19 2.4 Semaphores .21 2.5 Queues .26 2.5.1 Ring Buffers 26 2.5.2 Ring Buffer with Get Semaphore 28 2.5.3 Ring Buffer with Put Semaphore 29 2.5.4 Ring Buffer with Get and Put Semaphores .30 3 Kernel Implementation .33 3.1 Kernel Architecture .33 3.2 Hardware Model 34 3.2.1 Processor .34 3.2.2 Memory Map .35 3.2.3 Peripherals .35 3.2.4 Interrupt Assignment .36 3.2.5 Data Bus Usage .36 3.3 Task Switching 39 3.4 Semaphores .46 3.4.1 Semaphore Constructors 46 ii 3.4.2 Semaphore Destructor .46 3.4.3 Semaphore P() .46 3.4.4 Semaphore Poll() .48 3.4.5 Semaphore V() 49 3.5 Queues .51 3.5.1 Ring Buffer Constructor and Destructor .51 3.5.2 RingBuffer Member Functions 52 3.5.3 Queue Put and Get Functions 53 3.5.4 Queue Put and Get Without Disabling Interrupts 53 3.6 Interprocess Communication .54 3.7 Serial Input and Output .59 3.7.1 Channel Numbers 62 3.7.2 SerialIn and SerialOut Classes and Constructors/Destructors 63 3.7.3 Public SerialOut Member Functions .65 3.7.4 Public SerialIn Member Functions 69 3.8 Interrupt Processing .71 3.8.1 Hardware Initialization 71 3.8.2 Interrupt Service Routine 73 3.9 Memory Management .77 3.10 Miscellaneous Functions Economic Systems Economic Systems Bởi: OpenStaxCollege Vladimir Ilyich Lenin was one of the founders of Russian communism J.P Morgan was one of the most influential ... b: modification of work by Jon Sullivan) 2/16 Digestive Systems Invertebrate Digestive Systems Animals have evolved different types of digestive systems to aid in the digestion of the different... eliminating waste, as shown in this nematode 3/16 Digestive Systems Vertebrate Digestive Systems Vertebrates have evolved more complex digestive systems to adapt to their dietary needs Some animals... types of digestive systems specialized to meet their dietary needs Humans and many other animals have monogastric digestive systems with a single-chambered stomach Birds have evolved a digestive