Ch. 15 Memory Mgmt

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

The size of stack and heap memory depends upon the JVM configurations and can be changed explicitly. You can use ___ and ____ - JVM option to define the startup size and maximum size of heap memory. For stack memory, you can use ___ option.

-Xms and Xmx -Xss

_____ memory is normally associated with RAM (or random access memory) and is also known as main memory. It's typically smaller in size but has faster access times. _____ memory, also known as secondary memory, is separate from main memory. It takes the form of magnetic disks and external drives that carry much higher memory capacities but input/output access times are much slower due to its access mechanisms.

Internal, External

Which of the following has highest memory requirement? Heap Stack JVM Class

JVM requires highest memory requirement as it is the superset of the heap, stack, and class.

A typical characteristic of a B-tree is _____. the root node could be a leaf or a node pointing to a minimum of two children it is a self-balancing nodal structure with all leaf nodes at the any level data in each node is sorted using the common keys for searching sequentially the order of the B-tree 'N' indicates the maximum number of root nodes a child can point to

A typical characteristic of a B-tree is the root node could be a leaf or a node pointing to a minimum of two children.

Which exception is thrown when Java is out of memory? MemoryError OutOfMemoryError MemoryOutOfBoundsException MemoryFullException Print Worksheet

OutOfMemoryError

To carry out a particular instruction, the CPU needs a specific piece of information. The CPU will first check to see if this information is available in the CPU cache. If the information is found, this is called a ____ _____. If the information is not found, this is called a ____ _____, and the CPU goes on looking for the information elsewhere. In the case of a cache miss, the piece of information will be found in the main memory, but it will simply take longer

cache hit, cache miss

A basic search operation using a B-Tree involves _____. comparing the last child node with the root node to search the key comparing the search key starting at the root node and traversing the child nodes to locate the key traversing the child nodes to delete the root node comparing the last key starting at the root node and traversing the child nodes to locate the key

comparing the search key starting at the root node and traversing the child nodes to locate the key A basic search operation using a B-Tree involves comparing the search key starting at the root node and traversing the child nodes to locate the key

______ _____ automatically reclaims the memory for reuse and helps in eliminating memory leaks and other memory-related problems. When an object is no longer used, the Java _____ _____ reclaims the underlying memory and reuses it for future object allocations. JVM manages the heap area for all objects and as long as the object is being referenced, it is considered alive. Once an object is no longer referenced or not reachable by an application, the garbage collector removes this object and reclaims the unused memory.

garbage collector

The memory that actually stores the object is called ____ memory. The objects in ____ are referenced by variables in stack memory. As soon as an object is created, ____ memory is created for that object with its reference in the stack. Objects stored in ____ are globally accessible and it has larger size when compared to stack memory. If____ memory is full, Java runtime throws java.lang.OutOfMemoryError: Java ____ Space.

heap

Sorting done within main memory is called_____ sorting

internal

Some data sets are too large to be held in internal memory, so external memory is used. In these cases, chunks of data are brought from external memory into main memory and sorted. These chunks of data are then merged into a single sorted array through a process called _____ _______ sort.

internal merge sort

JVM uses a ____ and ____ algorithm to determine which objects are no longer in use by the application. This is a two-step process: First, the algorithm scans all object references and marks those objects which are found as alive. It sweeps or reclaims all the heap memory that is not occupied by these marked objects.

mark and sweep algorithm

So you've learned that smaller CPU caches are faster, but a small cache can only contain a certain amount of information. When this fills up, the CPU has to use the much slower main memory. One solution to this is the use of _____-_____ caches. The smallest level 1 (L1) cache is accessed first. In the case of a cache miss, the CPU accesses the much larger (and slightly slower) level 2 (L2) cache. Several additional caches can be used before the main memory is accessed

multi-level caches

Sorting large data sets data in memory involves the external data being divided into blocks or chunks that can fit into main memory and sorting operations being carried out on those blocks. Pairs of these blocks are brought into main memory, merged, sorted sub arrays, and then sent back to external memory. Another pair of blocks is then merged and sorted. This process of merging continues, and with each instance, the number of sorting cycles decreases two fold until there is a single block of sorted data. At this point, the algorithm stops and the sorting is complete. This is called ____ ____ merging.

multi-way merging.

Multi-way merging describes _____. the process of repeatedly merging and sorting pairs of data chunks and cyclically sending them back to memory until a single block of merged sorted data is achieved the process of merging data from main memory to secondary memory and from secondary memory back to main memory the process of merging data from secondary memory to main memory and from main memory back to secondary memory the process of repeatedly merging and sorting pairs of data chunks within main memory until a single block of merged sorted data is achieved

the process of repeatedly merging and sorting pairs of data chunks within main memory until a single block of merged sorted data is achieved

web browsers typically use a cache to make webpages load faster by storing a copy of the webpage files locally, such as on your local computer. This is referred to as a ____ cache

web cache

________ are a self-balancing generalized form of Binary search trees. Unlike Binary Search Trees (BSTs) which are restricted to two child nodes, ___ _____ can be of N order having N child nodes and (N-1) key values. The use of these in database management search optimizes speed by reducing the number of disk cycles needed to access data by utilizing indexing in its structure. A general search operation involves comparing the search key to the root node and traversing the branches until the key is found.

B-Trees

The ___ cache stores the most frequently used pieces of information so they can be retrieved more quickly. This information is a duplicate of information stored elsewhere, but it is more readily available

CPU cache

____ is a type of memory that is relatively small, but can be accessed very quickly. It essentially stores information that is likely to be used again.

Cache

The process of accessing a task or sorting data from external storage (outside main memory) is known as _____ ________

External Searching or External Memory Searching

involves a set of algorithms that can execute the data sorting processes on large sizes of data sets while they still reside in external memory. The algorithms are particularly efficient in carrying out the external sorting and merging operations without adversely affecting overall system performance.

External memory sorting

______ _____ sources may be a hard disk, a network file server with external storage, or a solid state disk. Data managed from external sources to the main memory has speed as one of the main limiting factors. As such, data has to be organized and accessed in a way that will optimize the ultimate speed of the process

External memory sources

What is the main difference between RAM and secondary memory? RAM is the primary storage in a computer system, otherwise known as main memory. Secondary memory is typically hard disk storage with much more capacity. RAM is Remote Access Memory which has fast access times, and secondary memory is the computer's main memory. RAM holds all data sets to be accessed by the computer. Secondary memory holds all the system's backup data. RAM is the primary storage in a computer system that becomes secondary memory when external data sorting is executed.

RAM is the primary storage in a computer system, otherwise known as main memory. Secondary memory is typically hard disk storage with much more capacity.

___ Memory responsible for holding references to objects which are stored in heap and also stores values of Java primitive types. It always works on LIFO (Last-In-First-Out) order. When a method is called from Java program, a new memory block is created in the ____ to hold local primitive values and references to other objects. Once a method finishes execution, its memory is deallocated and assigned to next method. If _____ memory is full, Java runtime throws java.lang.____OverFlowError

Stack memory

T or F? a relatively small CPU cache improves speed, but as the cache gets really large, it no longer helps as much, and the CPU might as well look for the information in the main memory.

T.

Internal memory sorting algorithms include _____.

bubble sort, insertion sort and merge sort


Ensembles d'études connexes

Sensory Perception, Cognition, Pt Education, and Collaboration AQ

View Set

Chapter 12: Systems Planning and Development

View Set