Intro  Scratchpad rings and queues.  First – In – Firs – Out (FIFO) data structure.  Rings are fixed-sized, circular FIFO.  Queues not fixed-size.

Slides:



Advertisements
Similar presentations
4.4 Page replacement algorithms
Advertisements

Lecture 4 Introduction to Digital Signal Processors (DSPs) Dr. Konstantinos Tatas.
CS252: Systems Programming Ninghui Li Program Interview Questions.
Queues.
Stacks, Queues, and Deques. 2 A stack is a last in, first out (LIFO) data structure Items are removed from a stack in the reverse order from the way they.
Chapter 7 Queues. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Chapter Objectives Examine queue processing Define a queue abstract.
Spring 2003CSE P5481 Reorder Buffer Implementation (Pentium Pro) Hardware data structures retirement register file (RRF) (~ IBM 360/91 physical registers)
Hit or Miss ? !!!.  Cache RAM is high-speed memory (usually SRAM).  The Cache stores frequently requested data.  If the CPU needs data, it will check.
Inter Process Communication:  It is an essential aspect of process management. By allowing processes to communicate with each other: 1.We can synchronize.
VIRTUAL MEMORY. Virtual memory technique is used to extents the size of physical memory When a program does not completely fit into the main memory, it.
Cache Memories Effectiveness of cache is based on a property of computer programs called locality of reference Most of programs time is spent in loops.
A Scalable, Cache-Based Queue Management Subsystem for Network Processors Sailesh Kumar, Patrick Crowley Dept. of Computer Science and Engineering.
Multicore Navigator: Queue Manager Subsystem (QMSS)
Embedded Systems 7763B Mt Druitt College of TAFE
Paper Review Building a Robust Software-based Router Using Network Processors.
O RERATıNG S YSTEM LESSON 10 MEMORY MANAGEMENT II 1.
Chapter 10 The Stack Stack: An Abstract Data Type An important abstraction that you will encounter in many applications. We will describe two uses:
TK1924 Program Design & Problem Solving Session 2011/2012 L6: Queues.
Basic Structure of Computer Computer Architecture Lecture – 2.
CHAPTER 2: COMPUTER-SYSTEM STRUCTURES Computer system operation Computer system operation I/O structure I/O structure Storage structure Storage structure.
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
Computer Architecture and the Fetch-Execute Cycle
Compact Data Structures and Applications Gil Einziger and Roy Friedman Technion, Haifa.
Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped Files Allocating Kernel.
Ethernet Driver Changes for NET+OS V5.1. Design Changes Resides in bsp\devices\ethernet directory. Source code broken into more C files. Native driver.
C++ Programming: Program Design Including Data Structures, Fourth Edition Chapter 18: Stacks and Queues (part 3)
Using Direct Memory Access to Improve Performance
1 Shared Files Sharing files among team members A shared file appearing simultaneously in different directories Share file by link File system becomes.
System Address Registers/Memory Management Registers Four memory management registers are used to specify the locations of data structures which control.
Queues, Pipes and Sockets. QUEUE A structure with a series of data elements with the first element waiting for an operation Used when an element is not.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
4-Oct Fall 2001: copyright ©T. Pearce, D. Hutchinson, L. Marshall Sept  direct mode: OK for static addresses  indirect register mode:
Stacks And Queues Chapter 18.
Linked List by Chapter 5 Linked List by
Precomputation- based Prefetching By James Schatz and Bashar Gharaibeh.
Operating Systems Unit 7: – Virtual Memory organization Operating Systems.
Silberschatz, Galvin and Gagne  Applied Operating System Concepts Chapter 2: Computer-System Structures Computer System Architecture and Operation.
CHP-4 QUEUE. 1.INTRODUCTION  A queue is a linear list in which elements can be added at one end and elements can be removed only at other end.  That.
1 Algorithms Queues, Stacks and Records stored in Linked Lists or Arrays.
Queue Manager and Scheduler on Intel IXP John DeHart Amy Freestone Fred Kuhns Sailesh Kumar.
Different Microprocessors Tamanna Haque Nipa Lecturer Dept. of Computer Science Stamford University Bangladesh.
Linear Data Structures
2005MEE Software Engineering Lecture 7 –Stacks, Queues.
Full Design. DESIGN CONCEPTS The main idea behind this design was to create an architecture capable of performing run-time load balancing in order to.
CPU (Central Processing Unit). The CPU is the brain of the computer. Sometimes referred to simply as the processor or central processor, the CPU is where.
Page Replacement FIFO, LIFO, LRU, NUR, Second chance
© Oxford University Press All rights reserved. Data Structures Using C, 2e Reema Thareja.
Memory Hierarchy Ideal memory is fast, large, and inexpensive
Chapter 2: Computer-System Structures
Data Structures Using C, 2e
Queues.
Chapter 2 Memory and process management
Process Management Process Concept Why only the global variables?
The Stack.
Edexcel GCSE Computer Science Topic 15 - The Processor (CPU)
Stacks and Queues.
Microcomputer Programming
Virtual Memory Management
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Chapter 10 The Stack.
Module 2: Computer-System Structures
Implementing an OpenFlow Switch on the NetFPGA platform
Module 2: Computer-System Structures
Cache coherence CEG 4131 Computer Architecture III
VIRTIO 1.1 FOR HARDWARE Rev2.0
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Module 2: Computer-System Structures
Conceptual execution on a processor which exploits ILP
Presentation transcript:

