Gprof2tree Huub van Dam, CCLRC Daresbury Laboratory, January 2006

Size: px
Start display at page:

Download "Gprof2tree Huub van Dam, CCLRC Daresbury Laboratory, January 2006"

Transcription

1 Gprof2tree Huub van Dam, CCLRC Daresbury Laboratory, January 2006 Contents Contents... 1 Quick reference... 2 User guide... 3 What gprof2tree is for... 3 What gprof2tree can and cannot do... 3 Gprof2tree s requirements and recommended companion software... 3 Call tree generation... 4 Generating a basic call tree... 4 Pruning the call tree... 6 Call tree printing Ordering the branches for code comparison Options to aid the interpretation Implementation Guide Motivation Requirements Limits Outline of the implementation Reading the gprof data into tables Manipulating the data tables Writing the call tree References

2 Quick reference This section provides a quick reminder to the expert user as to the syntax and meaning of the supported options. gprof2tree [--parents] [--children] [--[no]sort] [--once --always] [--exclude "<file1>[:<file2>[:<file3>]]"] [--stopat "<file4>[:<file5>[:<file6>]]"] [--to "<routine name1>[ <routine name2>[ <routine name3>]]"] <subroutine name> --parents Print the call moving upwards. I.e. print the routines that call <subroutine name>. --children Print the call moving downwards. I.e. print the routines that routine <subroutine name> calls. This is the default. --sort Alphabetically sort the routine names in the call tree. This is useful if call trees of slighty different runs have to be compared as it reduces the differences introduced by changes of CPU usage. --nosort Print the routines in the call tree in the same order as found in the gprof call tree information. Usually this means that the routines with the highest CPU usage come first. This is the default. --once Print the sub-tree for every subroutine only once, i.e. the first time it is encountered. In subsequent encounters only the call is printed. This helps to greatly reduce the length of the printed call trees and is therefore the default. --always Always print the tree of every subroutine encountered limited only by the --stopat and --exclude options in effect. --exclude Removes all the routines that are named in the specified files from the call tree. This is useful in larger codes where there can a lot of routines that are of no particular interest. --stopat Removes the call tree information of the routines that are named in the specified files. The routine names themselves are still printed in the call trees but not the routines they call. This is particularly useful in larger codes which may have deep call trees. In which one may want to know where a routine is called but not how it goes about doing its job. --to Prints only the paths through the code that lead from the desired subroutine to the routines named in the list. All other paths are suppressed. --level Print the depth level of a routine in the call tree on every line. 2

