The MONSOON Implementation of the Generic Pixel Server

Slides:



Advertisements
Similar presentations
Categories of I/O Devices
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.
Module R2 CS450. Next Week R1 is due next Friday ▫Bring manuals in a binder - make sure to have a cover page with group number, module, and date. You.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Application Layer PART VI.
Client Server Model The client machine (or the client process) makes the request for some resource or service, and the server machine (the server process)
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Agenda  Terminal Handling in Unix File Descriptors Opening/Assigning & Closing Sockets Types of Sockets – Internal(Local) vs. Network(Internet) Programming.
Hardware Definitions –Port: Point of connection –Bus: Interface Daisy Chain (A=>B=>…=>X) Shared Direct Device Access –Controller: Device Electronics –Registers:
I/O Systems I/O Hardware Application I/O Interface
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
Computer Emergency Notification System (CENS)
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
---- IT Acumens. COM IT Acumens. COMIT Acumens. COM.
The Socket Interface Chapter 21. Application Program Interface (API) Interface used between application programs and TCP/IP protocols Interface used between.
Device Drivers CPU I/O Interface Device Driver DEVICECONTROL OPERATIONSDATA TRANSFER OPERATIONS Disk Seek to Sector, Track, Cyl. Seek Home Position.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
Writing a Channel Access Client in EPICS Bob Dalesio, April 5, 2000.
Source Controller software Ianos Schmidt The University of Iowa.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Time Management.  Time management is concerned with OS facilities and services which measure real time.  These services include:  Keeping track of.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
WORKING OF SCHEDULER IN OS
Chapter 13: I/O Systems.
Module 12: I/O Systems I/O hardware Application I/O Interface
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Chapter 2: Computer-System Structures(Hardware)
Chapter 2: Computer-System Structures
Process-to-Process Delivery, TCP and UDP protocols
Chapter 2: System Structures
Chapter 2 Processes and Threads Today 2.1 Processes 2.2 Threads
Chapter 3 – Process Concepts
Lectures Queues Chapter 8 of textbook 1. Concepts of queue
Chapter 5: Switch Configuration
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Automated Software Configuration in the MONSOON System
Structure of Processes
Process-to-Process Delivery:
The MONSOON Generic Pixel Server Software Design
Module 2: Computer-System Structures
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
CS703 - Advanced Operating Systems
The Generic Pixel Server (GPX) Dictionary
Time Gathering Systems Secure Data Collection for IBM System i Server
SECURITY IN THE LINUX OPERATING SYSTEM
Issues in Client/Server Programming
MONSOON Software Design & Status
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Module 2: Computer-System Structures
MONSOON Software Design & Status
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Intertask Communication
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Module 2: Computer-System Structures
Process-to-Process Delivery: UDP, TCP
Module 2: Computer-System Structures
Chapter 13: I/O Systems.
MONSOON Software Review
Mr. M. D. Jamadar Assistant Professor
Transport Layer 9/22/2019.
Exceptions and networking
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:

The MONSOON Implementation of the Generic Pixel Server P. N. Daly N. C. Buchholz (NOAO) Copyright, 2004 © AURA, Inc.

MONSOON Team L to R: Peter Moore, Dee Stover, Paul Schmitt, Dave Dryden, John Garcia, Jerry Penegor, Nick Buchholz, Phil Daly and Dave Sawyer. (Not shown: Gustavo Rahmer, Mike Warner, Ricardo Schmidt, Mark Hunten).

MONSOON Results 8 August 2003: First Light Aladdin 19 September 2003: First Light Hawaii II 29 September 2003: First Light CCD

Typical MONSOON System

Supervisor Layer Requirements … Part I Be a single point-of-entry into a MONSOON ‘black box’ from high level software (HLS) Understand and recognize GPX commands only Handle connection security for the protection of the focal plane array

Supervisor Layer Requirements … Part II Remain responsive at all times Maintain and monitor connections to a number of subservient PANs Send commands to PANs Receive responses from PANs Return status information to HLS clients

Supervisor Layer Requirements … Part III Respond, in a deterministic way, to error conditions Respond, in a deterministic way, to asynchronous messages from 1 or more PANs Provide logging for post-mortem analysis Handle urgent messages

Supervisor Layer Requirements … Part IV Utilize common OS facilities consistent with the MONSOON paradigm: Programming interface via sockets Use shared libraries Use shared memory, semaphores and queues Run on designated PAN or own host

Queuing Commands Since the supervisor must remain responsive we cannot poll or wait for commands to complete The command queue, therefore, needs to: Store incoming commands for priority-based execution Save to / Restore from disk in order Flag urgent command to usurp execution order Be efficient with low overheads

