CHEP 2000, February 7 - February 11, 2000, Padova (Italy), Abstract 377. Data Handling and Filter Framework for the D0 L3/Trigger System A. Boehnlein G.

Slides:



Advertisements
Similar presentations
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Advertisements

More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
WHAT IS AN OPERATING SYSTEM? An interface between users and hardware - an environment "architecture ” Allows convenient usage; hides the tedious stuff.
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
Threads, SMP, and Microkernels Chapter 4. Process Resource ownership - process is allocated a virtual address space to hold the process image Scheduling/execution-
Threads Irfan Khan Myo Thein What Are Threads ? a light, fine, string like length of material made up of two or more fibers or strands of spun cotton,
Chapter 13 Embedded Systems
Chapter 13 Embedded Systems Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design Principles,
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
OPERATING SYSTEM OVERVIEW
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
3.5 Interprocess Communication
OS Spring’03 Introduction Operating Systems Spring 2003.
Figure 1.1 Interaction between applications and the operating system.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
1 Operating Systems Ch An Overview. Architecture of Computer Hardware and Systems Software Irv Englander, John Wiley, Bare Bones Computer.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
Operating System Review September 10, 2012Introduction to Computer Security ©2004 Matt Bishop Slide #1-1.
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
Windows NT and Real-Time? Reading: “Inside Microsoft Windows 2000”, (Solomon, Russinovich, Microsoft Programming Series) “Real-Time Systems and Microsoft.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Processes and Threads Processes have two characteristics: – Resource ownership - process includes a virtual address space to hold the process image – Scheduling/execution.
Chapter 101 Multiprocessor and Real- Time Scheduling Chapter 10.
1 Online Calibration of Calorimeter Mrinmoy Bhattacharjee SUNY, Stony Brook Thanks to: D. Schamberger, L. Groer, U. Bassler, B. Olivier, M. Thioye Institutions:
David Abbott - JLAB DAQ group Embedded-Linux Readout Controllers (Hardware Evaluation)
CE Operating Systems Lecture 3 Overview of OS functions and structure.
NT Kernel CS Spring Overview Interrupts and Exceptions: Trap Handler Interrupt Request Levels and IRT DPC’s, and APC’s System Service Dispatching.
I/O Computer Organization II 1 Interconnecting Components Need interconnections between – CPU, memory, I/O controllers Bus: shared communication channel.
DAQ Software Gordon Watts UW, Seattle December 8, 1999 Director’s Review Introduction to the System Goals for Installation & Commissioning Software Tasks.
1 Threads, SMP, and Microkernels Chapter Multithreading Operating system supports multiple threads of execution within a single process MS-DOS.
Online Software 8-July-98 Commissioning Working Group DØ Workshop S. Fuess Objective: Define for you, the customers of the Online system, the products.
1: Operating Systems Overview 1 Jerry Breecher Fall, 2004 CLARK UNIVERSITY CS215 OPERATING SYSTEMS OVERVIEW.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
L3 DAQ Doug Chapin for the L3DAQ group DAQShifters Meeting 10 Sep 2002 Overview of L3 DAQ uMon l3xqt l3xmon.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
Sep. 17, 2002BESIII Review Meeting BESIII DAQ System BESIII Review Meeting IHEP · Beijing · China Sep , 2002.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
June 17th, 2002Gustaaf Brooijmans - All Experimenter's Meeting 1 DØ DAQ Status June 17th, 2002 S. Snyder (BNL), D. Chapin, M. Clements, D. Cutts, S. Mattingly.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Processes & Threads Introduction to Operating Systems: Module 5.
DØ Online Workshop3-June-1999S. Fuess Online Computing Overview DØ Online Workshop 3-June-1999 Stu Fuess.
DoE Review January 1998 Online System WBS 1.5  One-page review  Accomplishments  System description  Progress  Status  Goals Outline Stu Fuess.
What is an Operating System? Various systems and their pros and cons –E.g. multi-tasking vs. Batch OS definitions –Resource allocator –Control program.
Time Management.  Time management is concerned with OS facilities and services which measure real time.  These services include:  Keeping track of.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Chapter 13: I/O Systems.
REAL-TIME OPERATING SYSTEMS
Module 12: I/O Systems I/O hardware Application I/O Interface
The DZero DAQ System Sean Mattingly Gennady Briskin Michael Clements
Real-time Software Design
Chapter 3: Windows7 Part 2.
I/O Systems I/O Hardware Application I/O Interface
Chapter 3: Windows7 Part 2.
Operating System Concepts
Mid Term review CSC345.
Operating Systems.
Lecture 4- Threads, SMP, and Microkernels
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
CSE 451: Operating Systems Autumn 2001 Lecture 2 Architectural Support for Operating Systems Brian Bershad 310 Sieg Hall 1.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment. Phone:
Chapter 13: I/O Systems.
Module 12: I/O Systems I/O hardwared Application I/O Interface
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