Intro  Scratchpad rings and queues.  First – In – Firs – Out (FIFO) data structure.  Rings are fixed-sized, circular FIFO.  Queues not fixed-size FIFO.

 Rings or queues are a common concept in networking for several reasons:  The rates of the tasks producing and consuming on the ring or queue may not be identical.  Multiple producing tasks can be coupled with a single consuming task.  “Multiple processing tasks to all use a single transmit task”  Using multiple rings or queues, a single producing task can be coupled with multiple consuming tasks.  “Some packets require different processing than others”..  Different service preferences can be given to different rings or queues.  “High-priority traffic reserved for us and a second ring may represent all other, best-effort traffic”.

Scratchpad Rings  The IXP2XXX hardware supports 16 Scratchpad rings.  Implemented as an array (of configurable size) in scratchpad memory.  With pointers to the first and last entries on the ring, called the head and tail respectively.  The SHaC unit maintains the head and tail pointers, the base address, and the of the ring.  The head and tail pointers are modified during put and get commands on the ring.  Base pointer and size do not change once the ring is created.  Each ring can be configured into one of the four sizes: 128, 256, 512, or, 1024 long-words.

Put command.

Get command.

Creating a Scratchpad Ring  Size of the ring.  Starting scratchpad address where the ring data should reside.  Ring number to use (0-15)

Putting Data on a Scratchpad Ring  After creating a scratchpad ring, the code to put data onto a given scratchpad ring is a single instruction, scratch[put, ….].  Ring number  One or more transfer registers  Puts the transfer registers onto the given ring by writing into scratchpad memory.

Getting Data from a Scratchpad Ring  The code to get data from a given scratchpad ring is a single instruction, scratch[get, …].  Ring number  One or more transfer registers  Receives the given ring by reading from the scratchpad memory into the transfer registers.

Checking for Scratchpad Ring Fullness  Because rings are of fixed size, before putting data on a ring, the fullness of the ring must be checked.  The hardware provides a fullness bit that is not an exact indication of the ring being full.  This bit indicates that the ring has reached the threshold of the three quarters of the total ring capacity.

 The fullness bit is set at these thresholds because multiple microengine threads may simultaneously put data on the same ring.  Multiple threads could then check that the ring was not full and issue a putt command.

Exact fullness of a ring:  A counter can be maintained in either scratchpad or SRAM memory that corresponds to the number of long-words currently on the ring.  Any thread that performs a put operation would first automatically test and add to this counter.  After a thread performs the scratch[get, …] instruction, if the ring is not empty, the counter is automatically decremented.  The cost : one extra memory operation per put (and get) operation.

SRAM Queue Array  Scratchpad rings are not sufficient for applications requiring more than 16 FIFOs.  Scratchpad rings are not sufficient for applications requiring very large FIFOs.  For applications where scratchpad rings are not sufficient, the IXP2XXX processor’s solution is to use SRAM-base FIFOs.  The IXP2XXX hardware can support as many FIFOs as can fit within SRAM memory and provides access to these FIFOs through a 64-element cache (per SRAM controller).  Before a new FIFO can be used, its “descriptor” must be loaded into the “cache” (queue array).

Descriptor: contains all of the necessary data to work with the FIFO, such as the head and tail pointers and current number of entries in the FIFO. Each SRAM controller contains a 64-element queue array. Each queue-array element represents a FIFO.

 The total number of FIFOs supported is not limited by the size of the SRAM queue arrays, but instead by the amount of SRAM dedicated to the FIFOs.  Each queue-array element contains enough information to add or remove an entry from a single SRAM FIFO. For example, each queue array element contains:  Head pointer.  Tail pointer.  Count of the number of entries currently in the FIFO.

 If a new FIFO needs to be loaded and no used queue- array element exists, you must unload an existing queue-array element first.  The unloading process writes the queue-array element into SRAM. To load a queue descriptor, you specify SRAM controller (called a channel), queue- array element number, and SRAM memory from which the descriptor should be loaded.  To unload a queue descriptor, you specify the SRAM controller and queue-array element number. The queue descriptor is written back into the same SRAM location from where it was loaded.

 The SRAM controller implements two different types of FIFOs:  linked-list queue.  circular ring.  Scratchpad rings are especially useful following the receive task and into the transmit task.  Don’t need large FIFOs.  Each task requires only one FIFO.  SRAM FIFOs is commonly used within the packet processing stages.