The project “Leaky Bucket Algorithm” is based on computer networks.The leaky bucket algorithm is a general algorithm that can be effectively used to police real time traffic. Both Frame Relay and Aysnchronous Transfer Mode (ATM) networks use a form of the leaky bucket algorithm for traffic management.
For designing this graphical project we require the knowledge of both computer graphics and the language in which it is to be coded.The use of the language helps in designing a package more user friendly since for a general user high end languages creates complexities in understanding and usage.OpenGL provides us with all the inbuilt functions which makes us easy to understand graphics.
The document discusses algorithms and pseudocode conventions. It defines an algorithm as a step-by-step procedure to solve a problem and get the desired output. Some key characteristics of algorithms are that they must be unambiguous, have well-defined inputs and outputs, terminate after a finite number of steps, and be feasible with available resources. Pseudocode is a notation for writing algorithms in a human-friendly way without ambiguity. The document provides conventions for writing pseudocode, such as using line numbers, proper indentation, assignment operators, array indexing, and flow control statements like if/else and for/while loops. It includes an example pseudocode for insertion sort following these conventions.
This PPT is for First year engineering student,It covered all about C Programming according to Rajastha Technical University Kota.
flowchart, pseudo code, Programming Languages and Language Translators, Identifiers, Constants, Variables, Basic Data Types, Operators, Expressions, type casting, Input / Output Statement, Scope Rules and Storage classes, Preprocessor and Macro Substitution.
Windows Architecture Explained by StacksolStacksol
Now here we explained the windows architecture. The inside view of Microsoft Windows. The architecture of Windows NT, a line of operating systems produced and sold by Microsoft, is a layered design that consists of two main components, user mode and kernel mode.
This document provides an overview of operating system concepts from Chapter 2 of the textbook "Operating System Concepts – 9th Edition" by Silberschatz, Galvin and Gagne. It discusses operating system services including user interfaces, process management, I/O operations, file systems, resource management, protection and security. It also describes system calls as the programming interface to OS services, common API's, how parameters are passed to system calls, and examples of different types of system calls.
Performance analysis(Time & Space Complexity)swapnac12
The document discusses algorithms analysis and design. It covers time complexity and space complexity analysis using approaches like counting the number of basic operations like assignments, comparisons etc. and analyzing how they vary with the size of the input. Common complexities like constant, linear, quadratic and cubic are explained with examples. Frequency count method is presented to determine tight bounds of time and space complexity of algorithms.
This slides contains assymptotic notations, recurrence relation like subtitution method, iteration method, master method and recursion tree method and sorting algorithms like merge sort, quick sort, heap sort, counting sort, radix sort and bucket sort.
A non-recursive predictive parser uses an explicit stack instead of recursion to mimic leftmost derivations in a grammar. The parser has an input buffer, stack, parsing table, and output stream. It uses the parsing table to shift and reduce based on the top of the stack and next input symbol to produce a leftmost derivation if the input is in the language, otherwise reporting an error. The moves of the parser on a sample input correspond to the sentential forms in the leftmost derivation of that input string.
This document summarizes key topics in intermediate code generation discussed in Chapter 6, including:
1) Variants of syntax trees like DAGs are introduced to share common subexpressions. Three-address code is also discussed where each instruction has at most three operands.
2) Type checking and type expressions are covered, along with translating expressions and statements to three-address code. Control flow statements like if/else are also translated using techniques like backpatching.
3) Backpatching allows symbolic labels in conditional jumps to be resolved by a later pass that inserts actual addresses, avoiding an extra pass. This and other control flow translation topics are covered.
The document discusses algorithms and pseudocode conventions. It defines an algorithm as a step-by-step procedure to solve a problem and get the desired output. Some key characteristics of algorithms are that they must be unambiguous, have well-defined inputs and outputs, terminate after a finite number of steps, and be feasible with available resources. Pseudocode is a notation for writing algorithms in a human-friendly way without ambiguity. The document provides conventions for writing pseudocode, such as using line numbers, proper indentation, assignment operators, array indexing, and flow control statements like if/else and for/while loops. It includes an example pseudocode for insertion sort following these conventions.
This PPT is for First year engineering student,It covered all about C Programming according to Rajastha Technical University Kota.
flowchart, pseudo code, Programming Languages and Language Translators, Identifiers, Constants, Variables, Basic Data Types, Operators, Expressions, type casting, Input / Output Statement, Scope Rules and Storage classes, Preprocessor and Macro Substitution.
Windows Architecture Explained by StacksolStacksol
Now here we explained the windows architecture. The inside view of Microsoft Windows. The architecture of Windows NT, a line of operating systems produced and sold by Microsoft, is a layered design that consists of two main components, user mode and kernel mode.
This document provides an overview of operating system concepts from Chapter 2 of the textbook "Operating System Concepts – 9th Edition" by Silberschatz, Galvin and Gagne. It discusses operating system services including user interfaces, process management, I/O operations, file systems, resource management, protection and security. It also describes system calls as the programming interface to OS services, common API's, how parameters are passed to system calls, and examples of different types of system calls.
Performance analysis(Time & Space Complexity)swapnac12
The document discusses algorithms analysis and design. It covers time complexity and space complexity analysis using approaches like counting the number of basic operations like assignments, comparisons etc. and analyzing how they vary with the size of the input. Common complexities like constant, linear, quadratic and cubic are explained with examples. Frequency count method is presented to determine tight bounds of time and space complexity of algorithms.
This slides contains assymptotic notations, recurrence relation like subtitution method, iteration method, master method and recursion tree method and sorting algorithms like merge sort, quick sort, heap sort, counting sort, radix sort and bucket sort.
A non-recursive predictive parser uses an explicit stack instead of recursion to mimic leftmost derivations in a grammar. The parser has an input buffer, stack, parsing table, and output stream. It uses the parsing table to shift and reduce based on the top of the stack and next input symbol to produce a leftmost derivation if the input is in the language, otherwise reporting an error. The moves of the parser on a sample input correspond to the sentential forms in the leftmost derivation of that input string.
This document summarizes key topics in intermediate code generation discussed in Chapter 6, including:
1) Variants of syntax trees like DAGs are introduced to share common subexpressions. Three-address code is also discussed where each instruction has at most three operands.
2) Type checking and type expressions are covered, along with translating expressions and statements to three-address code. Control flow statements like if/else are also translated using techniques like backpatching.
3) Backpatching allows symbolic labels in conditional jumps to be resolved by a later pass that inserts actual addresses, avoiding an extra pass. This and other control flow translation topics are covered.
Decision properties of reular languagesSOMNATHMORE2
This document discusses decision properties of regular languages. It defines regular languages as those that can be described by regular expressions and accepted by finite automata. It explains that decision properties are algorithms that take a formal language description and determine properties like emptiness, finiteness, membership in the language, and equivalence to another language. The key decision properties - emptiness, finiteness, membership, and equivalence - are then defined along with the algorithms to determine each. Examples are provided to illustrate the algorithms. Applications of decision properties in areas like data validation and parsing are also mentioned.
E-MAIL, IP & WEB SECURITY
E-mail Security: Security Services for E-mail-attacks possible through E-mail – establishing keys privacy-authentication of the source-Message Integrity-Non-repudiation-Pretty Good Privacy-S/MIME. IPSecurity: Overview of IPSec – IP and IPv6-Authentication Header-Encapsulation Security Payload (ESP)-Internet Key Exchange (Phases of IKE, ISAKMP/IKE Encoding). Web Security:
Substitution cipher and Its CryptanalysisSunil Meena
Substitution Cipher
classical cipher and monoalphabetic and polyalphabetic cipher and its cryptanalysis . Correctness and security and learning analysis
Introduction, Macro Definition and Call, Macro Expansion, Nested Macro Calls, Advanced Macro Facilities, Design Of a Macro Preprocessor, Design of a Macro Assembler, Functions of a Macro Processor, Basic Tasks of a Macro Processor, Design Issues of Macro Processors, Features, Macro Processor Design Options, Two-Pass Macro Processors, One-Pass Macro Processors
Logical clocks assign sequence numbers to distributed system events to determine causality without a global clock. Lamport's algorithm uses logical clocks to impose a partial ordering on events. Vector clocks extend this to also detect concurrent events that are not causally related, providing a full happened-before relation between all events. Each process maintains a vector clock that is incremented after local events and updated when receiving messages from other processes.
Compiler Design lab manual for Computer Engineering .pdfkalpana Manudhane
Compiler Design can be divided into two parts: analysis and synthesis. The analysis part breaks up the source program into constituent pieces and imposes a grammatical structure on them. The synthesis part constructs the desired target program from the intermediate representation and the information in the symbol table. If we examine the compilation process in more detail, we see that it operates as a sequence of phases-lexical analysis, syntax & semantic analysis, intermediate code generation, code optimization & code generation, each of which transforms one representation of the source program to another.
Practical of Compiler Design Lab for Computer Science & Engineering are divided into two parts- i) implementation using programming language and ii) implementation using tools. In first part, practical can be performed in any programming language such as C language or Python. C language is always preferred. C is the middle level language combining low-level hardware controlling ability and high level programming capabilities. It is the procedural language focusing on functions and pointers.
To implement phases of compiler, various tools are available in Linux system. Lex tool is lexical analyzer generator whereas YACC tool is parser generator. Recent versions of Lex and YACC tools are Flex and Bison respectively. Recently windows version of these tools is available. Flex Windows (Lex and Yacc) contains the GNU Win 32 Ports of Flex and Bison, which are Lex and Yacc Compilers respectively, and are used for generating tokens and parsers.
This document provides an overview of algorithms and algorithm analysis. It discusses key concepts like what an algorithm is, different types of algorithms, and the algorithm design and analysis process. Some important problem types covered include sorting, searching, string processing, graph problems, combinatorial problems, geometric problems, and numerical problems. Examples of specific algorithms are given for some of these problem types, like various sorting algorithms, search algorithms, graph traversal algorithms, and algorithms for solving the closest pair and convex hull problems.
The document appears to be a student assignment submission containing programs written by Mukesh Kumar (student ID 1110751908) for their 7th semester Computer Science branch. It includes 7 programs addressing various parsing and lexical analysis tasks, along with the student's name, institution and course details. Each program is presented with its source code, output and description of what it is intended to do.
The document discusses compilers and their role in translating high-level programming languages into machine-readable code. It notes that compilers perform several key functions: lexical analysis, syntax analysis, generation of an intermediate representation, optimization of the intermediate code, and finally generation of assembly or machine code. The compiler allows programmers to write code in a high-level language that is easier for humans while still producing efficient low-level code that computers can execute.
The little Oh (o) notation is a method of expressing the an upper bound on the growth rate of an algorithm’s
running time which may or may not be asymptotically tight therefore little oh(o) is also called a loose upper
bound we use little oh (o) notations to denote upper bound that is asymptotically not tight.
Postfix notation, also known as reverse Polish notation, is a way of writing arithmetic expressions where operands are written before their operators. It works by placing the operator after the operands, making the expressions easier to parse and evaluate. An example algorithm is shown that evaluates the postfix expression 3574-2^*+ by using a stack to push and pop operands and operators, resulting in the answer 48.
The document discusses the different phases of a compiler:
1. Lexical analysis scans source code as characters and converts them into tokens.
2. Syntax analysis checks token arrangements against the grammar to ensure syntactic correctness.
3. Semantic analysis checks that rules like type compatibility are followed.
4. Intermediate code is generated for an abstract machine.
5. Code optimization removes unnecessary code and improves efficiency.
6. Code generation translates the optimized intermediate code to machine language.
This document describes Sollin's algorithm, also known as Boruvka's algorithm, for finding a minimum spanning tree (MST) of a connected, edge-weighted undirected graph. Sollin's algorithm is a greedy algorithm that works by repeatedly contracting edges of minimum weight to form subgraphs until a single vertex remains, resulting in an MST. The algorithm proceeds by first highlighting the cheapest outgoing edge for each vertex, then contracting edges to form subgraphs and repeating on each subgraph until an MST is produced. An example applying the algorithm to a graph is provided.
This document contains lecture notes for an Advanced Operating Systems class. It discusses various communication models for distributed systems, including message passing, distributed shared memory (DSM), and remote procedure call (RPC). It provides examples of DSM systems like IVY and Linda that use different approaches. It also describes how RPC works, issues like binding and semantics, and optimizations like light-weight RPC to improve performance of local calls.
Knowledge representation techniques face several issues including representing important attributes of objects, relationships between attributes, choosing the level of detail in representations, depicting sets of multiple objects, and determining appropriate structures as needed.
This program implements the K-means clustering algorithm. It takes data points and initial cluster centers as input, calculates the distances between each point and center, assigns each point to the closest center, recalculates the centers as the means of the points in each cluster, and iterates this process until convergence. The key steps are: 1) computing distances from points to centers, 2) assigning each point to the closest center, 3) recalculating centers as averages of points in each cluster.
OpenGL Based Testing Tool Architecture for Exascale ComputingCSCJournals
1) The document proposes an OpenGL based testing tool architecture for exascale computing to improve performance and accuracy of OpenGL programs.
2) It identifies common errors that occur when programming shaders in OpenGL Shading Language (GLSL) such as errors in file reading, compilation, linking, and rendering.
3) The proposed testing architecture divides the GLSL programming process into four stages - file reading, compilation, pre-linking/linking, and rendering - and validates each stage to detect errors and enforce error-free code.
Decision properties of reular languagesSOMNATHMORE2
This document discusses decision properties of regular languages. It defines regular languages as those that can be described by regular expressions and accepted by finite automata. It explains that decision properties are algorithms that take a formal language description and determine properties like emptiness, finiteness, membership in the language, and equivalence to another language. The key decision properties - emptiness, finiteness, membership, and equivalence - are then defined along with the algorithms to determine each. Examples are provided to illustrate the algorithms. Applications of decision properties in areas like data validation and parsing are also mentioned.
E-MAIL, IP & WEB SECURITY
E-mail Security: Security Services for E-mail-attacks possible through E-mail – establishing keys privacy-authentication of the source-Message Integrity-Non-repudiation-Pretty Good Privacy-S/MIME. IPSecurity: Overview of IPSec – IP and IPv6-Authentication Header-Encapsulation Security Payload (ESP)-Internet Key Exchange (Phases of IKE, ISAKMP/IKE Encoding). Web Security:
Substitution cipher and Its CryptanalysisSunil Meena
Substitution Cipher
classical cipher and monoalphabetic and polyalphabetic cipher and its cryptanalysis . Correctness and security and learning analysis
Introduction, Macro Definition and Call, Macro Expansion, Nested Macro Calls, Advanced Macro Facilities, Design Of a Macro Preprocessor, Design of a Macro Assembler, Functions of a Macro Processor, Basic Tasks of a Macro Processor, Design Issues of Macro Processors, Features, Macro Processor Design Options, Two-Pass Macro Processors, One-Pass Macro Processors
Logical clocks assign sequence numbers to distributed system events to determine causality without a global clock. Lamport's algorithm uses logical clocks to impose a partial ordering on events. Vector clocks extend this to also detect concurrent events that are not causally related, providing a full happened-before relation between all events. Each process maintains a vector clock that is incremented after local events and updated when receiving messages from other processes.
Compiler Design lab manual for Computer Engineering .pdfkalpana Manudhane
Compiler Design can be divided into two parts: analysis and synthesis. The analysis part breaks up the source program into constituent pieces and imposes a grammatical structure on them. The synthesis part constructs the desired target program from the intermediate representation and the information in the symbol table. If we examine the compilation process in more detail, we see that it operates as a sequence of phases-lexical analysis, syntax & semantic analysis, intermediate code generation, code optimization & code generation, each of which transforms one representation of the source program to another.
Practical of Compiler Design Lab for Computer Science & Engineering are divided into two parts- i) implementation using programming language and ii) implementation using tools. In first part, practical can be performed in any programming language such as C language or Python. C language is always preferred. C is the middle level language combining low-level hardware controlling ability and high level programming capabilities. It is the procedural language focusing on functions and pointers.
To implement phases of compiler, various tools are available in Linux system. Lex tool is lexical analyzer generator whereas YACC tool is parser generator. Recent versions of Lex and YACC tools are Flex and Bison respectively. Recently windows version of these tools is available. Flex Windows (Lex and Yacc) contains the GNU Win 32 Ports of Flex and Bison, which are Lex and Yacc Compilers respectively, and are used for generating tokens and parsers.
This document provides an overview of algorithms and algorithm analysis. It discusses key concepts like what an algorithm is, different types of algorithms, and the algorithm design and analysis process. Some important problem types covered include sorting, searching, string processing, graph problems, combinatorial problems, geometric problems, and numerical problems. Examples of specific algorithms are given for some of these problem types, like various sorting algorithms, search algorithms, graph traversal algorithms, and algorithms for solving the closest pair and convex hull problems.
The document appears to be a student assignment submission containing programs written by Mukesh Kumar (student ID 1110751908) for their 7th semester Computer Science branch. It includes 7 programs addressing various parsing and lexical analysis tasks, along with the student's name, institution and course details. Each program is presented with its source code, output and description of what it is intended to do.
The document discusses compilers and their role in translating high-level programming languages into machine-readable code. It notes that compilers perform several key functions: lexical analysis, syntax analysis, generation of an intermediate representation, optimization of the intermediate code, and finally generation of assembly or machine code. The compiler allows programmers to write code in a high-level language that is easier for humans while still producing efficient low-level code that computers can execute.
The little Oh (o) notation is a method of expressing the an upper bound on the growth rate of an algorithm’s
running time which may or may not be asymptotically tight therefore little oh(o) is also called a loose upper
bound we use little oh (o) notations to denote upper bound that is asymptotically not tight.
Postfix notation, also known as reverse Polish notation, is a way of writing arithmetic expressions where operands are written before their operators. It works by placing the operator after the operands, making the expressions easier to parse and evaluate. An example algorithm is shown that evaluates the postfix expression 3574-2^*+ by using a stack to push and pop operands and operators, resulting in the answer 48.
The document discusses the different phases of a compiler:
1. Lexical analysis scans source code as characters and converts them into tokens.
2. Syntax analysis checks token arrangements against the grammar to ensure syntactic correctness.
3. Semantic analysis checks that rules like type compatibility are followed.
4. Intermediate code is generated for an abstract machine.
5. Code optimization removes unnecessary code and improves efficiency.
6. Code generation translates the optimized intermediate code to machine language.
This document describes Sollin's algorithm, also known as Boruvka's algorithm, for finding a minimum spanning tree (MST) of a connected, edge-weighted undirected graph. Sollin's algorithm is a greedy algorithm that works by repeatedly contracting edges of minimum weight to form subgraphs until a single vertex remains, resulting in an MST. The algorithm proceeds by first highlighting the cheapest outgoing edge for each vertex, then contracting edges to form subgraphs and repeating on each subgraph until an MST is produced. An example applying the algorithm to a graph is provided.
This document contains lecture notes for an Advanced Operating Systems class. It discusses various communication models for distributed systems, including message passing, distributed shared memory (DSM), and remote procedure call (RPC). It provides examples of DSM systems like IVY and Linda that use different approaches. It also describes how RPC works, issues like binding and semantics, and optimizations like light-weight RPC to improve performance of local calls.
Knowledge representation techniques face several issues including representing important attributes of objects, relationships between attributes, choosing the level of detail in representations, depicting sets of multiple objects, and determining appropriate structures as needed.
This program implements the K-means clustering algorithm. It takes data points and initial cluster centers as input, calculates the distances between each point and center, assigns each point to the closest center, recalculates the centers as the means of the points in each cluster, and iterates this process until convergence. The key steps are: 1) computing distances from points to centers, 2) assigning each point to the closest center, 3) recalculating centers as averages of points in each cluster.
OpenGL Based Testing Tool Architecture for Exascale ComputingCSCJournals
1) The document proposes an OpenGL based testing tool architecture for exascale computing to improve performance and accuracy of OpenGL programs.
2) It identifies common errors that occur when programming shaders in OpenGL Shading Language (GLSL) such as errors in file reading, compilation, linking, and rendering.
3) The proposed testing architecture divides the GLSL programming process into four stages - file reading, compilation, pre-linking/linking, and rendering - and validates each stage to detect errors and enforce error-free code.
This document contains information about an introductory computer graphics practical workbook. It includes contents, lists of figures and tables, and outlines for two practical sessions - the first on becoming familiar with OpenGL and compiling a first program, and the second on drawing basic primitive objects using OpenGL. The practical sessions provide instructions on installing and using OpenGL libraries, understanding header files and program structure, and writing simple OpenGL programs to create windows and draw basic shapes.
1. The document is a lab manual for a computer graphics and visualization course that provides instructions and programs for students to implement.
2. It includes an introduction to OpenGL that describes it as a software interface for graphics hardware consisting of 150 commands. It also discusses OpenGL's state machine functionality and related libraries like GLUT and GLU.
3. The lab manual then provides 9 programs for students to complete related to topics like line drawing algorithms, 3D modeling, and animations. It concludes with questions for a viva exam.
The document discusses visualization systems and proposes concepts for their future development. It summarizes:
1) The "Visual Realityware" visualization software development environment, which uses an abstraction layer to allow developers to freely select mainstream graphics technologies and expand applications across multiple platforms with minimal bugs.
2) An application called "Virtual Anatomia" developed using Visual Realityware to visualize 3D biological data in real-time.
3) The concept of "Visionize" which is defined as a risk management methodology using visual communication to allow sharing of goals and visions in order to identify and prevent risks before issues arise.
Takes the reader through the various components of windowing systems, and how to develop and benchmark various Graphics applications using OpenGL and other toolsets. Also includes a Cheatsheet that covers various terminologies used in the Graphics world.
This document provides an introduction to modern OpenGL programming. It summarizes that OpenGL is a library for 3D computer graphics that renders geometric objects and images. It discusses that modern OpenGL applications are shader-based, concentrating on OpenGL 4.1. It outlines the main components of the OpenGL graphics pipeline including vertex and fragment shaders. It also summarizes the key steps for rendering objects in OpenGL.
Data structures are used to organize graphics data and allow individual portions of an image to be referenced and modified independently. Common data structures include those based on vertices, edges, and surfaces. A database implements these data structures for storage. Relational and hierarchical models are two common database models. OpenGL is a widely used graphics library that provides a standardized interface for 3D graphics across platforms through functions that output graphics primitives.
openGL basics for sample program (1).pptHIMANKMISHRA2
The document outlines the course learning objectives and outcomes for a Computer Graphics & Visualization laboratory course using OpenGL. The course aims to teach simple algorithms and implementation of line drawing, clipping, and 2D/3D modeling and rendering using OpenGL functions. Students will complete programming assignments to demonstrate techniques like Bézier curves, polygon filling, and develop a mini-project using OpenGL APIs.
The document outlines the course learning objectives and outcomes for a Computer Graphics & Visualization laboratory course using OpenGL. The course aims to teach simple algorithms and implementation of line drawing, clipping, and 2D/3D modeling and rendering using OpenGL functions. Students will complete programming assignments to demonstrate techniques like Bézier curves, polygon filling, and develop a mini-project using OpenGL APIs.
This presentation made at TI Developer Conference 2008, introduces the options available for developers to create User Interfaces on TI SGX based platforms.
Ball Collecting Game is an OpenGL based 2D game. It consists of a player in an
environment where Coins (coloured circles) are falling from sky. If the player collides with
any of the Coins then Score of player increased by 1. The player’s score is the no. of Coins
collected by him/her.
OpenGL is a standard graphics library used to render 2D and 3D graphics. It provides basic drawing primitives like points, lines, and polygons. OpenGL follows a graphics pipeline where commands are processed through various stages including transformations, rasterization, and finally writing to the framebuffer. Programmers use OpenGL by issuing commands to specify geometry and settings, which are then rendered to the screen independent of hardware.
This document provides an introduction to computer graphics. It defines computer graphics as using a computer to produce and manipulate images on a screen by creating and manipulating models and images. It discusses modeling, rendering, imaging, animation, and hardware aspects of computer graphics. It provides examples of applications such as entertainment, design, scientific visualization, and more. It introduces the OpenGL graphics library and GLUT toolkit for window management in OpenGL programs. It provides conventions for OpenGL and GLUT functions and constants. Finally, it provides two short code examples of simple OpenGL programs to draw shapes and animate a rotating cube.
This document discusses the objectives and content of a course on smart manufacturing. The course aims to teach students about computer-aided design, manufacturing, and additive manufacturing processes. It covers topics like CAD standards, including graphics standards like Graphical Kernel System (GKS) and data exchange standards like IGES and STEP. The syllabus outlines units on CAD standards that will discuss topics such as graphics languages, data exchange formats, and communication standards.
Polyline download and visualization over terrain modelsgraphitech
This document presents a final project for a computer graphics course that involves developing a terrain viewer application with a client-server architecture. The terrain viewer allows downloading and visualizing polyline data over 3D terrain models. Key features include optimizations like geomipmapping, frustum culling using a quadtree data structure, and an algorithm to correct polyline points over the terrain. The project implements various design patterns and data structures to optimize performance and synchronize concurrent data access between client and server programs.
This document provides an overview and introduction to programming graphics in C++ using the G3D library for a course at Williams College. It discusses key differences between C++ and Java, how to compile and debug C++ programs, C++ concepts like inheritance, and how G3D handles memory management to avoid manually allocating and freeing memory. The document is intended as a starting guide for programmers familiar with Java but new to C++ and 3D graphics.
The document provides an introduction to OpenGL programming. It discusses that OpenGL is a hardware-independent API for 3D graphics. It originated from SGI's GL library and was developed as the cross-platform OpenGL standard. The document outlines OpenGL's core functionality and architecture, as well as common libraries like GLUT and GLU. It provides examples of basic OpenGL programs and concepts like the rendering pipeline, coordinate systems, and event handling.
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...ICS
Watch the video here: http://bit.ly/1TA24fU
OpenGL Fixed Function to Shaders - Porting a fixed function application to “modern” OpenGL - Webinar Mar 2016
The document outlines the agenda for an Advanced Graphics Workshop being held by Texas Instruments. The workshop will include an introduction to graphics hardware architectures and the OpenGL rendering pipeline. It will provide a detailed walkthrough of the OpenGL ES 2.0 specification and APIs. Participants will work through several hands-on labs covering texturing, transformations, shaders and more. The goal is to help developers optimize graphics performance on embedded platforms.
Similar to Mini Project final report on " LEAKY BUCKET ALGORITHM " (20)
Second phase report on "ANALYZING THE EFFECTIVENESS OF THE ADVANCED ENCRYPTIO...Nikhil Jain
To implement and improve the performance of Advanced Encryption Standard algorithm by using multicore systems and Open MP API extracting as much parallelism as possible from the algorithm in parallel implementation approach.
Second phase slide presentation on "ANALYZING THE EFFECTIVENESS OF THE ADVANC...Nikhil Jain
To implement and improve the performance of Advanced Encryption Standard algorithm by using multicore systems and OpenMP API extracting as much parallelism as possible from the algorithm in parallel implementation approach
First phase slide presentation on "ANALYZING THE EFFECTIVENESS OF THE ADVANCE...Nikhil Jain
This document outlines a project that aims to improve the performance of the Advanced Encryption Standard (AES) algorithm by implementing it using multicore processors and OpenMP parallel programming. It discusses limitations of existing single-core AES implementations including long execution times for large data files. The proposed methodology is to assign blocks of an input file to different processor cores for parallel encryption/decryption. Hardware requirements of a multicore processor, RAM, and software including JDK and Eclipse are listed. A literature review covers past work on parallelizing AES using strategies like divide-and-conquer and extending block sizes. The expected result is reduced execution time for AES when implemented in a multicore versus single-core system.
First phase report on "ANALYZING THE EFFECTIVENESS OF THE ADVANCED ENCRYPTION...Nikhil Jain
The document analyzes improving the performance of the Advanced Encryption Standard (AES) algorithm using parallel computing on multicore processors. It aims to implement AES using OpenMP to extract parallelism and reduce encryption/decryption times. The methodology divides input data blocks among processor cores to perform encryption/decryption simultaneously. Literature on previous AES parallel implementations is reviewed, highlighting advantages of using OpenMP on multicore CPUs over single-core and GPU approaches. Faster encryption/decryption times are expected compared to sequential processing.
Synopsis on "ANALYZING THE EFFECTIVENESS OF THE ADVANCED ENCRYPTION STANDARD ...Nikhil Jain
To implement and improve the performance of Advanced Encryption Standard algorithm by using multicore systems and OpenMP API extracting as much parallelism as possible from the algorithm in parallel implementation approach.
Daknet report full (prepared by me for my seminar in my college)Nikhil Jain
DakNet is an ad hoc network which uses wireless technology to provide digital connectivity.
DakNet takes advantages of the existing transportation and communication infrastructure to provide digital connectivity. DakNet offers a cost-effective network for data connectivity in regions lacking communications infrastructure. Instead of trying to relay data over long distances, which can be expensive, DakNet transmits data over short point-to-point links between kiosks and portable storage devices called Mobile Access Points (MAP). DakNet takes advantages of the existing transportation and communication infrastructure to provide digital connectivity.
Daknet Abstract ( prepared by me for seminar in my college )Nikhil Jain
DakNet is an ad hoc network which uses wireless technology to provide digital connectivity.
A simple store-and-forward WiFi system, using a government bus as a central linkage. The bus contains a simple WiFi installation and server, and when in range of one of the outlying information kiosks it synchronizes data for later processing. Mounted and powered on a bus or motorcycle with a small generator MAP physically transports data between public kiosks and private communications devices and between kiosks and a hub (for non real time internet access). Low cost Wi-Fi radio transceivers transfer data stored in MAP at high bandwidth for each point-to-point connection.
Daknet ppt ( prepared by me for seminar in my college )Nikhil Jain
DakNet is an ad hoc network which uses wireless technology to provide digital connectivity.
DakNet takes advantages of the existing transportation and communication infrastructure to provide digital connectivity. DakNet offers a cost-effective network for data connectivity in regions lacking communications infrastructure. Instead of trying to relay data over long distances, which can be expensive, DakNet transmits data over short point-to-point links between kiosks and portable storage devices called Mobile Access Points (MAP). DakNet takes advantages of the existing transportation and communication infrastructure to provide digital connectivity.
A simple store-and-forward WiFi system, using a government bus as a central linkage. The bus contains a simple WiFi installation and server, and when in range of one of the outlying information kiosks it synchronizes data for later processing. Mounted and powered on a bus or motorcycle with a small generator MAP physically transports data between public kiosks and private communications devices and between kiosks and a hub (for non real time internet access). Low cost Wi-Fi radio transceivers transfer data stored in MAP at high bandwidth for each point-to-point connection.
Nikhil Jain is seeking an entry-level position in a competitive and challenging environment where he can explore his knowledge and have opportunities for growth. He has a Bachelor's degree in Computer Science from Bahubali College of Engineering with an aggregate of 74.10%. He has knowledge of programming languages like C, C++, Java, and .NET and web technologies such as HTML, JavaScript, PHP, and PERL. He has experience with various operating systems and applications. Nikhil has participated in several national-level technical and cultural events and competitions during his college education. He is a quick learner, hard worker, and enjoys table tennis, badminton, and other sports in his free time.
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTjpsjournal1
The rivalry between prominent international actors for dominance over Central Asia's hydrocarbon
reserves and the ancient silk trade route, along with China's diplomatic endeavours in the area, has been
referred to as the "New Great Game." This research centres on the power struggle, considering
geopolitical, geostrategic, and geoeconomic variables. Topics including trade, political hegemony, oil
politics, and conventional and nontraditional security are all explored and explained by the researcher.
Using Mackinder's Heartland, Spykman Rimland, and Hegemonic Stability theories, examines China's role
in Central Asia. This study adheres to the empirical epistemological method and has taken care of
objectivity. This study analyze primary and secondary research documents critically to elaborate role of
china’s geo economic outreach in central Asian countries and its future prospect. China is thriving in trade,
pipeline politics, and winning states, according to this study, thanks to important instruments like the
Shanghai Cooperation Organisation and the Belt and Road Economic Initiative. According to this study,
China is seeing significant success in commerce, pipeline politics, and gaining influence on other
governments. This success may be attributed to the effective utilisation of key tools such as the Shanghai
Cooperation Organisation and the Belt and Road Economic Initiative.
Advanced control scheme of doubly fed induction generator for wind turbine us...IJECEIAES
This paper describes a speed control device for generating electrical energy on an electricity network based on the doubly fed induction generator (DFIG) used for wind power conversion systems. At first, a double-fed induction generator model was constructed. A control law is formulated to govern the flow of energy between the stator of a DFIG and the energy network using three types of controllers: proportional integral (PI), sliding mode controller (SMC) and second order sliding mode controller (SOSMC). Their different results in terms of power reference tracking, reaction to unexpected speed fluctuations, sensitivity to perturbations, and resilience against machine parameter alterations are compared. MATLAB/Simulink was used to conduct the simulations for the preceding study. Multiple simulations have shown very satisfying results, and the investigations demonstrate the efficacy and power-enhancing capabilities of the suggested control system.
Software Engineering and Project Management - Introduction, Modeling Concepts...Prakhyath Rai
Introduction, Modeling Concepts and Class Modeling: What is Object orientation? What is OO development? OO Themes; Evidence for usefulness of OO development; OO modeling history. Modeling
as Design technique: Modeling, abstraction, The Three models. Class Modeling: Object and Class Concept, Link and associations concepts, Generalization and Inheritance, A sample class model, Navigation of class models, and UML diagrams
Building the Analysis Models: Requirement Analysis, Analysis Model Approaches, Data modeling Concepts, Object Oriented Analysis, Scenario-Based Modeling, Flow-Oriented Modeling, class Based Modeling, Creating a Behavioral Model.
International Conference on NLP, Artificial Intelligence, Machine Learning an...gerogepatton
International Conference on NLP, Artificial Intelligence, Machine Learning and Applications (NLAIM 2024) offers a premier global platform for exchanging insights and findings in the theory, methodology, and applications of NLP, Artificial Intelligence, Machine Learning, and their applications. The conference seeks substantial contributions across all key domains of NLP, Artificial Intelligence, Machine Learning, and their practical applications, aiming to foster both theoretical advancements and real-world implementations. With a focus on facilitating collaboration between researchers and practitioners from academia and industry, the conference serves as a nexus for sharing the latest developments in the field.
Null Bangalore | Pentesters Approach to AWS IAMDivyanshu
#Abstract:
- Learn more about the real-world methods for auditing AWS IAM (Identity and Access Management) as a pentester. So let us proceed with a brief discussion of IAM as well as some typical misconfigurations and their potential exploits in order to reinforce the understanding of IAM security best practices.
- Gain actionable insights into AWS IAM policies and roles, using hands on approach.
#Prerequisites:
- Basic understanding of AWS services and architecture
- Familiarity with cloud security concepts
- Experience using the AWS Management Console or AWS CLI.
- For hands on lab create account on [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
# Scenario Covered:
- Basics of IAM in AWS
- Implementing IAM Policies with Least Privilege to Manage S3 Bucket
- Objective: Create an S3 bucket with least privilege IAM policy and validate access.
- Steps:
- Create S3 bucket.
- Attach least privilege policy to IAM user.
- Validate access.
- Exploiting IAM PassRole Misconfiguration
-Allows a user to pass a specific IAM role to an AWS service (ec2), typically used for service access delegation. Then exploit PassRole Misconfiguration granting unauthorized access to sensitive resources.
- Objective: Demonstrate how a PassRole misconfiguration can grant unauthorized access.
- Steps:
- Allow user to pass IAM role to EC2.
- Exploit misconfiguration for unauthorized access.
- Access sensitive resources.
- Exploiting IAM AssumeRole Misconfiguration with Overly Permissive Role
- An overly permissive IAM role configuration can lead to privilege escalation by creating a role with administrative privileges and allow a user to assume this role.
- Objective: Show how overly permissive IAM roles can lead to privilege escalation.
- Steps:
- Create role with administrative privileges.
- Allow user to assume the role.
- Perform administrative actions.
- Differentiation between PassRole vs AssumeRole
Try at [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
Mini Project final report on " LEAKY BUCKET ALGORITHM "
1. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 1 -
CHAPTER 1
INTRODUCTION
1.1 Overview of Computer Graphics
Computer Graphics (CG) become a powerful tool for the rapid and economical
production of pictures. There is virtually no area in which Graphical displays cannot be used
to some advantage so it is not surprising to find the use of CG so widespread.
Although early application in engineering & science had to rely on expensive &
cumbersome equipment’s, advances in computer technology have made interactive computer
graphics a practical tool. Today Computer Graphics is found in diverse area such as science,
engineering, medicine, business, industry, government, art, entertainment, education and
training
1.2 History
William fetter was credited with coining the term Computer Graphics in 1960, to
describe his work at Boeing. One of the first displays of computer animation was future
world (1976), which included an animation of a human face and hand-produced by Carmull
and Fred Parkle at the University of Utah.
There are several international conferences and journals where the most
significant results in computer-graphics are published. Among them are the SIGGRAPH
and Euro graphics conferences and the association for computing machinery (ACM)
transaction on Graphics journals.
1.3 Applications of computer graphics
Nowadays Computer Graphics used in almost all the areas ranges from
science, engineering, medicine, business, industry, government, art, entertainment, education
and training.
1.3.1 CG in the field of CAD
Computer Aided Design methods are routinely used in the design of buildings,
automobiles, aircraft, watercraft, spacecraft computers, textiles and many other applications.
2. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 2 -
1.3.2 CG in presentation Graphics
Graphics used to produce illustrations for reports or generate slides. Presentation
graphics is commonly used to summarize financial, statistical, mathematical, scientific data
for research reports and other types of reports.2D and 3D bar chart to illustrate some
mathematical or statistical report.
1.3.3 CG in computer Art
CG methods are widely used in both fine art and commercial art applications.
Artists use a variety of computer methods including special purpose hardware, artist’s
paintbrush program, other pain packages, desktop packages, mathematical packages,
animation packages that provide facility for designing object motion. Ex: cartoons decision is
an example of computer art which uses CG.
1.3.4 Entertainment
Computer graphics methods are now commonly used in making motion pictures,
music, videos, games and sounds. Sometimes graphics objects are combined with the actors
and live scenes.
1.3.5 Education and Training
Computer generated models of physical financial, economic system is often used
as education aids. For some training application special systems are designed.
Ex: Specialized system is simulator for practice sessions or training of ship captain, aircraft
pilots and traffic control.
1.3.6 Image Processing
Although the methods used in CG image processing overlap, the 2 areas are
concerned with fundamentally different operations. In CG a computer is used to create
picture. Image processing on the other hand applies techniques to modify existing pictures
such as photo scans, TV scans.
1.3.7 User Interface
It is common for software packages to provide a graphical interface. A major
component of a graphical interface is a window manager that allows a user to display
multiple window area. Interface also displays menus, icons for fast selection and processing.
3. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 3 -
1.4 Problem Statement
To implement the Traffic shaping by “Leaky bucket Algorithm” using OpenGL
functions different shapes and movement for objects like polygon. Here user has to insert
capacity of the bucket and transmission rate for which the outcome will be regulated packets.
1.5 Objective of the project
The main objective of this project is to graphically illustrate the concept of traffic
shaping ‘LEAKY BUCKET ALGORITHM’ using OpenGL. The implementation can be
made more effective using OpenGL in C++ basis following obstacles
To determine time of transmission with limit of bandwidth and burstiness.
To implement the concept of queue in packet flow.
To convert turbulent incoming packets into smooth, regular stream of packets.
1.6 Organizationof the Report
Chapter 1 introduces the computer graphics and its applications. Chapter 2
discusses basic concepts and principles involved in OpenGL. Chapter 3 deals with the basic
concepts ant working principles. Chapter 4 deals with design and implementation, results and
snapshots. Chapter 5 concludes the project and at the end the references used for the project
are listed.
4. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 4 -
CHAPTER 2
INTRODUCTION TO OPENGL
OpenGL is a software interface to graphics hardware. This interface consists of about
150 distinct commands that you use to specify the objects and operations needed to produce
interactive three-dimensional applications. OpenGL is designed as a streamlined, hardware-
independent interface to be implemented on many different hardware platforms.
Most of the application will be designed to access OpenGL directly through functions
in three libraries. Functions in the main GL (or OpenGL in windows) library have names that
begin with the letters gl and are stored in a library usually referred to as GL (or OpenGL in
windows). The second is the OpenGL Utility Library (GLU). This library uses only GL
functions but contains code for creating common objects and simplifying viewing. All
functions in GLU can be created from the core GL library but application programmers
prefer not to write the code repeatedly. The GLU library is available in all OpenGL
implementations; functions in the GLU library begin with letters glu.
To interface with the window system and to get input from external devices into our
programs, at least one more system-specific library. For each major window system there is a
system-specific library that provides the “glue” between the window system and OpenGL.
For the X window system, this library is called GLX, for Windows, it is wgl, and for the
Macintosh, it is agl. Rather than using a different library for each system, The use of readily
available library called the OpenGL Utility Toolkit (GLUT), which provides the minimum
functionality that should be expected in any modern windowing system.
Fig 2.1 shows the organization of the libraries for an X Window System environment.
For this window system, GLUT will use GLX and the X libraries. The application program,
however, can use only GLUT functions and thus can be recompiled with the GLUT library
for other window systems.
2.1 OpenGL Command Syntax
OpenGL commands use the prefix gl and initial capital letters for each word
making up the command name. Similarly, OpenGL defined constant begin with GL_, use all
capital letters, and use underscores to separate words (like GL_COLOR_BUFFER_BIT).
5. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 5 -
Fig 2.1 Library organization
Some extraneous letters are appended to some command name (for example, the 3f
in glColor3f( ) and glVertex3f( )). It’s true that the Color part of the command name
glColor3f( ) is enough to define the command as one that sets the current color. However,
more than one such command has been defined so as to use different types of arguments. In
particular, the 3 part of the suffix indicates that three arguments are given; another version of
the Color command takes four arguments. The f part of the suffix indicates that the
arguments are floating point numbers. Having different formats allows OpenGL to accept the
user’s data.
Some OpenGL commands accept as many as 8 different data types for their
arguments.
2.1.1 Pixel Operation
Pixels from an array in system memory are first unpacked from one of a variety of
formats into the proper number of components. Next the data is scaled, biased, and processed
by a pixel map. The results are clamped and then either written into texture memory or sent
to the rasterization step. If the pixel data is read from the frame buffer, pixel transfer
operations (scale, bias, mapping, and clamping) are performed.
Then these results are packed into an appropriate format and returned to an
array in system memory. There are special pixel copy operations to copy data in the frame
buffer to other parts of the frame buffer or to the texture memory. A single pass is made
OpenGL
application
Program
GLU
GL
GLUT
GLX
Xlib, Xtk
Frame
Buffer
6. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 6 -
through the pixel transfer operations before the data is written to the texture memory or back
to the frame buffer.
2.2 OpenGL as a State Machine
OpenGL is a state machine. It is put into various states (or modes) that then remain
in effect until it is changed. The current color is state variable. The current color can be set to
white, red or any other color, and thereafter every object is drawn with that color until current
color is set to something else.
Many state variables refer to modes that are enabled or disabled with the
command glEnable( ) and glDisable( ).Each state variable or mode has a default value, and
at any point the system can be queried for each variable’s current value. Typically one of the
following six commands can be used to do this: glGetBooleanv(), glDoublev(),
glGetFloatv(), glGetIntegerv(), glGetPointerv(), or glEnabled().
2.3 Display Lists
All data, whether it describes geometry or pixel, can be saved in a display lists for
current or latter use. When a display list is executed, the retained data is sent from the display
list just as if it were sent by the application in immediate mode.
2.4 Evaluators
All geometric primitives are eventually described by vertices. Parametric curves
and surfaces may be initially described by control points and polynomial functions called
basis functions. Evaluators provide a method to derive the vertices used to represent the
surface from the control points. The method is a polynomial mapping, which can produce
surface normal, texture coordinates, colors, and spatial coordinate values from the control
points.
2.5 Primitive Assembly
Clipping, a major part of primitive assembly, is the elimination of portions of
geometry which fall outside a half-space, defined by a plane. Point clipping simply passes or
rejects vertices; line or polygon clipping can add additional vertices depending upon how the
7. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 7 -
line or polygon is clipped. In some cases, this is followed by perspective division, which
makes distant geometric objects appear smaller than closer objects.
Then viewport and depth (z coordinate) operations are applied. Is culling is enabled and the
primitive is a polygon, it then may be rejected by a culling test. Depending upon the polygon
mode, a polygon may be drawn as points or lines.
2.6 Pixel Operations
Pixels from an array in system memory are first unpacked from one of a variety of
formats into the proper number of components. Next the data is scaled, biased, and processed
by a pixel map. The results are clamped and then either written into texture memory or sent
to the rasterization step.
If the pixel data is read from the frame buffer, pixel transfer operations (scale, bias,
mapping, and clamping) are performed. Then these results are packed into an appropriate
format and returned to an array in system memory. There are special pixel copy operations to
copy data in the frame buffer to other parts of the frame buffer or to the texture memory. A
single pass is made through the pixel transfer operations before the data is written to the
texture memory or back to the frame buffer.
2.7 Texture Assembly
An OpenGL application may wish to apply texture images onto geometric objects
to make them look more realistic. Some OpenGL implementations may have special
resources to accelerate texture performance. There may be specialized, high-performance
texture memory.
2.8 Rasterization
Rasterization is the conversion of both geometric and pixel data into
fragments. Each fragment square corresponds to a pixel in the frame buffer. Line and
polygon stipples, line width, point size, shading model, and coverage calculations to support
antialiasing are taken into consideration as vertices are connected into lines or interior pixels
are calculated for a filled polygon. Color and depth values are assigned for each fragment
square.
8. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 8 -
2.9 Fragment Operations
Before values are actually stored into frame buffer, a series of operations are
performed that may alter or even throw out fragments. All these operations can be enabled or
disabled. The operation which may be encountered texturing, where a texel (texture element)
is generated from texture memory for each fragment and applied to the fragment. Then fog
calculations may be applied, followed by scissor test, the alpha test, the stencil test, and the
depth-buffer test.
2.10 Needof OpenGL
The intension of this chapter is to give you basic concepts in OpenGL. OpenGL is
a device and operating system independent library for 3D-graphics and rendering. OpenGL
was originally developed b Silicon Graphics Inc (SGI) for use on their high end graphics
workstations. Since then, OpenGL has become a widely accepted standard with
implementations on many operating system and hardware platforms including Windows NT
and Windows X operating systems.
The purpose of OpenGL library is to render two or three-dimensional objects into
frame buffer. OpenGL is a library of high-quality three-dimensional graphics and rendering
functions. The library’s device- and platform- independence make it a library of choice for
developing portable graphical applications.
OpenGL drawings are constructed from primitives; primitives are simple items such
as lines or polygons, which in turn are composed of vertices. The OpenGL library assembles
primitives from vertices while taking into account a variety of settings, such as color,
lighting, and texture. Primitives are then processed in accordance with transformations,
clipping settings, and other parameters; at the end of the rasterization process is pixel data
deposited into a frame buffer.
Because of high visual quality and performance any visual computing
application requiring maximum performance-from 3D animation to CAD to visual
simulation-can exploit high-quality, high-performance OpenGL capabilities. These
capabilities allow developers in diverse markets such as broadcasting, CAD/CAM/CAE,
entertainment, medical imaging, and virtual reality to produce and display incredibly
compelling 2D and 3D graphics.
9. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 9 -
2.11 Advantage of Using OpenGL
Stable: OpenGL implementations have been available for more than seven years on a
wide variety of platforms. Additions to the specification are well controlled, and proposed
updates are announced in time for developers to adopt changes. Backward compatibility
requirement ensure that existing applications do not become obsolete.
Reliable and Portable: all OpenGL applications produce consistent visual display
results on any OpenGL API-compliant hardware, regardless of operating system or
windowing system.
Evolving: Because of its thorough and forward-looking design, OpenGL allows new
hardware innovations to be accessible through API via the OpenGL extension mechanism.
10. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 10 -
CHAPTER 3
BASIC CONCEPTS AND RULES
3.1 Traffic Access Control
A collection of specification techniques and mechanisms to:
specify the expected traffic characteristics and service requirements (e.g. peak rate,
required delay bound, loss tolerance) of a data stream
shape data streams (e.g. reducing their rates and/or Traffic Burstiness) at the edges
and selected points within the network
police data streams and take corrective actions (e.g. discard, delay, or mark packets)
when traffic deviates from its specification
real-time queuing and scheduling mechanisms require some control of the rate and
burstiness of data moving through the system.
3.2 Traffic Access Control Functions
Flow specification function
Provides the common language by which applications and network elements communicate
service requirements.
a) Shaping function
b) Policing function
Monitors traffic flows and takes corrective actions when the observed characteristics deviate
from those specified.
The location of policing functions (e.g. at the network edge and at stream merge points) are
usually determined by the network providers.
3.3 Goal
limit traffic to not exceed declared parameters.
The result of traffic shaping is a smoothed packet output rate.
3.4 Traffic Shaping Algorithms
1. Leaky Bucket
2.Token Bucket
11. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 11 -
3.4.1 LeakyBucket
The Leaky bucket is an algorithm converts any turbulent incoming traffic into
smooth, regular stream of packets. It can be used to check the data communications in the
form of packets. The Leaky Bucket algorithm is based on the analogy of bucket has a hole
in the bottom through which any water it contains will leak away at a constant rate, until it is
empty.
Fig3.1
(a)A leaky bucket with water. (b)A leaky bucket with packets
Water can be added intermittently, but if too much is added at once then water will
exceed the capacity of bucket, which will overflow.Hence, this leaky bucket determines
whether adding some amount of water would exceed or conform to limit on average rate at
which water can be added, set by leak rate and limit on how much water can be added in a
burst, set by the depth of bucket.
12. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 12 -
Two different methods of applying this leaky bucket are counter and queue. It can
use queue in flow of traffic. Queue is used to directly control the flow. When the packets
are entered into the queue as they arrive, the packets are removed from the queue, at a fixed
rate. As a result, rate at which queue is serviced directly controls the transmission rate of
traffic. This can be used in packet switched computer networks and telecommunication
networks.
Fig 3.2:Packet dropping out in overflow
A leaky bucket interface is connected between packet transmitter and the network. No
matter at what rate packet enter the traffic shaper, Outflow is regulated at a constant rate.
At first the display asks us to enter
1. Capacity of the bucket.
2. Capacity of the transmission line.
After entering all the above parameters now on pressing ‘s’ in the keyboard the packets
arrives in the mean time, the count increases. If the count exceeds the capacity of the bucket
the packets overflows, otherwise continues with the flow.
13. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 13 -
CHAPTER 4
DESIGN AND IMPLEMENTATION
4.1 Design
It specifies how the packets flow when the required condition satisfies. Here the
packet will move in constant rate When the capacity of the bucket becomes full the packet
will overflow.
Yes
No
Yes
No
X=value of leaky bucket counter
X’=auxiliary variable
LCT=last conformance time
Fig 4.1 Flow Diagram
Arrival of a packet
at a time ta
X’=X-(ta-LCT)
X’<0
?
X’=0
X’>L?
X=X’+I
LCT=ta
Conforming packet
Nonconforming
packets
14. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 14 -
4.2 IMPLEMENTATION
glutInit
Syntax: glutInit( int *argc, char ** argv);
Purpose: Initializes GLUT. The arguments from main are passed
In and can be used by the application.
glVertex
Syntax: a)glVertex[234][sifd]( TYPE xcoordinate, TYPE ycoordinate, …);
b) glVertex[234][sifd]v(TYPE *coordinate);
Purpose: Specifies the position of a vertex in 2,3,or 4 dimensions. The coordinates can
be specified as short s, int i, float f or double d. If the v is present, the argument is a
pointer to an array containing the coordinates.
glutCreateWindow
Syntax: glutCreateWindow(char * title);
Purpose: It creates a window on the display. The string title can be used to label the
window.
glutInitDisplayMode
Syntax: glutInitDisplayMode( unsigned int mode);
Purpose: It requests a display with the properties in mode. The value of mode is
determined by the logical OR of options including the color model(GLUT_RGB) and for
buffering(GLUT_SINGLE, GLUT_DOUBLE).
glutMainLoop
Syntax: glutMainLoop();
Purpose: It causes the program to enter an event processing loop. It should be the last
statement in main.
glutKeyboardFunc
Syntax: glutKeyboardFunc(void *f(char key, int width, int height)
Purpose: Registers the keyboard callback function f. The callback function returns the
ASCII code of the key pressed and the position of the mouse.
15. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 15 -
glEnd
Syntax: glEnd();
Purpose: Terminates a list of vertices.
glBegin
Syntax: glBegin(glEnum mode);
Purpose: Initiates a new primitive of type mode and and starts the collection of vertices.
Values of mode include GL_POINTS, GL_LINES and GL_POLYGON.
glLoadIdentity
Syntax: glLoadIdentity();
Purpose: It loads the identity matrix.
glMatrixMode
Syntax: a) glMatrixMode(GL_PROJECTION);
b) glMatrixMode(GL_MODEL_VIEW);
Purpose: It helps in selecting the matrix(model view or projection matrix) to which the
operations apply by setting the matrix mode; a variable that is set to one type of matrix
and also part of the state.
glutSwapBuffers()
As all of our drawing thus far has been back buffer, and not the screen, this command
is required to take the information on back buffer, and send it to the front in one massive
swap. This is where what’s been drawn previously actually gets sent to the screen.
glutPostRedisplay()
This function alters Glut that the screen needs to be redrawn, forcing it to call the
draw() function again at the next possible opportunity. By including this immediately after
the call to swap the buffers, It improvise our own display loop that runs as fast as the
computer can handle. In general, you can put this command in any function that modifies
what appears on the screen.
16. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 16 -
4.3 REQUIREMENT SPECIFICATION
In this section the various requirements that are essential for this project are specified.
These requirements have to be fulfilled for execution of the project. The purpose, Scope
along with hardware and software requirements are given below:
System Requirements
4.4.1 Software Requirements
Operating System- Windows XP
GLUT library and OpenGL package
Microsoft Visual basic C++ 6.0
4.4.2 Hardware Requirements
Processor - Pentium 4
Hard Disk
Memory - 512 MB
Mouse - 3 button mouse
Keyboard – necessary
Visual Display Unit
17. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 17 -
CHAPTER 5
Results And Snapshots
Fig 5.1 Front Screen
18. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 18 -
Fig 5.2: Output of Leaky Bucket
Fig 5.2 shows the arrival of packets as soon as we press the respected keys.
19. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 19 -
Fig 5.3: Flow of packetin free bucket
Fig 5.3 shows the flow of packets out of the bucket in a regulated manner
20. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 20 -
Fig 5.4: Packet dropping out in overflow
Fig 5.4 shows the overflow of packets when the bucket is flow, it will not affect
the regulated flow of the packets.
21. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 21 -
CONCLUSION AND FUTURE SCOPE
Conclusion
By doing the leaky bucket algorithm in OpenGL we come to know the translation
function and various other library functions in OpenGL.
The project started with the designing phase where figured the requirements needed
in the system design, Data flow diagram etc. Then comes the details of the implementation
phase where it have come across with various functionalities. And now after the testing
phase,the project comes to an end with this report.
Future Scope
The “LEAKY BUCKET ALGORITHM” can be further improvised to show delay
analysis and traffic shaping.
22. LEAKY BUCKET ALGORITHM
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,BCE,S.BELAGOLA - 22 -
REFERENCES
[1]. Communication Networks – Fundamental Concepts & key architectures, Alberto Leon
Garcia & Indra Widjaja, 2nd Edition, Tata McGraw-Hill, India.
[2]. William Stallings: Data and Computer Communication, 8th Edition, Pearson Education,
2007.
[3]. Leaky Bucket Algorithm, www.slideshare.net
[4]. Edward Angel: Interactive Computer Graphics A Top-Down Approach with OpenGL, 5th
edition, Pearson Education, 2008.