CHEP 2000, February 7 - February 11, 2000, Padova (Italy), Abstract 377. Data Handling and Filter Framework for the D0 L3/Trigger System A. Boehnlein G. Briskin G. Brooijmans D. Claes D. Cutts S. Mattingly M. Souza G. Watts Gennady Briskin, Brown University

2 Gennady Briskin (Brown University) The DØ Trigger System Tape Output Level 1 Level 2 Level 3 Trigger Information Full Readout C/R Detector DAQ RIP ~50-70 Hz ~1 kHz ~10 kHz ~1 kHz ~7 MHz

3 Gennady Briskin (Brown University) Run II DAQ Numbers Readout channels: –Will be ~800,000 in Run 2 –  /event Data rates: –60-80 readout crates –Many to one: All GS to one of 64 L3 farm nodes –Initial design capacity: ~1000 Hz 250 MBytes/sec into the DAQ/l3-farm Staged upgrades to more than 3 GB/sec

4 Gennady Briskin (Brown University) Segment Data Cables Segment Data Cables ) VRC 1 ) Front End Crate Front End Crate Front End Crate Front End Crate Front End Crate Front End Crate Front End Crate Front End Crate VRC 8 S (4 DATA CES L3 Node (1 of 16) L3 Node (1 of 16) L3 Node (1 of 16) SB 1 SB 4 ETG Event Tag Loop Primary Fiber Channel Loop #1 Primary Fiber Channel Loop #8 Front End Token Readout Loop Front End Token Readout Loop Trigger Framework ) L3 Node (1 of 16) L3 Node (1 of 16) L3 Node (1 of 16) To Collector Router To Collector Router Ethernet

5 Gennady Briskin (Brown University) Dedicated 100 Mbits/s Ethernet to Online Collector/Router Dedicated 100 Mbits/s Ethernet to Online Collector/Router L3 Farm Nodes Input rate starts at 1000 Hz Output rate is ~50-70 Hz Intel Based SMP System Windows NT As many L3 Filters as possible Prototype hardware in hand Input rate starts at 1000 Hz Output rate is ~50-70 Hz Intel Based SMP System Windows NT As many L3 Filters as possible Prototype hardware in hand 100-BaseT Ethernet L3 Filter L3 Filter L3 Filter Process DMA capable VME-PCI Bridge L3 Node Framework Each 48 MB/s Control, Monitoring and Error Module L3 Filter Interface Module Node-VME I/O Module Shared Memory Buffers VME Crate MPM Collector Router Module

6 Gennady Briskin (Brown University) L3 Node Requirements What we really need for L3 node is: To serve the interrupt efficiently Low overhead for process scheduling and context switching: threads Low overhead for Inter-Process Communication: shared memory Low overhead for thread/process synchronization: events, mutexes, etc... Efficient extension to multi-processor environment Full functionality of Network OS Directory sharing, etc…

7 Gennady Briskin (Brown University) NT OS Characteristic WinNT is highly responsive NOS created by developers of VMS WinNT has some real time characteristics –NT is preemptive multitasking and multi-threaded Scheduling items are threads and the context-switch overhead is low. –NT offers SMP support, with Interrupt Dispatch Table configurable for individual processors –NT supports 32 priority levels 16 of these are fixed real-time priority levels –NT supports Asynchronous I/O –NT processes can lock themselves into memory Avoids paging while doing real-time work to improve predictability of response time Other considerations –The Win32 API is becoming a de facto standard –GUI is very popular –NT has a lot of commercial solutions (h/s-ware) –Great number of development tools are available

8 Gennady Briskin (Brown University) L3 Node Data Path L3 Node is where for the first time in the DAQ system all the data for a single event is assembled together. Once an event has been copied into memory, don’t move it again –Pass pointer to an event in a shared memory around Use a pipeline architecture with a thread for each task –Thread-safe queues between the tasks to manage the event pointers Physics Filter executes in a second process –Isolates the framework from crashes –Write protected shared memory, i.e. prevents corruption of raw data. –Simple IPC mechanisms

9 Gennady Briskin (Brown University) Validation Queue Event Validation FECs presence validation Checksum validation L3 Filter Input Interface Process Interface Pool Queue Collector/Router Network Interface Determine where this event should be sent Sent event to collector/router node Filter Queue Data to Online Host System Data Control Output Events Queue Get a pointer to an event buffer Configures MPMs for receiving new event Wait till complete event arrives into MPM Load event data into shared memory buffer Insert event pointer into the next queue L3 Supervisor Interface L3 Monitor Interface L3 Error Interface Command/Monitor/Error Shared Memory Event Buffer Shared Memory Event Buffer Shared Memory L3 Filter Process L3 Filter Output Interface Process Interface Output Pool Queue MPM Reader

10 Gennady Briskin (Brown University) Software Issues Interrupt Handling Memory Management L3 Filter Environment

11 Gennady Briskin (Brown University) Interrupt Management In real-time applications it is critical that interrupts be handled promptly. NT handles interrupts on preemptive basis. When an interrupt occurs, all execution at lower levels is suspended and execution begins immediately on the highest-level request. Processing continues until the highest-level interrupt is complete. In SMP environment: kernel dispatches the interrupt to just one CPU, all other CPUs continue executing uninterrupted (L3Filter Process) High Power Inter-processor notification Clock Device n Dispatch/DPC APC Passive_Level 0 31 Interrupt masked on Processor A Processor A IRQL Device n Processor B IRQL Dispatch/DPC Interrupt masked on Processor B

12 Gennady Briskin (Brown University) Interrupt Test It is important to see if L3 Node can respond to an event and meet the real-time requirement of reacting within a prescribed time limit to that event –Need to measure Interrupt to Task Start We used a Dual Pentium II clocked at 333 MHz and connected to VME via VME/PCI bridge. We used VMETRO board to observe signals on a VME backplane. VME MPM VME/PCI Bridge MPM

13 Gennady Briskin (Brown University) Interrupt Test While performing the tests, the system was loaded artificially with one REAL_TIME (31) process and applications using network/disk transfers. The acquisition thread (with dynamic priority) was blocked, waiting for the event object to be signaled that interrupt has occurred and then issue a read to Multi Memory Board in the VME crate. We observe first read on backplane ~135us (max 225us) This involves ISR, context switch and read request to Device Driver

14 Gennady Briskin (Brown University) Memory Management WinNT is built around a virtual memory system and can address up to 2 GB. Windows NT memory management allows for memory mapping, which permits multiple processes to share the same physical memory. This results in very fast data transfers between cooperating processes or between a driver and an application. Memory mapping can be used to dramatically enhance real-time performance. Windows NT permits an application to lock itself into memory so that it is not affected by paging within its own process. Paging I/O occurs at a lower priority level than the real-time priority process levels; this really ensures that background virtual memory management won't interfere with processing at real-time priorities.

15 Gennady Briskin (Brown University) Shared Memory IPC between processes is done via shared memory Event 1 L3 Node Process L3 Filter Process Event. Shared memory Event n Test on single Pentium Pro clocked at 200 MHz have shown that we can pass a pointer to an event in shared memory between processes at ~4000 events/sec using event objects for synchronization.

16 Gennady Briskin (Brown University) Level 3 Node Data In Data Out L3 Filter reject 19/20 events, based on full event reconstruction L3 Framework (drives & organizes data + handles communications with outside) L3 Filter

17 Gennady Briskin (Brown University) L3 Filter Environment L3 Filter Shell provides calling sequence to ScriptRunner public interfaces Event data passed into ScriptRunner as an edm::Event –Read only access to Raw Data –Add result chunks to the edm::Event No Network or Disk Access during regular running –Exceptions can be made during calibration runs –No direct access to COOR Parameters and filter scripts provided by the L3 framework Alarm system access is via the Error Logger Package

18 Gennady Briskin (Brown University) ScriptRunner Filter Scripts (and Filters) Tools Handles communication with L3 framework, calls appropriate filter scripts (based on L1/L2 bits that fired), takes care of initialization, and of run,... Correspond to the L3 triggers, call filters, which call tools to reconstruct the event Perform event reconstruction, call other tools (e.g. electron tool will call calorimeter clustering, which will call calorimeter unpacking) Candidate objects Trigger decision ScriptRunner

19 Gennady Briskin (Brown University) Start Run Chronology Start Run  download trigger list Extern Iterator asks L3 parser to instantiate tools and filters Tools are instantiated through their pseudo- constructor, getting their parameters, and pointers to tools they need through the parser Same for Filters, but they are associated with a link node in a Linked List (  Execution tree)

20 Gennady Briskin (Brown University) Event Chronology For each active and fired L2 bit, traverse the corresponding level 3 branches (multiple branches per L2 bit are possible) Done by following the Linked List, executing the corresponding filters (which execute the tools etc.) until one fails If all pass, build L3Chunk Execute Full Reset

21 Gennady Briskin (Brown University) In Run Can change prescale factors Can add/drop L2 bits from active list Can enable/disable L3 bits Can request summaries/statistics...

22 Gennady Briskin (Brown University) Conclusion C++ Reuse is depended upon heavily to get the project done on time –Small general components in many of the nodes will be reused. –Objects have really helped us out. Design to Windows OS strengths Data Handling Framework is finished ScriptRunner Framework is finished Cosmic Muon tests with a complete L3 node will start next week

23 Gennady Briskin (Brown University) The valiant warriors of D0 are strong thanks to a magic potion prepared by druid Getafix and this recipe is secret (all we know is that it has lobster and beer)