MONSOON Star Dates Unique and accurate (to 1s) time stamp based upon Julian day number plus gettimeofday() function Available as MONSOON shared library, Tcl package and loadable SQL function Example (from Tcl): wish% load $env(MONSOON_LIB)/libmsdTcl.so msd package v1.0.0, P. N. Daly, © AURA Inc, 2004. All rights reserved wish% msd::msd 2453129.4587745796889067

MSDs Are Versatile Last command has the maximum MSD For normal priority, the next command to be executed has the minimum MSD A FIFO buffer is handled by searching for the minimum MSD A LIFO/FILO buffer is handled by searching for the maximum MSD Urgency is handled by negation!

Adding An Urgent Command: Normal priority execution queue example: Old queue: 2453129.4767786306329072 "gpxSetAVP intTime=6.6” 2453129.4768044417724013 "gpxSetAVP fSamples=16" 2453129.4768252740614116 "gpxSetAVP coadds=2" Adding an urgent message changes queue: New queue: 2453129.4768252740614116 "gpxSetAVP coadds=2” -2453129.4768352430633316 "gpxSetMode FastIR” So next command (minimum MSD), recovers the urgent command first!

MONSOON Supervisor Memory Map #define GPX_MAXCOMMANDS 1024 #define GPX_MAXNODES 256 #define GPX_MAXMSG 4096 #define GPX_MAXGLOBALS 1024 typedef struct gpxCmdStruct { double gpxMsdInit; double gpxMsd[GPX_MAXCOMMANDS]; long gpxGlobals[GPX_MAXGLOBALS]; long gpxSysStatus[GPX_MAXNODES]; char gpxCmnd[GPX_MAXCOMMANDS][GPX_MAXMSG]; char ppxCmnd[GPX_MAXCOMMANDS][GPX_MAXNODES][GPX_MAXMSG]; char ppxResp[GPX_MAXCOMMANDS][GPX_MAXNODES][GPX_MAXMSG]; long ppxRecv[GPX_MAXCOMMANDS][GPX_MAXNODES]; long ppxSent[GPX_MAXCOMMANDS][GPX_MAXNODES]; long ppxStat[GPX_MAXCOMMANDS][GPX_MAXNODES]; } gpxCmdStr_t, *gpxCmdStr_p, **gpxCmdStr_s;

mslPanSuper This is the main entry point process into the MSL. On entry, mslPanSuper checks to see that the username/password authenticates and, if so, allows access to the system. Thereafter, it creates and initializes the shared memory segment. In particular, the gpxMsd[] array is initialized with MAXDOUBLE values whilst other elements are initialized with 0 NULL. mslPanSuper also opens and listens on a well- known port for incoming connections and establishes a handler to deal with such connections. A logfile is also opened using the startup MSD, gpxMsdInit, as a unique name. It then enters a loop that can be terminated by a gpxExit command or an appropriate signal. Inside the loop, mslPanSuper uses the select() mechanism to listen on n-client sockets plus stdin. for commands. On receipt of a command, it does the following: Scans the string for a known GPX command as the first or second element If the command is not recognized, it immediately returns an error to the HLS client Checks gpxMsd[] for free slot availability. If a slot is available it is stored in local variable recno, otherwise it immediately returns an error to the HLS client Checks for a prefix MSD i.e. viz., as the first element in the incoming command string. If present, it extracts it and records the given MSD/command in gpxMsd[recno], gpxCmnd[recno][0] respectively If no prefix MSD is present, generates a unique MSD and records the MSD/command in the appropriate slot Sets appropriate elements in the gpxGlobals[] array If the queue is not paused, gives the counting semCmdAvailable semaphore If the select() times-out, gives the semSysCheck semaphore Logs all the above actions to the logfile with appropriate MSD timestamps When the loop terminates, outstanding semaphores are given and released, the shared memory segment is detached and destroyed, all applicable sockets are closed and the logfile is closed.

mslPanSent This is the process that sends commands to the PANs. On entry, it reads a configuration record that specifies the number of connected PANs, their IP-addresses and port numbers to use. It opens each socket connection for write-only and reports any dysfunctional connections. It then opens the GPX shared memory segment, opens the shared logfile, and enters a loop terminated by gpxExit or an appropriate signal. Inside the loop, it waits on the semCmdAvailable semaphore and, when received, does the following: Finds the minimum value of the gpxMsd[] array. If no minimum exists, it continues from the top of the loop Finds the slot (and stores it in local variable recno) associated with the minimum MSD Converts the GPX command to a PPX command and writes them to ppxCmnd[recno][panID][0] Sends the PPX command to each socket and returns the write status into each ppxSent[recno][panID] Sets appropriate elements in the gpxGlobals[] array Logs all the above actions to the logfile with appropriate MSD timestamps Takes the {\em semCmdAvailable} semaphore When the loop terminates, outstanding semaphores are given and released, the shared memory segment is detached, all applicable sockets are closed and the logfile is closed.

