Cloud computing face questions written examination Jinji, cloud computing practical answer two questions surface

Cloud computing is becoming a major method to deploy new business applications, a trend that is rapidly transforming the IT job market. Among them, the demand for cloud computing architects particularly high, but also brought a generous salary. Here, we list the issues in cloud computing architects who have a job interview may be asked in the interview, as well as suggestions for how to answer questions, want to help you get the cloud architect of the post. Cloud computing industry choose to find a job is a good choice, so this small series to bring cloud computing interview and answer for everyone, hoping to find a job for all of us journey be helpful, this article is cloud computing practical face questions the second part:

Garbage collection will check and release unused memory, because before the JVM garbage collector to collect an object, the general requirements for the program calls the appropriate method to release resources, but in the absence of explicit release of resources, Java provides a default mechanism to terminate the heart of the object to release resources, this method is finalize ().

So the program does not require garbage collection is explicitly released objects.

Modern garbage collection can handle circular reference problem.

First of all garbage collection cycle description refers to the problem as follows:

class A

{

B b;

}

class B

{

A a;

}

The var_a = new A ();

B var_b = new B();

var_a.b = var_b;

var_ var_b. A = A;

Thus to achieve a circular reference.

var_a and var_b is the name of the variable in the stack, the value of which is stored an address, point to the two objects heap opened, let's call them obj_a and obj_b better. There are two variables obj_a var_a to it and var_b.a, count 2, obj_b to it there are two variables and var_a.b var_b count of 2. When the program runs, it will destroy var_a and var_b, because they are things on the stack, the next action will save address it. At this time, the reference count obj_b obj_a and becomes 1. Here we need to know that: var_a of b is stored on the heap. var_b of a is stored in the heap. obj_a have references to it, from obj_b, the same reference point obj_b have obj_a. At this time of the operation is to determine whether two objects in the heap is destroyed. Obj_a see if it has a reference point, and from there obj_b, it does not destroy obj_a, obj_b see if it has a reference point, and from there obj_a, it is not destroyed. This obj_a and obj_b refer to each other, would not have been destroyed.

Look at the following example

class A

{

B b;

}

class B

{

}

The var_a = new A ();

B var_b = new B();

var_a.b = var_b;

This is not a circular reference.

There are two heap objects obj_a, obj_b. Obj_a reference count is 1, obj_b reference count of 2. When the program runs, the first processing stack variables, destroyed var_a, var_b. So obj_a reference becomes 0, obj_b references to 1. Then put the heap perspective view obj_a reference count is now 0, destroy obj_a. Check references obj_b count, because obj_a have been destroyed, obj_a the variable b would not exist, then obj_b will become a reference count of 0, it is destroyed obj_b. If the first check obj_b and then see the results obj_a get it is the same oh. Garbage collection will be from time to time to tour some of the memory.

// However, modern garbage collector can handle a circular reference problem

Based on a simple reference counter implementation it is unable to handle the problem of circular references

cpython other modern garbage collection mechanism is the use of reference counting, the main garbage collector to collect the garbage, those objects can not be cleaned up because of a circular reference, cpython from time to time to start a secondary reference traversal-based garbage collector to clean them.

Java language memory allocation and deallocation of the working group to own the programmer does not have to do the work, which provides a system-level memory allocation for each thread track in jvm free treatment, garbage collection thread will check and release no longer used memory (which can be freed memory). Garbage collection process during the lifetime of a Java program is automatic and does not need to allocate and free memory, but also to avoid a memory leak.

You can call System.gc () method is recommended JVM to perform garbage collection can be released so that the memory can be used immediately, when this method returns, JVM has made the greatest efforts to reclaim memory from discarded objects. Can "recommendations" to improve the garbage collection of memory available when the programmer can not specify which garbage collection, in general they do not care about this issue, unless it is a great program memory consumption, in particular, have a lot of temporary objects. It should be noted that calling System.gc () method does not guarantee immediate JVM garbage collection, but recommended, because very low priority garbage collection thread (usually the lowest).

There is no doubt that the garbage collector can improve the efficiency of the program ape

In Java, the introduction of garbage collection mechanism: garbage collector (Garbage Collector, GC), automatic recovery of memory in the garbage, which is the Java language advantages over other local languages, but the memory leak and will not be completely avoided .

Java's garbage collection mechanism is the process for all java applications and services, rather than for a specific service's process. Therefore, any one process have no right to dictate what to do garbage collection, how to do or how to do it.

In Java byte code interpretation is responsible for the implementation of a virtual machine.

In php, disable_functions is to disable some dangerous functions, register_globals means is registered as a global variable, so when On when the passed value will be directly registered as global variables directly, while the Off time, we need to go to a specific array go get it. open_basedir is a user-operable scheduled to die file in a directory. These three are related to the security of a great relationship, and file_uploads is to upload things, with no big security relationship.

Users lilei achieve recovery with sql language to modify permissions and crew staff in wage salary of: revoke update (salary) on staff from lilei

Table dimensional array is a linear array element which is a linear form

aix lp command contains information about the print subsystem, lp is the use request to the printer ranks

03 06 03 lp / usr / local / the Message | mail -s "the Message Server" root This command is automatically executed every Wednesday 03:06 minutes

class Parent(object):

x = 1

class Child1(Parent):

pass

class Child2(Parent):

pass

print Parent.x, Child1.x, Child2.x

Child1.x = 2print Parent.x, Child1.x, Child2.x

Parent.x = 3print Parent.x, Child1.x, Child2.x

Output:

1 1 1

1 2 1

3 2 3

Linear probing, quadratic probing, zipper law, belong to the second hash hash collision Solution

Software projects are stored in / ftproot, apache allows the user to modify all programs, settings command access:

chmod apache -R /ftproot

Where -r is recursive subdirectory

socket communication is not necessarily a need to establish a connection

The client socket port is not fixed, and the socket server port is fixed

Used to describe the ip address port socket is a communication chain sentence Bing

createEvent, createFile, createSemaPhore can return windows kernel objects

Forced to uninstall the software parameters need to have installed: rpm -e --nodeps

Database design, the view (View) such that we can be one or more data table defines a particular form of expression, behavior and data view on the table nothing special distinction, may use basic select, insert, update commands to modify the data , but the update operation, there are some limitations, have restricted reasons:

1:00 If you view the data in from multiple word table

2 Initialization view definition select statement contains group by, distinct, limit, or the like having a command

Guess you like

Origin blog.51cto.com/14214237/2402256