Table of Contents
Follow-up question: If the program is cored, but no core inquiry is generated, what is the reason?

Answer: The switch for core file generation is not turned on. ulimit -c unlimit

Further question: Do you know if there is a problem with the program and a signal is generated without using the core file?

Answer: I was confused at the time, but now that I think about it, it’s just the kernel sending signals to the process. Didn't answer.

3. Can shared memory be read and written safely without using synchronization?

Answer: This question was wrongly answered, and somehow it got related to the fork. This question should not work. Shared memory is a critical area and should be synchronized. Otherwise, problems will arise if two processes operate a memory area at the same time. You can use read-write locks to synchronize.

4. After fork, what does the child process retain from the parent process?

Answer: The memory area of ​​the child process is a copy of the parent process, and the stack, etc. will be inherited, as well as open file descriptors, etc. In fact, there are many more, such as actual user ID, effective user ID, current working directory, storage mapping, etc.

5. In addition to file mapping, is there any other way to share memory?

Answer: Shared memory object mapping.

Follow-up question: What is the difference between the two?

Answer: I don’t know.

6. How does tcp implement flow control?

Answer: The peer informs the window size. The amount of data passed by the local end is smaller than the window size. (A better way is to tell the peer the size of the local window, and the amount of data transmitted by the peer must be smaller than the window)

Further question: How to tell the window size?

Answer: In the ACK message.

7. Programming question (didn’t figure it out, eh~)

Q: How to convert a decimal number (greater than 2^32) represented by a very long string into a hexadecimal string?

Ganji.com interview summary" >2. What is the .core file and what is it used for? Answer: After the program crashes, the last stack information will be stored in the core file to facilitate programmers to understand the last stack information before the program crashes.

Follow-up question: If the program is cored, but no core inquiry is generated, what is the reason?

Answer: The switch for core file generation is not turned on. ulimit -c unlimit

Further question: Do you know if there is a problem with the program and a signal is generated without using the core file?

Answer: I was confused at the time, but now that I think about it, it’s just the kernel sending signals to the process. Didn't answer.

3. Can shared memory be read and written safely without using synchronization?

Answer: This question was wrongly answered, and somehow it got related to the fork. This question should not work. Shared memory is a critical area and should be synchronized. Otherwise, problems will arise if two processes operate a memory area at the same time. You can use read-write locks to synchronize.

4. After fork, what does the child process retain from the parent process?

Answer: The memory area of ​​the child process is a copy of the parent process, and the stack, etc. will be inherited, as well as open file descriptors, etc. In fact, there are many more, such as actual user ID, effective user ID, current working directory, storage mapping, etc.

5. In addition to file mapping, is there any other way to share memory?

Answer: Shared memory object mapping.

Follow-up question: What is the difference between the two?

Answer: I don’t know.

6. How does tcp implement flow control?

Answer: The peer informs the window size. The amount of data passed by the local end is smaller than the window size. (A better way is to tell the peer the size of the local window, and the amount of data transmitted by the peer must be smaller than the window)

Further question: How to tell the window size?

Answer: In the ACK message.

7. Programming question (didn’t figure it out, eh~)

Q: How to convert a decimal number (greater than 2^32) represented by a very long string into a hexadecimal string?

Ganji.com interview summary

Home Backend Development PHP Tutorial Brother Fan's interview experience

Brother Fan's interview experience

Aug 10, 2016 am 08:48 AM
apache nbsp php quot

