Several Frequently Asked Questions

Source: Internet
Author: User

What is the role of the subnet mask?

The subnet mask is used to determine whether two hosts need to communicate with each other through network forwarding. If the two hosts need to communicate with each other in the same subnet, they can directly communicate with each other, if the two hosts that need to communicate are not in the same subnet, you need to find a path for communication.

 

In DOTNET, what is managed code and managed data?

Managed code is the code written to support runtime services in public languages. To support these services, the Code must provide the minimum level of information (metadata) to the runtime ).

Managed Data is closely related to managed code. Managed Data is the data that is allocated and released by the garbage collector when the public language is running.

 

What is the difference between const and readonly in C?

Const and static readonly are indeed very similar: access through the class name rather than the object name, read-only in the program, and so on. In most cases, they can be mixed. The essential difference between the two is that the const value is determined during compilation, so it can only be specified through a constant expression during declaration. Static readonly calculates its value during running, so it can be assigned a value through a static constructor.

 

The third paradigm of the database?

First paradigm: each row in a table must have only unique row values. Each column in a row has only unique values and is atomic.

Second paradigm: the second paradigm requires that non-primary key columns are subsets of primary keys, and non-primary key column activities must fully rely on the entire primary key. A primary key must have a unique element. A primary key can consist of one or more columns with unique values. Once created, the primary key cannot be changed. The foreign key is associated with the primary key of a table. The relationship between the primary and Foreign keys indicates a one-to-many relationship.

Third paradigm: the third paradigm requires that non-primary key columns do not depend on each other.

 

What are the advantages and disadvantages of the simple factory model?

The factory does not provide the logic for new products. You must modify the source code, add the logic for creating new products in the IF language, and re-compile the system. This is in violation of the "Opening and Closing principle". How can we avoid violating the principle? The other two models of the factory method model have made a solution.

The advantage of the simple factory mode is that it is easy to implement and there is no need to use a complex mode for some systems that are simple.

 

What is the difference between the keywords struct and union?

Sometimes we need to combine different types of data into an organic whole for reference. At this time, we need to use struct.

The definition of a shared object is similar to that of a struct, but the reserved words used are different. The biggest difference is: shared fitness allows several types of data to share the same memory space (that is, each member cannot output data together ).

 

What is the difference between fopen and open?

Open is a system call, And fopen is a function call.

Open is not buffered, and fopen is buffered.

Frequent open operations are slow, and data must be refreshed after fopen operations.

 

Which of the following methods is the easiest to solve the deadlock problem? Which method makes the resource utilization the highest?

There are four methods to solve deadlocks: preventing deadlocks, avoiding deadlocks, Detecting deadlocks, and removing deadlocks.

Prevention of deadlock is the easiest way to achieve it. Avoiding deadlocks leads to the highest resource utilization rate.

 

In a single-processor environment, which communication methods are available between processes?

The communication mode of the shared storage system.

The communication mode of the message transmission system.

MPs queue communication mode.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.