mslPanRecv This is the process that receives responses from the PANs. On entry, it reads a configuration record that specifies the number of connected PANs and their IP-addresses and port numbers to use. It opens each socket connection for read-only and reports any dysfunctional connections. It then opens the GPX shared memory segment, opens the shared logfile, and enters a loop terminated by gpxExit or an appropriate signal. Inside the loop, it does the following: Finds the minimum value of the gpxMsd[] array. If no minimum exists, it continues from the top of the loop Finds the slot (and stores it in local variable recno) associated with the minimum MSD Sets up an appropriate select() in a loop to receive replies: When a given socket descriptor becomes ready, read the stream and record the response in ppxResp[recno][panID][0] Returns the read status or timeout flag into each ppxRecv[recno][panID] Check incoming MSD with expected and, if different, treat this message as gpxAsyncMsg Sets appropriate elements in the gpxGlobals[] array Gives the semCmdResponse semaphore Logs all the above actions to the logfile with appropriate MSD timestamps When the loop terminates, outstanding semaphores are given and released, the shared memory segment is detached, all applicable sockets are closed and the logfile is closed.

mslPanResponse This is the process that checks responses from the PANs. On entry, it opens a socket connection for write-only to the HLS client. It then opens the GPX shared memory segment, opens the shared logfile, and enters a loop terminated by gpxExit or an appropriate signal. Inside the loop, it waits on the semCmdResponse semaphore and, when received, does the following: Finds the minimum value of the gpxMsd[] array. If no minimum exists, it continues from the top of the loop Finds the slot (and stores it in local variable recno) associated with the minimum MSD Determines a cumulative status by checking: The contents of ppxCmnd[recno][panID][0] against the status in ppxSent[recno][panID] The contents of ppxResp[recno][panID][0] against the status in ppxRecv[recno][panID] The contents of ppxResp[recno][panID][0] against that expected from the command in ppxCmnd[recno][panID][0] Records the status in ppxStat[recno][panID] Based on the above, sends an appropriate response to the HLS client Sets appropriate elements in the gpxGlobals[] array Logs all the above actions to the logfile with appropriate MSD timestamps Re-initializes the now obsolete slot to make it available for further commands Takes the semCmdResponse semaphore When the loop terminates, the shared memory segment is detached, all applicable sockets are closed and the logfile is closed.

mslSysCheck This is the process that checks on system wellness from time to time. On entry, it opens a socket connection for write-only to the HLS client. It then opens the GPX shared memory segment, opens the shared logfile, and enters a loop terminated by gpxExit or an appropriate signal. Inside the loop, it waits on the semSysCheck semaphore and, when received, does the following: Checks the gpxGlobals[] array for any suspicious values and reports them to HLS client Checks the gpxSysStatus[] array for any suspicious values and reports them to HLS client Sends an urgent gpxGetState to mslPanSuper to force a check of all PANs availability (from time to time) Sets appropriate elements in the gpxGlobals[] array Logs all the above actions to the logfile with appropriate MSD timestamps Takes the {\em semSysCheck} semaphore When the loop terminates, the shared memory segment is detached, all applicable sockets are closed and the logfile is closed.

Future Work The design presented is preliminary and yet to be coded. Even so, we can see the design changing for: Authenticating the unique 128-byte identifier code associated with each master control board Named modes via database access using the 128-byte identifier code as a unique key GPX 1-to-many mapping (currently it handles only 1-to-1 mapping to PPX commands)

Papers at SPIE ... N. C. Buchholz and P. N. Daly, “The MONSOON Generic Pixel Server Software Design”, 5496-41. P. N. Daly and N. C. Buchholz, “The MONSOON Implementation of the Generic Pixel Server”, 5496-42. P. N. Daly, N. C. Buchholz and P. C. Moore, “Automated Software Configuration in the MONSOON System”, 5496-43. N. C. Buchholz and P. N. Daly. “The Generic Pixel Server Dictionary”, 5494-20. R. G. Probst, N. Gaughan, G. Chisholm, P. N. Daly, E. A. Hileman, M. Hunten, M. Liang, K. M. Merrill and J. Penegor, “Project Status of NEWFIRM: the Wide-field Infrared Camera for NOAO 4m Telescopes”, 5492-124.