Sinaphp splautoloadfile_get_contentsJudge the difference between two arrays $a, $btp and Smartylinux command to view the ports opened by ApacheThe difference between apache and nginx . ..JingdongBig written test question:
  • Input an integer n, find m, m>9, the product of each digit in m = the smallest integer of n; such as n=36, m =49;
  • Non-recursive implementation of pre-order traversal of binary trees (summary of this article)
  • Find the nth number. This sequence satisfies (2^i)*(3^j)*(5^k), the first 7 They are: 2,3,4,5,6,8,10...
  • Overall, it is not particularly difficult. Except for the third additional algorithm question, which I didn’t have time to do, I feel pretty good about the other two and multiple-choice questions
    One side:
  • Does PHP have multiple threads (no, but it can be implemented in other ways), how to understand PHP
  • For static page files, should they be placed on the ngnix side or the server side (ngnix processing Static page performance is more than three times faster than apache, so it is placed directly on ngnix)
  • php writing interface, communication method, socket, http communication implementation
  • How two computers communicate, after the browser enters the url, until the page is rendered, What processes have the intermediate servers gone through? What issues should be paid attention to when using PHP as a client interface (data encryption, json transmission, etc.)? What are the characteristics of json format data (security cannot be guaranteed, and it is a unified key for all languages- value processing specifications)
  • Verification code security, Google cracks other sites
  • How to reverse md5, the encryption and reverse principles of other encryption methods
  • The principle of verification code. The implementation principle of the verification code. If the verification code is stored in the server session, then if the server disconnects from the client and then connects again (the session has expired), how to judge the correctness of the verification code after submission (in the client The same sessionid is constructed in the side js as the server side, and matches the server side sessionid when submitting)
  • How to understand the primary key of the database, is it an index?
  • What should you pay attention to when building a database (table redundancy, primary key, foreign key, index, field ...)
  • What is a database transaction?
  • If the user's bank card status is changed to the in-use status 1 while the order is being placed, what should I do if the network is suddenly disconnected when making the next payment or modifying the order status? (The interviewer is looking forward to the answer: Instead of rolling back immediately, try to retry this place several times. If it still fails, rollback)
  • What aspects should be optimized to improve performance when the request volume is large (caching, page staticization, SQL optimization, table structure, horizontal Split, vertical split)
  • Common Linux commands (file operation commands, vim commands, system commands)
  • The difference between Javascript and jquery
  • School activities, personal personality, work area adjustment, salary, etc...
  • Tencent backend development interface
  • Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

    Hot AI Tools

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Clothoff.io

    Clothoff.io

    AI clothes remover

    Video Face Swap

    Video Face Swap

    Swap faces in any video effortlessly with our completely free AI face swap tool!

    Hot Tools

    Notepad++7.3.1

    Notepad++7.3.1

    Easy-to-use and free code editor

    SublimeText3 Chinese version

    SublimeText3 Chinese version

    Chinese version, very easy to use

    Zend Studio 13.0.1

    Zend Studio 13.0.1

    Powerful PHP integrated development environment

    Dreamweaver CS6

    Dreamweaver CS6

    Visual web development tools

    SublimeText3 Mac version

    SublimeText3 Mac version

    God-level code editing software (SublimeText3)

    PHP and Python: Comparing Two Popular Programming Languages PHP and Python: Comparing Two Popular Programming Languages Apr 14, 2025 am 12:13 AM

    PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

    How to set the cgi directory in apache How to set the cgi directory in apache Apr 13, 2025 pm 01:18 PM

    To set up a CGI directory in Apache, you need to perform the following steps: Create a CGI directory such as "cgi-bin", and grant Apache write permissions. Add the "ScriptAlias" directive block in the Apache configuration file to map the CGI directory to the "/cgi-bin" URL. Restart Apache.

    How to start apache How to start apache Apr 13, 2025 pm 01:06 PM

    The steps to start Apache are as follows: Install Apache (command: sudo apt-get install apache2 or download it from the official website) Start Apache (Linux: sudo systemctl start apache2; Windows: Right-click the "Apache2.4" service and select "Start") Check whether it has been started (Linux: sudo systemctl status apache2; Windows: Check the status of the "Apache2.4" service in the service manager) Enable boot automatically (optional, Linux: sudo systemctl

    The Enduring Relevance of PHP: Is It Still Alive? The Enduring Relevance of PHP: Is It Still Alive? Apr 14, 2025 am 12:12 AM

    PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

    How to delete more than server names of apache How to delete more than server names of apache Apr 13, 2025 pm 01:09 PM

    To delete an extra ServerName directive from Apache, you can take the following steps: Identify and delete the extra ServerName directive. Restart Apache to make the changes take effect. Check the configuration file to verify changes. Test the server to make sure the problem is resolved.

    PHP: Handling Databases and Server-Side Logic PHP: Handling Databases and Server-Side Logic Apr 15, 2025 am 12:15 AM

    PHP uses MySQLi and PDO extensions to interact in database operations and server-side logic processing, and processes server-side logic through functions such as session management. 1) Use MySQLi or PDO to connect to the database and execute SQL queries. 2) Handle HTTP requests and user status through session management and other functions. 3) Use transactions to ensure the atomicity of database operations. 4) Prevent SQL injection, use exception handling and closing connections for debugging. 5) Optimize performance through indexing and cache, write highly readable code and perform error handling.

    How to view your apache version How to view your apache version Apr 13, 2025 pm 01:15 PM

    There are 3 ways to view the version on the Apache server: via the command line (apachectl -v or apache2ctl -v), check the server status page (http://<server IP or domain name>/server-status), or view the Apache configuration file (ServerVersion: Apache/<version number>).

    PHP's Purpose: Building Dynamic Websites PHP's Purpose: Building Dynamic Websites Apr 15, 2025 am 12:18 AM

    PHP is used to build dynamic websites, and its core functions include: 1. Generate dynamic content and generate web pages in real time by connecting with the database; 2. Process user interaction and form submissions, verify inputs and respond to operations; 3. Manage sessions and user authentication to provide a personalized experience; 4. Optimize performance and follow best practices to improve website efficiency and security.

    See all articles