Tài liệu PDF Excretion 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 Excretion Systems Excretion Systems Bởi: OpenStaxCollege Microorganisms and invertebrate animals use more primitive and simple mechanisms to get rid of their metabolic wastes than the mammalian system of kidney and urinary function Three excretory systems evolved in organisms before complex kidneys: vacuoles, flame cells, and Malpighian tubules Contractile Vacuoles in Microorganisms The most fundamental feature of life is the presence of a cell In other words, a cell is the simplest functional unit of a life Bacteria are unicellular, prokaryotic organisms that have some of the least complex life processes in place; however, prokaryotes such as bacteria not contain membrane-bound vacuoles The cells of microorganisms like bacteria, protozoa, and fungi are bound by cell membranes and use them to interact with the environment Some cells, including some leucocytes in humans, are able to engulf food by endocytosis—the formation of vesicles by involution of the cell membrane within the cells The same vesicles are able to interact and exchange metabolites with the intracellular environment In some unicellular eukaryotic organisms such as the amoeba, shown in [link], cellular wastes and excess water are excreted by exocytosis, when the contractile vacuoles merge with the cell membrane and expel wastes into the environment Contractile vacuoles (CV) should not be confused with vacuoles, which store food or water Some unicellular organisms, such as the amoeba, ingest food by endocytosis The food vesicle fuses with a lysosome, which digests the food Waste is excreted by exocytosis 1/5 Excretion Systems Flame Cells of Planaria and Nephridia of Worms As multi-cellular systems evolved to have organ systems that divided the metabolic needs of the body, individual organs evolved to perform the excretory function Planaria are flatworms that live in fresh water Their excretory system consists of two tubules connected to a highly branched duct system The cells in the tubules are called flame cells (or protonephridia) because they have a cluster of cilia that looks like a flickering flame when viewed under the microscope, as illustrated in [link]a The cilia propel waste matter down the tubules and out of the body through excretory pores that open on the body surface; cilia also draw water from the interstitial fluid, allowing for filtration Any valuable metabolites are recovered by reabsorption Flame cells are found in flatworms, including parasitic tapeworms and free-living planaria They also maintain the organism’s osmotic balance In the excretory system of the (a) planaria, cilia of flame cells propel waste through a tubule formed by a tube cell Tubules are connected into branched structures that lead to pores located all along the sides of the body The filtrate is secreted through these pores In (b) annelids such as earthworms, nephridia filter fluid from the coelom, or body cavity Beating cilia at the opening of the nephridium draw water from the coelom into a tubule As the filtrate passes down the tubules, nutrients and other solutes are reabsorbed by capillaries Filtered fluid containing nitrogenous and other wastes is stored in a bladder and then secreted through a pore in the side of the body Earthworms (annelids) have slightly more evolved excretory structures called nephridia, illustrated in [link]b A pair of nephridia is present on each segment of the earthworm They are similar to flame cells in that they have a tubule with cilia Excretion occurs through a pore called the nephridiopore They are more evolved than the flame cells in that they have a system for tubular reabsorption by a capillary network before excretion Malpighian Tubules of Insects Malpighian tubules are found lining the gut of some species of arthropods, such as the bee illustrated in [link] They are usually found in pairs and the number of tubules varies with the species of insect Malpighian tubules are convoluted, which increases 2/5 Excretion Systems their surface area, and they are lined with microvilli for reabsorption and maintenance of osmotic balance Malpighian tubules work cooperatively with specialized glands in the wall of the rectum Body fluids are not filtered as in the case of nephridia; urine is produced by tubular secretion mechanisms by the cells lining the Malpighian tubules that are bathed in hemolymph (a mixture of blood and interstitial fluid that is found in insects and other arthropods as well as most mollusks) Metabolic wastes like uric acid freely diffuse into the tubules There are exchange pumps lining the tubules, which actively transport H+ ions into the cell and K+ or Na+ ions out; water passively follows to form urine The secretion of ions alters the osmotic pressure which draws water, electrolytes, and nitrogenous waste (uric acid) into the tubules Water and electrolytes are reabsorbed when these organisms are faced with low-water environments, and uric acid is excreted as a thick paste or powder Not dissolving wastes ... 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 .. .Excretion Systems Flame Cells of Planaria and Nephridia of Worms As multi-cellular systems evolved to have organ systems that divided the metabolic needs... look at its Malpighian tubules 3/5 Excretion Systems Section Summary Many systems have evolved for excreting wastes that are simpler than the kidney and urinary systems of vertebrate animals The... mammals flatworms D Free Response Why might specialized organs have evolved for excretion of wastes? 4/5 Excretion Systems The removal of wastes, which could otherwise be toxic to an organism,