WEEK 5

Due Monday 28th October

 

Section 1

Time: 8:00 AM

Monday 28th October

 

Aggarwal Vikram

Research Vmalloc, by Kiem-Phong Vo and compare it to a standard malloc

 

 

Section 2

Time: 9:05 AM

Monday 28th October

 

Rivera Christopher C

Research the various heap allocation algorithms, such as first fit, best-fit, the Buddy System, Fibonacci heap, etc. Discuss their pros and cons. When would certain algorithms be better than others (words being of uniform size, having an abundance of small objects and a few large, having many small, having many large, etc.)?

 

Bolishetty Srikanth

The C language has three storage classes, called automatic, extern, and static. These determine whether and how memory is allocated for variables and/or determine the visibility of entities.

           

Discuss the storage class

            Discuss the use of  “auto”, “extern”, “static” for global variables

            Discuss the use of  “auto”, “extern”, “static” for local variables of a

Function. How is this different from the use of these storage classes for globals ?

Discuss separate compilation and linking in C (with emphasis on using “static”  and “extern”)

 

Kolhe Jyoti

Discuss overloading and polymorphism in Java. Be sure to talk about how the <extends> and <implements> are used within these. If necessary, see instructor for advice on this topic.

 

 

Section 3

Time: 10:10 AM

Monday 28th October

 

Markin Kelly L

Read section 7.7.3 of the textbook. Discuss garbage collection as presented here, and the topics of reference counts and mark-and-sweep colletion.

 

 

Section 4

Time: 11:15 AM

Monday 28th October

 

Babers Lakeisha L

Discuss Java threads as they relate to concurrent program, and discuss the utilities

that Java employs to conserve data integrity (semaphores, monitors, etc.).

 

Bowers Adam C

Construct a BNF grammar to function as a vending machine. This vending machine charges 50 cents for its products, and only accepts exact change (if 55 cents is given, it would not accept any of the money). In other words, the BNF should recognize strings such as:

 

quarter  dime nickel dime

half_dollar

nickel nickel quarter dime nickel

 

The resultant BNF should be as efficient as possible, with no unnecessary rules. Pick a method of parsing and show how a few different sample strings would be handled ( both correct strings and incorrect strings).

 

Perreault James V

The storage allocation operation malloc in C is often implemented as a call on the storage allocator provided by the operating system. The operating system provides a central heap used by all programs. Malloc (and free) allocate (and return) storage when called from your C program form this central heap. Because malloc requires a call to the operating system for this service, it can be a time-consuming operation. An alternative implementation of malloc provides a local heap storage area within each C program. Here malloc use is inexpensive. Investigate a C implementation to determine the cost of using malloc as provided  in C for this purpose. Compare that cost to an implementation

of a heap and a malloc that you could do yourself as part of your program. Assume all the blocks are of the same size (all of your artificial mallocs will allocate the same size block) and assume unlimited space (design your implementation to stay within your pre-allocated space).

 

Wang Guohui

Complete exercise 6.7 from our textbook (pg 312). In addition, show examples of problems when = and == are confused in C and C++. How does Java solve some of these problems?