The first telephone interview of my life

  9:00 this morning received a telephone interview of Ali Baba, I would have thought that there is no hope of things, suddenly came a little surprise, so accidentally excited, people asked me if I was not convenient to answer the phone, I resolutely the easy answer, because the results are unprepared to answer mess. Although I think he is a rookie, but should not be so bad answer, finally understand how their knowledge is not solid, and before learning things that are floating on the surface of the future must be earnest, steadfast to any one learning knowledge.

  This is my first time ever in a telephone interview, also for the first time ever a more formal job interview (although some time ago Tencent participated in the interview, but for some reason there is a very surface water), this interview for me it should be has a remarkable sense of it!

  First of all, I am grateful today the examiner, he spoke very moderate, has been encouraging me, when I will not also persuasive. Even though I was down the whole answer very well, but the interview has left a very good impression, but also for Alibaba left a good impression. It made me want to go now particularly Alibaba work, I think there must be a very good corporate culture now!

 

  Having said all this nonsense, then, to talk about today's interview is what it faces. (Many of which are not remember)

1, the beginning he asked what I am familiar with the language, cooked not familiar with C ++?

      My answer is: not familiar with; he said it should also understand some of it, and then they asked me the difference between the new and malloc?

(The following is from the Internet to find the explanation)

  a) malloc and free standard library function C ++ / C language, new / delete the C ++ operator. They can be used to apply dynamic memory and free memory. 

  b) For a non-intra data type of the object, light maloc / free can not meet the requirements of the dynamic object. To automate the object constructor will be created and the object to be automatically executed destructor before dying. Since malloc / free library function is not an operator, the compiler is not within the purview of control, can not perform the task constructor and destructor imposed malloc / free. 

  c) C ++ language therefore a need to complete the dynamic memory allocation and initialization operator new, to a delete operator to complete cleaning and releasing work memory. Note that new / delete is not a library function.

  d) C ++ programs often have to call C functions, while the C program can only use malloc / free dynamic memory management

  • new is an operator, and what "+", "-", "=" ... have the same status, malloc is a function to allocate memory for your call.
  • new is a reserved word, no header file support, malloc library functions need the header file support.
  • The target is to establish a new, malloc allocation is a memory.
  • Target new build you can use it as an ordinary object, access member function, do not directly access its address space, malloc allocation is a memory area, use the pointer to access good, but can also move the pointer inside.

in short:

is a new operator, can be overloaded, malloc is a function, it may be covered;

initialize the new object, call the object's constructor function, corresponding to the respective call delete destructor, malloc allocated only memory, free recovering only memory;

See further explain "new / delete and malloc / free distinction (Comprehensive reprint)."

 

2, and then asked me the difference between the system heap and stack (not the data structure)

key point:

Stack area (stack) - allocated by the compiler automatically released, the stored function parameters, local variables, and the like. Operate similarly to a stack data structure.

Heap (heap) - typically assigned by the programmer is released, if the programmer does not release at the end of the program may be recovered by the OS. Note that it is a stack data structure totally different, it touches similar distribution list.

Details see "The difference between heap and stack [collection]."

 

3, the executable program in the system is how to implement it? Is the execution of .exe files

     We all know ExE file is an executable file, and the most common of which is the executable file under Windows, such as installing the package.

     EXE File A floating-executable program located in the operating system executable program memory space. Under MS-DOS and MS-WINDOWS, .exe file extension such binary executable WINDOWS operating system, two types one is an executable file name suffix .COM another is the .EXE. .COM generally used for DOS, execute the file in WINDOWS system are generally .EXE file.

     Exe文件的执行过程如下:

1)    shell调用CreateProcess函数来激活.exe文件。

2)    系统禅城一个“进程核心对象”,并且其计数值为1,该值是系统删除进程核心对象的依据。

3)    系统为此进程建立一个4GB的地址空间

4)    加载器将必要的文件加载到上述的地址空间中,包括.exe的程序、数据、以及所需要的动态链接库

5)    系统创建一个线程,我们称之为主线程。

6)    系统调用startup   code

7)    startup code 调用.exe 程序的入口函数WinMain

8)    exe文件开始执行

9)    用户关闭程序窗口,使winmain 中的消息循环结束,使得winmain函数结束。

10)  回到Startup code

11)  回到系统调用exitProcess 结束进程。

 

4、  线程的同步:临界区、互斥区、事件、信号量四种方式

5、  进程间通信:进程,信号,管道,消息队列,信号量,共享内存

  让给出一个进程通信的数据结构:进程控制块(当时居然没有想起来,脑袋秀逗了吧!!!)

6、  函数的调用过程:

  • 每一个进程在用户态对应一个调用栈结构(call stack)
  • 程序中每一个未完成运行的函数对应一个栈帧(stack frame),栈帧中保存函数局部变量、传递给被调函数的参数等信息
  • 栈底对应高地址,栈顶对应低地址,栈由内存高地址向低地址生长
  • 更详细的解释还有待查找整理

7、  系统函数的调用:系统函数主要是在核心态,用中断即可,传递的是函数的系统调用编号,内核为每个系统调用分配了一个唯一编号。

8、  平衡二叉树用在哪些方面:(想不起来他当时说的是什么了)二分查找么?红黑树?

9、  有向图和无向图的区别:有方向,无方向;有向图用于哪些方面:优先级队列,偏序集

10、OSI七层模型(物理层,数据链路层,网络层,传输层,会话层,表示层,应用层);socket在哪层?(应用层)

  后面还问了下我对Android,手机编程等什么的了解不,还有java,我都说不了解,然后就是问了下我干了些什么,是在学校是偏重于理论研究还是工程项目,以及项目规模和参与人数等等。

 

  还有什么我就真的记不住了,最后还是非常感谢这位面试官认真细致的态度,我看出了他是想尽量的多了解我,希望能找到可以让我通过的点,但是,我让他失望了,没有一个回答得比较好的,真的是万分抱歉~~~但是我会再接再厉的,接下来的日子里一定努力学习专业知识,提高专业素养!

  加油!Never give up!

PS:我笔试的时候报的职位是“系统工程师”

Dpfl

2013年6月4日星期二 21:12

转载于:https://www.cnblogs.com/dpflnevergiveup/archive/2013/06/04/3117946.html

Guess you like

Origin blog.csdn.net/weixin_34013044/article/details/93268158