3 User guide What gprof2tree is for Gprof2tree aims to provide a tool for analyzing code structure using widely (and freely) available software. Relying on data as produced by the gprof program sections of the call tree can be extracted in plain text. Several mechanisms are provided to select the sections of interest, and several printing options are provided for example to aid in comparing different pathways through a code. What gprof2tree can and cannot do Because the input data is provided by gprof the call trees reflect only the pathways through a code that are actually executed. For large codes this helps focusing on the parts relevant to a run, i.e. the ones that are actually executed. However it also means that the nothing can be learned about routines that are not executed. Therefore gprof2tree does not help answering questions like finding all invocations of a particular routine anywhere in a code. Only the ones that are actually executed in a run can be found. Gprof2tree allows the call tree to start from any routine in the tree. The tree can be traversed downwards from a parent routine to its children and its children s children and so on. Alternatively the tree can be traversed upwards from a child routine to its parents and its parent s parents and so on. To reduce the size of the printed call tree there are a number of options to terminate branches at selected points or to print selected branches only. Gprof2tree s requirements and recommended companion software As gprof2tree relies on the data produced by gprof the obvious requirement is the availability of a compiler that produces an executable that will write a gmon.out file and the availability of gprof itself. In practice this means that gprof2tree can be used in conjunction with most compilers. The only compilers I have encountered that will not generate code for writing a gmon.out file are the once from the Portland Group suite of compilers (i.e. pgcc, pgf77, pgf90). Gprof2tree is implemented in the Python scripting language. Python is available for many platforms from To compare call trees, for example ones produced from different runs of the same code to find differences in the executed pathways, a graphical diff program is recommended. A good and freely available diff program tkdiff is provided with tkcvs ( It is 3

4 advised to activate an option to ignore differences in white-space. TkCVS does require Tcl/Tk ( to run. Call tree generation Generating a basic call tree To explain the basics of this call tree generation tool it makes sense to look at a simple example program. In later sections we will consider real applications to demonstrate the strengths of the more advanced options but this would be too cumbersome as an introduction. The sample program we will consider is a Fortran77 program given in Box 1. Note though that gprof2tree will work for program simple call sub_a end subroutine sub_a call sub_b end subroutine sub_b call sub_c end subroutine sub_c write(*,*) Hello from sub_c end Box 1: The source code of the program simple kept in the file simple.f programs written in any other language that can be compiled to generate a gmon.out file. To compile the program and produce a gprof output that serves as the basis for gprof2tree to work on execute the commands in Box 2. g77 c pg simple.f g77 pg simple.o o simple simple gprof simple gmon.out > gprof.out gprof2tree MAIN < gprof.out > simple_calltree.out Box 2: The commands needed to produce a file gprof.out that will be the main input to gprof2tree. 4

5 In this example I used the GNU Fortran77 compiler. In practice many other compilers could be used and in most cases the pg flag can be used to instruct the compiler to instrument the code to produce the gmon.out file. Note that the pg flag typically has to be provided to the linker (the second invocation of g77) as well to link in the code that actually writes the gmon.out file. Running the executable simple produces the file gmon.out. This file contains binary timing data that is transformed into legible text by the program gprof. In order for gprof to be able to associate the timing data with the correct routines you need to pass it both the executable and the gmon.out files as input. The output is written to gprof.out which serves as the input to gprof2tree in the final command. Here I have asked gprof2tree to print the call tree starting from the routine MAIN. This name is the symbol that g77 has assigned to the routine that starts with the program statement in the Fortran code. This name is generally compiler dependent as are any trailing underscores or prefixed periods (. ) with other routine names. Therefore it is advisable to look at the contents of gprof.out before using gprof2tree for the first time to see what the compiler has made of your subroutine names. The call tree as produced by gprof2tree was stored in simple_calltree.out the contents of which are shown in Box 3. It should come as no surprise that it shows the program calling subroutine sub_a, calling subroutine sub_b, and so on. Of course there is no requirement to start printing the call tree at the top level MAIN. Gprof2tree can print the call tree of every routine you wish. MAIN sub_a sub_b sub_c Box 3: The contents of simple_calltree.out. Instead of looking at which routines are called by a given routine, i.e. printing the children of the routine, it may be useful to find out where a given routine is called from, i.e. printing its parents. In other words one might be interested in printing the call tree from the bottom up instead of from the top down. The flag --parents allows you to do that as shown in Box 4. 5

6 gprof2tree --parents sub_c < gprof.out sub_c sub_b sub_a MAIN Box 4: The use of the --parents flag (top) reverses the order of the call tree as shown above. Pruning the call tree The basic problem with call trees is not the lack of data but the opposite of that. Even for modest programs the call tree quickly grows to a size that defies comprehension. Therefore any mechanisms to help prune the call tree and focus on the relevant parts in a given context are crucial. To illustrate these mechanisms I will use examples from the quantum chemistry package GAMESS-UK [1]( This program is mostly written in Fortran77 but some parts that are closely linked to the operating system such as memory allocators, timers and file access have been written in C. In total the program comprises approximately 1 million lines of code and almost 8000 subroutines. The program provides a wide variety of quantum chemistry methods, ranging from a low to a high algorithmic complexity. A very powerful pruning aspect of gprof2tree is of course that the base data only includes those routines that are actually executed in a given run. This typically eliminates the majority of the routines. Even so, the full call tree of the simplest calculation run with GAMESS-UK produces a call tree of some 3746 lines, which corresponds to more that 50 pages of text assuming some 65 lines fit onto a page. Clearly, reducing this is essential if one tries to understand the code. The simplest way to reduce the call tree is of course to choose a suitable top level routine to print the call tree of. The deeper this routine sits in the call tree the smaller its call tree will be. Although this obvious approach can easily reduce the call tree by a factor 2 or 3 the remaining data is still far too much. Another way to drastically reduce the call tree is to exploit the fact that many routines are invoked multiple times during a run. In the call tree, strictly speaking, the structure of every routine has to appear only once. The options --always and --once control this, where the first requests the structure of a subroutine to be printed in full in every instance, the second requests the structure to be printed only once. Using the latter option on the example mentioned above reduces the call tree from 3746 lines to only 906 lines, as illustrated in Box 5. 6

7 gprof2tree --always MAIN < gprof.out > tree_always.txt gprof2tree --once MAIN < gprof.out > tree_once.txt Box 5: The use of the --always and --once flags, note how in tree_always.txt the structure of put_ appears twice where in tree_once.txt the second instance is suppressed The above option achieves a significant reduction but the resulting 906 lines still equate to 14 pages. The next step is based on the realization that many large scale programs rely on using libraries. Here a library is considered a collection of routines whose functionality is closely linked. For example, a program may use a collection of routines related to file I/O. These libraries may be an integral part of the program or they might be third party libraries. The point is that most often when a code uses a library you are actually not interested how this library works. So a mechanism that identifies named routines as library routines to gprof2tree could be used to stop it from printing the internal structure of those routines. As libraries often contain many routines I chose to have a mechanism where one would store all the subroutine names of a single library in a file. The option --stopat followed by a colon separated list of file names instructs gprof2tree to terminate the call tree at each of the routines mentioned in each of the files. Taking this one step further the option --exclude will remove each of the mentioned subroutines altogether. To illustrate the use of these options lets assume we want to suppress printing the structure of the file I/O routines. In a file called io we store the names of the various routines such as rdedx_, rdchr_, wrtc_, wrt3_, etc. Running gprof2tree with the --stopat option in combination with the --once option reduces the call tree to 860 lines. Using the --exclude option instead the call 7

8 tree is reduced to 739 lines, see Box 6. This is a reasonable result given that the io library contained only 16 routines, the structure of which was printed at most once due to the --once option. The impact of this option can of course be increased by including more and more libraries. gprof2tree --once MAIN < gprof.out > tree_once.txt gprof2tree --once --exclude io MAIN < gprof.out > tree_exclude.txt Box 6. The effect of the --exclude option, note how the printing of the structure of the routines wrtc_, wrt3s_ and secput_ has been suppressed. After having reduced the call tree to a comprehensible size of perhaps a few pages only, one might be able to identify a few key routines. Focussing only on these might well condense the call tree as much as possible without losing any relevant information. The option --to allows to do just this. It takes a space separated list of subroutine names and prints all the pathways that lead from the top level routine to one of the routines in the list. Everything else is suppressed. When this is applied for example to answer the question where symmetry related subroutines are used in the code the call tree is reduced to just 32 lines as shown in Box 7. 8

9 gprof2tree --to ssymb_ symm_ setsym_ symh_ symass_ symsvq_ symana_ symsrt_ sym1e_ symtrn_ symtrv_ symtrd_ MAIN < gprof.out > tree_sym.txt MAIN driver_ start_ rdgeom_ sget_ ssymb_ symm_ setsym_ scfgvb_ hfscf_ scf_ rhfclm_ symh_ symass_ symas2_ symsvq_ symana_ symsrt_ denscf_ symh_ standv_ stvstv_ sym1e_ hfprop_ lowdin_ symtrn_ symtrv_ Box 7: The use of the --to flag to limit the call tree to selected branches only. The above presents how a call tree can be condensed to focus on the most relevant parts. However perhaps even more important is the comparison of call trees of slightly different runs of a program. This gives more insight in how certain options change the pathway through the code. Options to help with this analysis are given below. 9

10 Call tree printing Ordering the branches for code comparison Personally I think gprof2tree is most useful for comparing call trees of calculations run with different options. Using tkdiff the differences in the pathway through the code are highlighted straightaway helping to focus on how a particular option is implemented. For this to work the call trees produced by 2 calculations have to be fairly similar on the whole. In the data produced by gprof the subroutines are listed in the order of decreasing CPU time usage. This order can differ wildly depending on the options given to the program or the size of the calculation, causing problems in the comparison. A simple solution to this problem is to sort the list of parents or children of every subroutine in alphabetical order. The option --sort will request this sorting to take place, the option --nosort explicitly requests this sorting to be omitted. The latter may be desirable if you want to focus on performance issues rather than algorithm comparison. The effect of the --sort option is illustrated in Box 8a,b. Box 8a: The call tree comparison obtained with --nosort. 10

11 Box 8b: The same call tree comparison obtained with --sort. From the above example it is clear that tkdiff is much more successful identifying the crucial differences in the code when the call tree is sorted than when its not. Options to aid the interpretation The last option to consider in this section is most useful for large call trees. In particular, when printing large call trees it can be difficult to match up the depth of the tree. The chances are that you misjudge the level of indentation and hence misinterpret the structure of the code. To counter this problem the option --level is provided to request the depth level of the call tree to be printed as shown in Box 9. Clearly this option is useful only if you want to store a non-trivial call tree for future reference. 11

12 gprof2tree --level MAIN < gprof.out 1 MAIN 2 sub_a 3 sub_b 4 sub_c Box 9: The use of the --level flag to print the depth levels in the call tree. Implementation Guide Motivation The creation of this little script was motivated by the need to quickly familiarize myself with a number of quantum chemistry codes including CADPAC, HONDO, and NWChem [2,3] in the course of a project. Specifically I needed a quick way of pin-pointing the particular parts of each of these codes that were involved in performing certain calculations. Requirements There were many requirements the most important of which were: - Platform independence requiring both the tool as any other utilities to be used in conjunction with the tool to run on any platform that we support including but not limited to Linux, MacOS, Windows and any of the commercial UNIX s. - Simplicity of porting to all the above platforms. - The production of text based call trees that can be stored in a revision control system for future reference. - The ability to work on large codes without excessive overheads. - The availability of options to effectively reduce the size of call trees to focus on the relevant parts. Limits The implementation of this tool was limited in several ways: - All the data involved obtained directly from a gprof output and kept in memory. No data is kept between runs. - No time was allocated for the creation of this tool in the project plan, so it had to be written within the time that one could expect it would save. This severly 12

13 limited the options available. All the input data as well as the capability to analyse the output had to be available from existing tools. Outline of the implementation The essential idea behind the implementation is the recognition that three things need to happen: 1. The call tree information needs to be extracted from the gprof output. 2. The data needs to be massaged in certain ways to effect the various options whether they be sorting the subroutine names or limiting the amount of data being printed. 3. Finally the call tree needs to be written out. The main reason for separating steps 2 and 3 was to achieve a high efficiency. In step 3 one particular subroutine may be encountered many times. Instead of performing various operations at that stage they can be performed in step 2 where every subroutine is encountered only once. This way the scalability of the script as a function of the size of the codes being analysed is improved. Reading the gprof data into tables The gprof data is being read and parsed by the python function parse_call_tree. This function stores the data in three dictionaries; parents, children and times. The subroutine names are used as keys in the first two dictionaries. For each subroutine they hold a list of parent subroutines or child subroutines. The dictionary times uses tuples of subroutine names and child names as keys. For each subroutine-child tuple it holds a tuple of cpu-time and call-counts. Special arrangements have been made for routines that are called from uninstrumented routines which are marked by gprof as having a parent <spontaneous>, and for recursive routines /25 minit_ [4] /25 sfun1_ [6] [5] calcfg_ [5] /10 grad_ [9] /14 newpt_ [15] /24 mindum_ [255] /26533 dcopy_ [94] /2370 cpulft_ [112] /23 mnter_ [264] Box 10. An example of a section of gprof output 13

14 The general parsing procedure knows 2 phases named parse_parents and parse_children. The procedure starts in the parse_parents phase. In the example in Box 10 it builds a list containing the subroutines minit_ and sfun1_. The phase is terminated at the subroutine calcfg_. At this point the parent list is stored in the parents dictionary. The phase is switched to the parse_children phase. Next a list is build up containing grad_, newpt_,, mnter_. This phase is terminated at the ---- line, at which point the list is stored in the children dictionary and phase is switched to parse_parents for the next section. The parse routine terminates at the end-of-file or the string This table:. Manipulating the data tables The main two table manipulations are related to the --stopat and --exclude options. The --stopat option is effected simply by replacing the list of children in the children dictionary with an empty list for a given subroutine. The same thing is done in the parents dictionary. The --exclude option is effected by deleting the whole entry of a given subroutine in the children and parents dictionaries. The --sort option is effected by iterating through the children and parents dictionaries and sorting the lists stored with the keys. Writing the call tree Writing the call tree out is a matter of simply traversing the stored data recursively. The only critical point is that a subroutine name should not be printed if it does not appear as a key in dictionary. This is required to make the --exclude option work correctly. The --to option presents slight challenge in that whether a subroutine name should be printed depends on whether it has a child somewhere down the stack. This challenge is met by building up a list of subroutine names as the tree is being traversed. If a to subroutine is found then the list of subroutines is printed. Essentially this is a simple modification of the straightforward tree traversion. References 1. GAMESS-UK is a package of ab initio programs. See: " M.F. Guest, I. J. Bush, H.J.J. van Dam, P. Sherwood, J.M.H. Thomas, J.H. van Lenthe, R.W.A Havenith, J. Kendrick, "The GAMESS-UK electronic structure package: algorithms, developments and applications",molecular Physics, Vol. 103, No. 6-8,

15 2. Aprà, E.; Windus, T.L.; Straatsma, T.P.; Bylaska, E.J.; de Jong, W.; Hirata, S.; Valiev, M.; Hackler, M.; Pollack, L.; Kowalski, K.; Harrison, R.; Dupuis, M.; Smith, D.M.A; Nieplocha, J.; Tipparaju V.; Krishnan, M.; Auer, A.A.; Brown, E.; Cisneros, G.; Fann, G.; Fruchtl, H.; Garza, J.; Hirao, K.; Kendall, R.; Nichols, J.; Tsemekhman, K.; Wolinski, K.; Anchell, J.; Bernholdt, D.; Borowski, P.; Clark, T.; Clerc, D.; Dachsel, H.; Deegan, M.; Dyall, K.; Elwood, D.; Glendening, E.; Gutowski, M.; Hess, A.; Jaffe, J.; Johnson, B.; Ju, J.; Kobayashi, R.; Kutteh, R.; Lin, Z.; Littlefield, R.; Long, X.; Meng, B.; Nakajima, T.; Niu, S.; Rosing, M.; Sandrone, G.; Stave, M.; Taylor, H.; Thomas, G.; van Lenthe, J.; Wong, A.; Zhang, Z.; "NWChem, A Computational Chemistry Package for Parallel Computers, Version 4.7" (2005), Pacific Northwest National Laboratory, Richland, Washington , USA. 3. "High Performance Computational Chemistry: An Overview of NWChem a Distributed Parallel Application," Kendall, R.A.; Apra, E.; Bernholdt, D.E.; Bylaska, E.J.; Dupuis, M.; Fann, G.I.; Harrison, R.J.; Ju, J.; Nichols, J.A.; Nieplocha, J.; Straatsma, T.P.; Windus, T.L.; Wong, A.T.; Computer Phys. Comm. 2000, 128,

Resource Management on a Mixed Processor Linux Cluster. Haibo Wang. Mississippi Center for Supercomputing Research

Resource Management on a Mixed Processor Linux Cluster. Haibo Wang. Mississippi Center for Supercomputing Research Resource Management on a Mixed Processor Linux Cluster Haibo Wang Mississippi Center for Supercomputing Research Many existing clusters were built as a small test-bed for small group of users and then

More information

Manual NWCHEMRATE version 2007

Manual NWCHEMRATE version 2007 Manual NWCHEMRATE version 2007 Jingjing Zheng, Mark A. Iron, Benjamin A. Ellingson, José C. Corchado, Yao-Yuan Chuang, and Donald G. Truhlar Department of Chemistry and Supercomputing Institute University

More information

5 The Control Structure Diagram (CSD)

5 The Control Structure Diagram (CSD) 5 The Control Structure Diagram (CSD) The Control Structure Diagram (CSD) is an algorithmic level diagram intended to improve the comprehensibility of source code by clearly depicting control constructs,

More information

And Parallelism. Parallelism in Prolog. OR Parallelism

And Parallelism. Parallelism in Prolog. OR Parallelism Parallelism in Prolog And Parallelism One reason that Prolog is of interest to computer scientists is that its search mechanism lends itself to parallel evaluation. In fact, it supports two different kinds

More information

DATA STRUCTURE AND ALGORITHM USING PYTHON

DATA STRUCTURE AND ALGORITHM USING PYTHON DATA STRUCTURE AND ALGORITHM USING PYTHON Advanced Data Structure and File Manipulation Peter Lo Linear Structure Queue, Stack, Linked List and Tree 2 Queue A queue is a line of people or things waiting

More information

4.1 COMPUTATIONAL THINKING AND PROBLEM-SOLVING

4.1 COMPUTATIONAL THINKING AND PROBLEM-SOLVING 4.1 COMPUTATIONAL THINKING AND PROBLEM-SOLVING 4.1.2 ALGORITHMS ALGORITHM An Algorithm is a procedure or formula for solving a problem. It is a step-by-step set of operations to be performed. It is almost

More information

Recursion. Comp Sci 1575 Data Structures. Introduction. Simple examples. The call stack. Types of recursion. Recursive programming

Recursion. Comp Sci 1575 Data Structures. Introduction. Simple examples. The call stack. Types of recursion. Recursive programming Recursion Comp Sci 1575 Data Structures Outline 1 2 3 4 Definitions To understand, you must understand. Familiar of recursive definitions Natural numbers are either: n+1, where n is a natural number 1

More information

Language Translation. Compilation vs. interpretation. Compilation diagram. Step 1: compile. Step 2: run. compiler. Compiled program. program.

Language Translation. Compilation vs. interpretation. Compilation diagram. Step 1: compile. Step 2: run. compiler. Compiled program. program. Language Translation Compilation vs. interpretation Compilation diagram Step 1: compile program compiler Compiled program Step 2: run input Compiled program output Language Translation compilation is translation

More information

Stating the obvious, people and computers do not speak the same language.

Stating the obvious, people and computers do not speak the same language. 3.4 SYSTEM SOFTWARE 3.4.3 TRANSLATION SOFTWARE INTRODUCTION Stating the obvious, people and computers do not speak the same language. People have to write programs in order to instruct a computer what

More information

The Big Python Guide

The Big Python Guide The Big Python Guide Big Python Guide - Page 1 Contents Input, Output and Variables........ 3 Selection (if...then)......... 4 Iteration (for loops)......... 5 Iteration (while loops)........ 6 String

More information

Shell Scripting REGEX, AWK, SED, & GREP. Alexander B. Pacheco. LTS Research Computing

Shell Scripting REGEX, AWK, SED, & GREP. Alexander B. Pacheco. LTS Research Computing Shell Scripting REGEX, AWK, SED, & GREP Alexander B. Pacheco LTS Research Computing Outline 1 Regular Expressions 2 File Manipulation 3 grep 4 sed 5 awk 6 Wrap Up 2 / 52 Regular Expressions Regular Expressions

More information

Week - 03 Lecture - 18 Recursion. For the last lecture of this week, we will look at recursive functions. (Refer Slide Time: 00:05)

Week - 03 Lecture - 18 Recursion. For the last lecture of this week, we will look at recursive functions. (Refer Slide Time: 00:05) Programming, Data Structures and Algorithms in Python Prof. Madhavan Mukund Department of Computer Science and Engineering Indian Institute of Technology, Madras Week - 03 Lecture - 18 Recursion For the

More information

Shell Scripting Part 2. Le Yan/Alex Pacheco HPC User LSU

Shell Scripting Part 2. Le Yan/Alex Pacheco HPC User LSU Shell Scripting Part 2 Le Yan/Alex Pacheco HPC User Services @ LSU 3/4/2015 HPC training series Spring 2015 Shell Scripting Part 1 (Feb 11 th ) Simple topics such as creating and executing simple shell

More information

Issues surrounding model consistency and QVT

Issues surrounding model consistency and QVT Issues surrounding model consistency and QVT Laurence Tratt, Tony Clark laurie@tratt.net, anclark@dcs.kcl.ac.uk December 6, 200. Introduction This document is intended to outline some of the issues surrounding

More information

Computer Science 9608 (Notes) Chapter: 4.1 Computational thinking and problem-solving

Computer Science 9608 (Notes) Chapter: 4.1 Computational thinking and problem-solving UWhat is Computational Thinking? Computational thinking (CT) involves a set of skills and techniques that software engineers use to write programs that underlie the computer applications you use such as

More information

ITERATIVE MULTI-LEVEL MODELLING - A METHODOLOGY FOR COMPUTER SYSTEM DESIGN. F. W. Zurcher B. Randell

ITERATIVE MULTI-LEVEL MODELLING - A METHODOLOGY FOR COMPUTER SYSTEM DESIGN. F. W. Zurcher B. Randell ITERATIVE MULTI-LEVEL MODELLING - A METHODOLOGY FOR COMPUTER SYSTEM DESIGN F. W. Zurcher B. Randell Thomas J. Watson Research Center Yorktown Heights, New York Abstract: The paper presents a method of

More information

(Refer Slide Time: 1:40)

(Refer Slide Time: 1:40) Computer Architecture Prof. Anshul Kumar Department of Computer Science and Engineering, Indian Institute of Technology, Delhi Lecture - 3 Instruction Set Architecture - 1 Today I will start discussion

More information

Linked Lists and Abstract Data Structures A brief comparison

Linked Lists and Abstract Data Structures A brief comparison Linked Lists and Abstract Data A brief comparison 24 March 2011 Outline 1 2 3 4 Data Data structures are a key idea in programming It s just as important how you store the data as it is what you do to

More information

Stackless BVH Collision Detection for Physical Simulation

Stackless BVH Collision Detection for Physical Simulation Stackless BVH Collision Detection for Physical Simulation Jesper Damkjær Department of Computer Science, University of Copenhagen Universitetsparken 1, DK-2100, Copenhagen Ø, Denmark damkjaer@diku.dk February

More information

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */ Overview Language Basics This chapter describes the basic elements of Rexx. It discusses the simple components that make up the language. These include script structure, elements of the language, operators,

More information

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Priority Queues / Heaps Date: 9/27/17

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Priority Queues / Heaps Date: 9/27/17 01.433/33 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Priority Queues / Heaps Date: 9/2/1.1 Introduction In this lecture we ll talk about a useful abstraction, priority queues, which are

More information

Process Time. Steven M. Bellovin January 25,

Process Time. Steven M. Bellovin January 25, Multiprogramming Computers don t really run multiple programs simultaneously; it just appears that way Each process runs to completion, but intermixed with other processes Process 1 6 ticks Process 2 Process

More information

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi.

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi. Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture 18 Tries Today we are going to be talking about another data

More information

CISC-235* Test #1 January 31, 2018

CISC-235* Test #1 January 31, 2018 CISC-235* Test #1 January 31, 2018 Student Number (Required) Name (Optional) This is a closed book test. You may not refer to any resources. This is a 50 minute test. Please write your answers in ink.

More information

MIPS Procedure Calls - Review

MIPS Procedure Calls - Review MIPS Stacks and Subroutine Calls Cptr280 Dr Curtis Nelson MIPS Procedure Calls - Review When making a procedure or function call, it is necessary to: Place parameters you wish to pass where they can be

More information

Binary Search Trees. Carlos Moreno uwaterloo.ca EIT https://ece.uwaterloo.ca/~cmoreno/ece250

Binary Search Trees. Carlos Moreno uwaterloo.ca EIT https://ece.uwaterloo.ca/~cmoreno/ece250 Carlos Moreno cmoreno @ uwaterloo.ca EIT-4103 https://ece.uwaterloo.ca/~cmoreno/ece250 Standard reminder to set phones to silent/vibrate mode, please! Previously, on ECE-250... We discussed trees (the

More information

9/29/2016. Chapter 4 Trees. Introduction. Terminology. Terminology. Terminology. Terminology

9/29/2016. Chapter 4 Trees. Introduction. Terminology. Terminology. Terminology. Terminology Introduction Chapter 4 Trees for large input, even linear access time may be prohibitive we need data structures that exhibit average running times closer to O(log N) binary search tree 2 Terminology recursive

More information

A Module Mapper. 1 Background. Nathan Sidwell. Document Number: p1184r1 Date: SC22/WG21 SG15. /

A Module Mapper. 1 Background. Nathan Sidwell. Document Number: p1184r1 Date: SC22/WG21 SG15. / A Module Mapper Nathan Sidwell Document Number: p1184r1 Date: 2018-11-12 To: SC22/WG21 SG15 Reply to: Nathan Sidwell nathan@acm.org / nathans@fb.com The modules-ts specifies no particular mapping between

More information

ECE 695 Numerical Simulations Lecture 3: Practical Assessment of Code Performance. Prof. Peter Bermel January 13, 2017

ECE 695 Numerical Simulations Lecture 3: Practical Assessment of Code Performance. Prof. Peter Bermel January 13, 2017 ECE 695 Numerical Simulations Lecture 3: Practical Assessment of Code Performance Prof. Peter Bermel January 13, 2017 Outline Time Scaling Examples General performance strategies Computer architectures

More information

LL Parsing, LR Parsing, Complexity, and Automata

LL Parsing, LR Parsing, Complexity, and Automata LL Parsing, LR Parsing, Complexity, and Automata R. Gregory Taylor Department of Mathematics and Computer Science Manhattan College Riverdale, New York 10471-4098 USA Abstract It

More information

Enterprise Architect. User Guide Series. Profiling

Enterprise Architect. User Guide Series. Profiling Enterprise Architect User Guide Series Profiling Investigating application performance? The Sparx Systems Enterprise Architect Profiler finds the actions and their functions that are consuming the application,

More information

Enterprise Architect. User Guide Series. Profiling. Author: Sparx Systems. Date: 10/05/2018. Version: 1.0 CREATED WITH

Enterprise Architect. User Guide Series. Profiling. Author: Sparx Systems. Date: 10/05/2018. Version: 1.0 CREATED WITH Enterprise Architect User Guide Series Profiling Author: Sparx Systems Date: 10/05/2018 Version: 1.0 CREATED WITH Table of Contents Profiling 3 System Requirements 8 Getting Started 9 Call Graph 11 Stack

More information

FORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- OCTOBER, 2012 DATA STRUCTURE

FORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- OCTOBER, 2012 DATA STRUCTURE TED (10)-3071 Reg. No.. (REVISION-2010) Signature. FORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- OCTOBER, 2012 DATA STRUCTURE (Common to CT and IF) [Time: 3 hours (Maximum marks: 100)

More information

6.001 Notes: Section 31.1

6.001 Notes: Section 31.1 6.001 Notes: Section 31.1 Slide 31.1.1 In previous lectures we have seen a number of important themes, which relate to designing code for complex systems. One was the idea of proof by induction, meaning

More information

mywbut.com UNIX Operating System

mywbut.com UNIX Operating System UNIX Operating System 1 Lecture Notes Overview Unlike many operating systems, UNIX is not limited to specific computers using a particular microprocessor as a CPU. Instead, UNIX systems run on all sizes

More information

(Refer Slide Time: 1:27)

(Refer Slide Time: 1:27) Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture 1 Introduction to Data Structures and Algorithms Welcome to data

More information

PATH FINDING AND GRAPH TRAVERSAL

PATH FINDING AND GRAPH TRAVERSAL PATH FINDING AND GRAPH TRAVERSAL PATH FINDING AND GRAPH TRAVERSAL Path finding refers to determining the shortest path between two vertices in a graph. We discussed the Floyd Warshall algorithm previously,

More information

Advanced Algorithms. Class Notes for Thursday, September 18, 2014 Bernard Moret

Advanced Algorithms. Class Notes for Thursday, September 18, 2014 Bernard Moret Advanced Algorithms Class Notes for Thursday, September 18, 2014 Bernard Moret 1 Amortized Analysis (cont d) 1.1 Side note: regarding meldable heaps When we saw how to meld two leftist trees, we did not

More information

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture - 04 Introduction to Programming Language Concepts

More information

Heap sort. Carlos Moreno uwaterloo.ca EIT

Heap sort. Carlos Moreno uwaterloo.ca EIT Carlos Moreno cmoreno @ uwaterloo.ca EIT-4103 http://xkcd.com/835/ https://ece.uwaterloo.ca/~cmoreno/ece250 Standard reminder to set phones to silent/vibrate mode, please! Last time, on ECE-250... Talked

More information

Bull. Performance Tools Guide and Reference AIX ORDER REFERENCE 86 A2 27EG 01

Bull. Performance Tools Guide and Reference AIX ORDER REFERENCE 86 A2 27EG 01 Bull Performance Tools Guide and Reference AIX ORDER REFERENCE 86 A2 27EG 01 Bull Performance Tools Guide and Reference AIX Software May 2003 BULL CEDOC 357 AVENUE PATTON B.P.20845 49008 ANGERS CEDEX

More information

Binary Trees

Binary Trees Binary Trees 4-7-2005 Opening Discussion What did we talk about last class? Do you have any code to show? Do you have any questions about the assignment? What is a Tree? You are all familiar with what

More information

Introduction. for large input, even access time may be prohibitive we need data structures that exhibit times closer to O(log N) binary search tree

Introduction. for large input, even access time may be prohibitive we need data structures that exhibit times closer to O(log N) binary search tree Chapter 4 Trees 2 Introduction for large input, even access time may be prohibitive we need data structures that exhibit running times closer to O(log N) binary search tree 3 Terminology recursive definition

More information

V Advanced Data Structures

V Advanced Data Structures V Advanced Data Structures B-Trees Fibonacci Heaps 18 B-Trees B-trees are similar to RBTs, but they are better at minimizing disk I/O operations Many database systems use B-trees, or variants of them,

More information

Analysis of Algorithms

Analysis of Algorithms Algorithm An algorithm is a procedure or formula for solving a problem, based on conducting a sequence of specified actions. A computer program can be viewed as an elaborate algorithm. In mathematics and

More information

WACC Report. Zeshan Amjad, Rohan Padmanabhan, Rohan Pritchard, & Edward Stow

WACC Report. Zeshan Amjad, Rohan Padmanabhan, Rohan Pritchard, & Edward Stow WACC Report Zeshan Amjad, Rohan Padmanabhan, Rohan Pritchard, & Edward Stow 1 The Product Our compiler passes all of the supplied test cases, and over 60 additional test cases we wrote to cover areas (mostly

More information

Performance Study of Popular Computational Chemistry Software Packages on Cray HPC Systems

Performance Study of Popular Computational Chemistry Software Packages on Cray HPC Systems Performance Study of Popular Computational Chemistry Software Packages on Cray HPC Systems Junjie Li (lijunj@iu.edu) Shijie Sheng (shengs@iu.edu) Raymond Sheppard (rsheppar@iu.edu) Pervasive Technology

More information

Motivation for B-Trees

Motivation for B-Trees 1 Motivation for Assume that we use an AVL tree to store about 20 million records We end up with a very deep binary tree with lots of different disk accesses; log2 20,000,000 is about 24, so this takes

More information

Control Structures. Code can be purely arithmetic assignments. At some point we will need some kind of control or decision making process to occur

Control Structures. Code can be purely arithmetic assignments. At some point we will need some kind of control or decision making process to occur Control Structures Code can be purely arithmetic assignments At some point we will need some kind of control or decision making process to occur C uses the if keyword as part of it s control structure

More information

CS2 Algorithms and Data Structures Note 10. Depth-First Search and Topological Sorting

CS2 Algorithms and Data Structures Note 10. Depth-First Search and Topological Sorting CS2 Algorithms and Data Structures Note 10 Depth-First Search and Topological Sorting In this lecture, we will analyse the running time of DFS and discuss a few applications. 10.1 A recursive implementation

More information

MeTA Studio: A Cross Platform, Programmable IDE for Computational Chemist

MeTA Studio: A Cross Platform, Programmable IDE for Computational Chemist Software News and Update MeTA Studio: A Cross Platform, Programmable IDE for Computational Chemist V. GANESH Interdisciplinary School of Scientific Computing, University of Pune, Pune 411007, India Received

More information

CSE 12 Abstract Syntax Trees

CSE 12 Abstract Syntax Trees CSE 12 Abstract Syntax Trees Compilers and Interpreters Parse Trees and Abstract Syntax Trees (AST's) Creating and Evaluating AST's The Table ADT and Symbol Tables 16 Using Algorithms and Data Structures

More information

Some Applications of Graph Bandwidth to Constraint Satisfaction Problems

Some Applications of Graph Bandwidth to Constraint Satisfaction Problems Some Applications of Graph Bandwidth to Constraint Satisfaction Problems Ramin Zabih Computer Science Department Stanford University Stanford, California 94305 Abstract Bandwidth is a fundamental concept

More information

THE UNIVERSAL ACCELERATOR PARSER

THE UNIVERSAL ACCELERATOR PARSER THE UNIVERSAL ACCELERATOR PARSER D. A. Bates, LBNL, Berkeley, CA 94720, USA D. Sagan, Cornell University, Ithaca, NY, 14850, USA A. Wolski, University of Liverpool, UK, and the Cockcroft Institute, Daresbury,

More information

Lecture Notes 16 - Trees CSS 501 Data Structures and Object-Oriented Programming Professor Clark F. Olson

Lecture Notes 16 - Trees CSS 501 Data Structures and Object-Oriented Programming Professor Clark F. Olson Lecture Notes 16 - Trees CSS 501 Data Structures and Object-Oriented Programming Professor Clark F. Olson Reading: Carrano, Chapter 15 Introduction to trees The data structures we have seen so far to implement

More information

Chapter 9: Dealing with Errors

Chapter 9: Dealing with Errors Chapter 9: Dealing with Errors What we will learn: How to identify errors Categorising different types of error How to fix different errors Example of errors What you need to know before: Writing simple

More information

Why are there so many programming languages? Why do we have programming languages? What is a language for? What makes a language successful?

Why are there so many programming languages? Why do we have programming languages? What is a language for? What makes a language successful? Chapter 1 :: Introduction Introduction Programming Language Pragmatics Michael L. Scott Why are there so many programming languages? evolution -- we've learned better ways of doing things over time socio-economic

More information

V Advanced Data Structures

V Advanced Data Structures V Advanced Data Structures B-Trees Fibonacci Heaps 18 B-Trees B-trees are similar to RBTs, but they are better at minimizing disk I/O operations Many database systems use B-trees, or variants of them,

More information

Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institute of Technology, Delhi

Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institute of Technology, Delhi Embedded Systems Dr. Santanu Chaudhury Department of Electrical Engineering Indian Institute of Technology, Delhi Lecture - 13 Virtual memory and memory management unit In the last class, we had discussed

More information

Advanced Database Systems

Advanced Database Systems Lecture IV Query Processing Kyumars Sheykh Esmaili Basic Steps in Query Processing 2 Query Optimization Many equivalent execution plans Choosing the best one Based on Heuristics, Cost Will be discussed

More information

UNINFORMED SEARCH. Announcements Reading Section 3.4, especially 3.4.1, 3.4.2, 3.4.3, 3.4.5

UNINFORMED SEARCH. Announcements Reading Section 3.4, especially 3.4.1, 3.4.2, 3.4.3, 3.4.5 UNINFORMED SEARCH Announcements Reading Section 3.4, especially 3.4.1, 3.4.2, 3.4.3, 3.4.5 Robbie has no idea where room X is, and may have little choice but to try going down this corridor and that. On

More information

A Module Mapper. 1 Background. Nathan Sidwell. Document Number: p1184r0 Date: SC22/WG21 SG15. /

A Module Mapper. 1 Background. Nathan Sidwell. Document Number: p1184r0 Date: SC22/WG21 SG15. / A Module Mapper Nathan Sidwell Document Number: p1184r0 Date: 2018-10-05 To: SC22/WG21 SG15 Reply to: Nathan Sidwell nathan@acm.org / nathans@fb.com The modules-ts specifies no particular mapping between

More information

Tackling component interoperability in quantum chemistry software

Tackling component interoperability in quantum chemistry software Ames Laboratory Conference Papers, Posters, and Presentations Ames Laboratory 10-2007 Tackling component interoperability in quantum chemistry software Fang Peng Iowa State University Meng-Shiou Wu Iowa

More information

Evaluating Performance Via Profiling

Evaluating Performance Via Profiling Performance Engineering of Software Systems September 21, 2010 Massachusetts Institute of Technology 6.172 Professors Saman Amarasinghe and Charles E. Leiserson Handout 6 Profiling Project 2-1 Evaluating

More information

Deep Learning for Visual Computing Prof. Debdoot Sheet Department of Electrical Engineering Indian Institute of Technology, Kharagpur

Deep Learning for Visual Computing Prof. Debdoot Sheet Department of Electrical Engineering Indian Institute of Technology, Kharagpur Deep Learning for Visual Computing Prof. Debdoot Sheet Department of Electrical Engineering Indian Institute of Technology, Kharagpur Lecture - 05 Classification with Perceptron Model So, welcome to today

More information

Chapter 6 Control Flow. June 9, 2015

Chapter 6 Control Flow. June 9, 2015 Chapter 6 Control Flow June 9, 2015 Expression evaluation It s common in programming languages to use the idea of an expression, which might be a simple object function invocation over some number of arguments

More information

Unit 2 : Computer and Operating System Structure

Unit 2 : Computer and Operating System Structure Unit 2 : Computer and Operating System Structure Lesson 1 : Interrupts and I/O Structure 1.1. Learning Objectives On completion of this lesson you will know : what interrupt is the causes of occurring

More information

by Marina Cholakyan, Hyduke Noshadi, Sepehr Sahba and Young Cha

by Marina Cholakyan, Hyduke Noshadi, Sepehr Sahba and Young Cha CS 111 Scribe Notes for 4/11/05 by Marina Cholakyan, Hyduke Noshadi, Sepehr Sahba and Young Cha Processes What is a process? A process is a running instance of a program. The Web browser you're using to

More information

Indexing and Hashing

Indexing and Hashing C H A P T E R 1 Indexing and Hashing This chapter covers indexing techniques ranging from the most basic one to highly specialized ones. Due to the extensive use of indices in database systems, this chapter

More information

Treaps. 1 Binary Search Trees (BSTs) CSE341T/CSE549T 11/05/2014. Lecture 19

Treaps. 1 Binary Search Trees (BSTs) CSE341T/CSE549T 11/05/2014. Lecture 19 CSE34T/CSE549T /05/04 Lecture 9 Treaps Binary Search Trees (BSTs) Search trees are tree-based data structures that can be used to store and search for items that satisfy a total order. There are many types

More information

Multi-relational Decision Tree Induction

Multi-relational Decision Tree Induction Multi-relational Decision Tree Induction Arno J. Knobbe 1,2, Arno Siebes 2, Daniël van der Wallen 1 1 Syllogic B.V., Hoefseweg 1, 3821 AE, Amersfoort, The Netherlands, {a.knobbe, d.van.der.wallen}@syllogic.com

More information

6.001 Notes: Section 15.1

6.001 Notes: Section 15.1 6.001 Notes: Section 15.1 Slide 15.1.1 Our goal over the next few lectures is to build an interpreter, which in a very basic sense is the ultimate in programming, since doing so will allow us to define

More information

Discussion on Writing of Recursive Algorithm

Discussion on Writing of Recursive Algorithm , pp.127-134 http://dx.doi.org/10.14257/ijhit.2013.6.6.11 Discussion on Writing of Recursive Algorithm Song Jinping Computer Department, Jining Teachers College, Wulanchabu, China jnsongjinping@126.com

More information

Decaf Language Reference Manual

Decaf Language Reference Manual Decaf Language Reference Manual C. R. Ramakrishnan Department of Computer Science SUNY at Stony Brook Stony Brook, NY 11794-4400 cram@cs.stonybrook.edu February 12, 2012 Decaf is a small object oriented

More information

Basic Properties The Definition of Catalan Numbers

Basic Properties The Definition of Catalan Numbers 1 Basic Properties 1.1. The Definition of Catalan Numbers There are many equivalent ways to define Catalan numbers. In fact, the main focus of this monograph is the myriad combinatorial interpretations

More information

STUDENT OUTLINE. Lesson 8: Structured Programming, Control Structures, if-else Statements, Pseudocode

STUDENT OUTLINE. Lesson 8: Structured Programming, Control Structures, if-else Statements, Pseudocode STUDENT OUTLINE Lesson 8: Structured Programming, Control Structures, if- Statements, Pseudocode INTRODUCTION: This lesson is the first of four covering the standard control structures of a high-level

More information

More Counting Sort and Sorting-by-Key

More Counting Sort and Sorting-by-Key Tony Gong ITEE University of Queensland In the lectures last week we looked at the counting sort algorithm for sorting a set of integers that come from some specific domain, i.e. every integer is in some

More information

Top-Level View of Computer Organization

Top-Level View of Computer Organization Top-Level View of Computer Organization Bởi: Hoang Lan Nguyen Computer Component Contemporary computer designs are based on concepts developed by John von Neumann at the Institute for Advanced Studies

More information

Theoretical Computer Science

Theoretical Computer Science Theoretical Computer Science 410 (2009) 3372 3390 Contents lists available at ScienceDirect Theoretical Computer Science journal homepage: www.elsevier.com/locate/tcs An (18/11)n upper bound for sorting

More information

Data Structure. IBPS SO (IT- Officer) Exam 2017

Data Structure. IBPS SO (IT- Officer) Exam 2017 Data Structure IBPS SO (IT- Officer) Exam 2017 Data Structure: In computer science, a data structure is a way of storing and organizing data in a computer s memory so that it can be used efficiently. Data

More information

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #17. Loops: Break Statement

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #17. Loops: Break Statement Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #17 Loops: Break Statement (Refer Slide Time: 00:07) In this session we will see one more feature that is present

More information

LINUX OPERATING SYSTEM Submitted in partial fulfillment of the requirement for the award of degree of Bachelor of Technology in Computer Science

LINUX OPERATING SYSTEM Submitted in partial fulfillment of the requirement for the award of degree of Bachelor of Technology in Computer Science A Seminar report On LINUX OPERATING SYSTEM Submitted in partial fulfillment of the requirement for the award of degree of Bachelor of Technology in Computer Science SUBMITTED TO: www.studymafia.org SUBMITTED

More information

arxiv:cs/ v1 [cs.lo] 22 Jun 2005

arxiv:cs/ v1 [cs.lo] 22 Jun 2005 The One Page Model Checker arxiv:cs/0506084v1 [cs.lo] 22 Jun 2005 Jason E. Holt isrl@lunkwill.org June 5, 2017 Abstract We show how standard IPC mechanisms can be used with the fork() system call to perform

More information

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture 20 Priority Queues Today we are going to look at the priority

More information

Basic Python 3 Programming (Theory & Practical)

Basic Python 3 Programming (Theory & Practical) Basic Python 3 Programming (Theory & Practical) Length Delivery Method : 5 Days : Instructor-led (Classroom) Course Overview This Python 3 Programming training leads the student from the basics of writing

More information

Maciej Sobieraj. Lecture 1

Maciej Sobieraj. Lecture 1 Maciej Sobieraj Lecture 1 Outline 1. Introduction to computer programming 2. Advanced flow control and data aggregates Your first program First we need to define our expectations for the program. They

More information

Tree-Structured Indexes

Tree-Structured Indexes Tree-Structured Indexes Chapter 9 Database Management Systems, R. Ramakrishnan and J. Gehrke 1 Introduction As for any index, 3 alternatives for data entries k*: ➀ Data record with key value k ➁

More information

Lec 17 April 8. Topics: binary Trees expression trees. (Chapter 5 of text)

Lec 17 April 8. Topics: binary Trees expression trees. (Chapter 5 of text) Lec 17 April 8 Topics: binary Trees expression trees Binary Search Trees (Chapter 5 of text) Trees Linear access time of linked lists is prohibitive Heap can t support search in O(log N) time. (takes O(N)

More information

CSE. Parallel Algorithms on a cluster of PCs. Ian Bush. Daresbury Laboratory (With thanks to Lorna Smith and Mark Bull at EPCC)

CSE. Parallel Algorithms on a cluster of PCs. Ian Bush. Daresbury Laboratory (With thanks to Lorna Smith and Mark Bull at EPCC) Parallel Algorithms on a cluster of PCs Ian Bush Daresbury Laboratory I.J.Bush@dl.ac.uk (With thanks to Lorna Smith and Mark Bull at EPCC) Overview This lecture will cover General Message passing concepts

More information

Web-interface for Monte-Carlo event generators

Web-interface for Monte-Carlo event generators Web-interface for Monte-Carlo event generators Jonathan Blender Applied and Engineering Physics, Cornell University, Under Professor K. Matchev and Doctoral Candidate R.C. Group Sponsored by the University

More information

High Performance Computing Prof. Matthew Jacob Department of Computer Science and Automation Indian Institute of Science, Bangalore

High Performance Computing Prof. Matthew Jacob Department of Computer Science and Automation Indian Institute of Science, Bangalore High Performance Computing Prof. Matthew Jacob Department of Computer Science and Automation Indian Institute of Science, Bangalore Module No # 09 Lecture No # 40 This is lecture forty of the course on

More information

Theorem proving. PVS theorem prover. Hoare style verification PVS. More on embeddings. What if. Abhik Roychoudhury CS 6214

Theorem proving. PVS theorem prover. Hoare style verification PVS. More on embeddings. What if. Abhik Roychoudhury CS 6214 Theorem proving PVS theorem prover Abhik Roychoudhury National University of Singapore Both specification and implementation can be formalized in a suitable logic. Proof rules for proving statements in

More information

CS 270 Algorithms. Oliver Kullmann. Binary search. Lists. Background: Pointers. Trees. Implementing rooted trees. Tutorial

CS 270 Algorithms. Oliver Kullmann. Binary search. Lists. Background: Pointers. Trees. Implementing rooted trees. Tutorial Week 7 General remarks Arrays, lists, pointers and 1 2 3 We conclude elementary data structures by discussing and implementing arrays, lists, and trees. Background information on pointers is provided (for

More information

Outline: Search and Recursion (Ch13)

Outline: Search and Recursion (Ch13) Search and Recursion Michael Mandel Lecture 12 Methods in Computational Linguistics I The City University of New York, Graduate Center https://github.com/ling78100/lectureexamples/blob/master/lecture12final.ipynb

More information

Design and Analysis of Algorithms Lecture- 9: B- Trees

Design and Analysis of Algorithms Lecture- 9: B- Trees Design and Analysis of Algorithms Lecture- 9: B- Trees Dr. Chung- Wen Albert Tsao atsao@svuca.edu www.408codingschool.com/cs502_algorithm 1/12/16 Slide Source: http://www.slideshare.net/anujmodi555/b-trees-in-data-structure

More information

"GOTO OOP" The logical path from functional to object-oriented programming

GOTO OOP The logical path from functional to object-oriented programming "GOTO OOP" The logical path from functional to object-oriented programming The description of processes with the aid of programs is nothing new. Even the ancient Egyptians tomb inscriptions contained "program

More information

OPERATING SYSTEMS. Goals of the Course. This lecture will cover: This Lecture will also cover:

OPERATING SYSTEMS. Goals of the Course. This lecture will cover: This Lecture will also cover: OPERATING SYSTEMS This lecture will cover: Goals of the course Definitions of operating systems Operating system goals What is not an operating system Computer architecture O/S services This Lecture will

More information

Efficient pebbling for list traversal synopses

Efficient pebbling for list traversal synopses Efficient pebbling for list traversal synopses Yossi Matias Ely Porat Tel Aviv University Bar-Ilan University & Tel Aviv University Abstract 1 Introduction 1.1 Applications Consider a program P running

More information

G A M E S S - U K USER S GUIDE and REFERENCE MANUAL Version 8.0 June 2008

G A M E S S - U K USER S GUIDE and REFERENCE MANUAL Version 8.0 June 2008 CONTENTS i Computing for Science (CFS) Ltd., CCLRC Daresbury Laboratory. Generalised Atomic and Molecular Electronic Structure System G A M E S S - U K USER S GUIDE and REFERENCE MANUAL Version 8.0 June

More information

Chapter 9 Subroutines and Control Abstraction. June 22, 2016

Chapter 9 Subroutines and Control Abstraction. June 22, 2016 Chapter 9 Subroutines and Control Abstraction June 22, 2016 Stack layout Common to have subroutine activation record allocated on a stack Typical fare for a frame: arguments, return value, saved registers,

More information