September and participate OPPO Android Tencent interview: technical side of the dihedral + + + HR surrounded on three sides, by the summary of my face!

September and participate OPPO Android Tencent interview: technical side of the dihedral + + + HR surrounded on three sides, by the summary of my face!

Many times before I refuse to say that my experience of interviewing, resume because we are experiencing is not the same questions asked will be different, and manufacturers face interview several questions on the back light thought is quite difficult. So here to remind you not to cram, you spend a few days to memorize things, others will be able to spend a few days more than you, but we spent a few years precipitated things, people may not be able to spend a few months to catch up, I hope you do not fly already, will soar.

OPPO interview process

Direct boss hired HR departments to push the resume, resume after an interview by telephone covenant. 10:30 is about the time of the interview, so only invited half-day leave.

The first round is two interviewers take turns asking questions, the first side surface about an hour, waiting for the interviewer about ten minutes of the second plane called me to another office, also asked about two turns interviewer an hour after the plane End face similar to the one in the afternoon, the interviewer said I'll take you to the cafeteria for dinner, after dinner to help me interviewer about the HR side two points in the afternoon. Feeling very cool down the whole process, a total of three interviews, two technicals (round two interviewer), an HR surface.

Technical side

1. mmap + native log optimization?

About two performance issues traditional printed journal, a file descriptor table is repeated operations, a repeatedly to enter kernel mode, and then talk about the principle of mmap mechanism.

2. talk about Android boot process

He talks a lot, where it says ServiceManager process is used to manage system services, the interviewer said, are you sure? Not SystemServer processes to manage system services? The interviewer discussed a lot of ignorant force, and referred to the SystemUI services, referred to the desktop process, and asked how to replace the boot animation?

3. The system is how to help us find the start of the desktop application

I said, by intent, he said, is how to find what intent? I said PMS would resolve all AndroidManifest.xml apk, if parsed will be saved to package.xml will not be repeated parsing, PMS With it you can find it.

4. talk about dynamic load status page, why do so?

I said that to reduce the time xml parsing and reflection to create objects, avoiding multiple objects at the same time create do not have access, I wrote a framework in code dynamically added. Then the interviewer misunderstood what I meant, that all interfaces are written in code, that much trouble ah, later explained clearly.

The talk page refresh mechanism, what GPU debugging tools several color values ​​represent?

Surface talked about the underlying management is actually IBPQ, talked about the origin of the asynchronous signal is issued by the SurfaceFlinger hardware and software mechanisms, and talked about the content of our app interface is how to draw the submission delivered to the SurfaceFlinger. GPU debugging tools in several colors mean also talked about next.

6. Talk about the realization of the principle that the next ConcurrentHashMap

Thread-safe implementation principle adopted is segmented lock.

7. Do you know how okhttp are multiplexed connection do?

This is a network optimization problem, the same ip a connection can reuse the same port, behind a http 2.0 multiplexing asked, I can say that a tcp multiple requests, the principle of it? I did not know. Let me say at the back https.

8. The difference between an array and a linked list of said lower

9. recursive fast row and

Technical dihedral

1. Registration talk about dynamic and static registration

Static registration is to look through the package name and function name method, dynamic registration is through the registration method table, which also was asked which specific function registration table method call.

2. so the loading process is like, what kind of life cycle

This layer from java to see the source code analysis, from the ClassLoader PathList go find the target path load, but so is mapped by mmap is loaded into the virtual space. Life-cycle load library and calls JNI_OnLoad and JNI_OnUnload () method, respectively, when the library is unloaded.

3. native layer how to detect memory leaks

I said, it stands to reason that can hook function, memory, and open up the number of free memory should be the same, if not the same can suspect a memory leak. The interviewer then asked if there is no third-party tools or libraries can be detected? I said I actually wrote much in the company, I do not know what engine group is integrated framework, mainly specializes in application-layer development.

4. leakcanary principle, which objects can be used to make gc-root

Well, you say you are primarily specializes in the development of application layer, that layer of Java memory leak detection how, I say leakcanary we use, let me talk about the principle, the principle finished and asked me if I was all objects can be detected leak leakcanary get, his quote is how chain management? Back to ask you just say weak reference object will be released in gc time, what time will not be released? I then forced the ignorant, in fact, there is a memory leak when not released, I was actually short-circuited brain did not react.

5. ui how optimization?

I mainly talked about the UI from the underlying mechanism of the process of refreshing and took the side of SurfaceFlinger underlying mechanisms spoke again, the principle figured out you can do a lot of optimization, barabara said a lot, and finally talked about how to monitor UI Caton .

6. Thread consuming Caton how to listen?

The main tool used to detect, was mentioned only systrace + instrumented function approach.

7. talk about the principle of Tinker you see?

8. The most difficult problem you encountered?

I said that our project did not use dynamic loading frame, but behind U3D integration projects require dynamic loading, but only need to use resources and so dynamic loading, the function of the third library does not support our needs, I'll bite the bullet and see myself the major version of the source code, supports dynamic loading so repair replacement and repair of load dynamic resource assets, then the specific details say it again.

9. common data structure you are familiar with what? This is not a professional algorithm is how you learn?

Array, linked list, heap, binary tree, queue, stack, balanced binary tree, red-black tree, the Huffman tree, FIG. Their own reading through the brush algorithm problem here did not specifically ask algorithmic details.

10. The online feedback was generally how you deal with the problem?

The development process logs record key, get online users to log analysis.

September and participate OPPO Android Tencent interview: technical side of the dihedral + + + HR surrounded on three sides, by the summary of my face!

Tencent interview process

oppo hr 面完大约晚上九点刚下班到公司楼下来电了,问方不方便我当然说方便,就在马路边上面了大约 50 来分钟,我感觉应该是挂了的,因为过程中电话老是断加上环境又比较吵。过了整整一周到了隔周五上午接到了第二面的面试通知,约的是隔周三上午 10:30 。第二面面试官时不时的面带笑容,给人很轻松的感觉。二面完后要我稍等一下接着面三面,三面面完面试官问我下午还有事没?我们 ** (应该是领导)有点事,下午四点左右可以面第四面,具体我也没听清楚是谁我也不敢问。我说下午要上班就先回去了,下午接到 hr 电话约的是隔周二的上午。总共五轮面试含 hr 面,持续周期一个月左右。

技术一面

1.mmap + native 日志优化?

讲了传统日志打印的两个性能问题,一个是反复操作文件描述符表,一个是反复进入内核态,然后讲了 mmap 的原理机制。

2.广播和 EventBus 的区别?

说 EventBus 的实现原理是基于反射,里面管理了两张表,且代码之间关联性不大不易于维护,EventBus 不支持跨进程通信,被面试官反问你确定不支持跨进程?我说我的看的源码是不支持,面试官说那好吧。

3.常用设计模式你了解哪些?

我开始巴拉巴拉说了一大堆,其中说到了装饰设计模式,被面试官打断了,请你具体说说装饰设计模式。

4.跨进程通信有哪些?

管道,信号,信号量,文件,本地套接字,共享内存,binder 驱动

5.简单讲讲 binder 驱动吧?

从 Java 层来看就像访问本地接口一样,客户端基于 BinderProxy 服务端基于 IBinder 对象,从 native 层来看来看客户端基于 BpBinder 到 ICPThreadState 到 binder 驱动,服务端由 binder 驱动唤醒 IPCThreadSate 到 BbBinder 。然后又讲了虚拟内存、物理内存和内存映射,跨进程通信的原理是要基于内核的, 当我讲到 binder_open 、binder_mmap 和 binder_ioctl 是被面试官打断了,估计是怕我讲太久了。

6.跨进程传递大内存数据如何做?

我说 binder 肯定是不行的,因为映射的最大内存只有 1M-8K,可以采用 binder + 匿名共享内存的形式,像跨进程传递大的 bitmap 需要打开系统底层的 ashmem 机制。

7.说说 ConcurrentHashMap 的实现原理说下,初始化大小是多少?

是线程安全的,实现原理采用的是分段锁,初始化大小是 16 ,必须是 2 的幂次。

8.启动优化怎么优化?

我说了关键优化 Application ,被面试官打断了,说大家都能想到的东西你不要说了,我想听的是你能不能站在系统的角度去做一些优化,我提到了优化包体积大小能优化启动速度,优化 dex 分包能优化启动速度,可以参考最新的华为方舟编译器等等。

9.你写的 rxpay 和 rxlogin 具体怎么实现的?

一般我们集成第三方登录和第三方支付 SDK 都需要监听 onActivityResult 方法,我是参考了 RxPermission 的实现方案添加了透明 Activity 。

10.kotlin + fullter 方面的

kotlin 自己学了语法但是开发项目中没用上,fullter 我是了解了它的实现原理但是开发中也没用上。

技术二面

1.单例设计模式都写写,静态内部类是怎么保证线程安全的?

2.synchronized 底层实现原理,ReentrantLock 公平锁与非公平锁。

3.主线程等待所有线程执行完毕,再执行某个特定任务怎么实现?原理和源码看过没?

4.自定义 view 的一般流程,要注意些什么如何优化,点击事件和长按时间分别是怎么实现的?

5.四种启动模式,在源码分析中的原理是怎样的?

6.讲讲 bindService 的过程,你当初是怎么优化后台服务进程的?

7.开发中你都用到了哪些设计模式?说说当时具体的场景。为什么你要用方法工厂,另外两种呢?

8.RxJava 在使用过程中碰到了某些不友好的错误一般怎么解决?发现了内存泄露一般怎么解决分析,有没有碰到过系统服务内存泄露的问题?

9.你们用的 okhttp ?那你有没有做过一些网络优化呢?比如弱网环境。

10.给你个数 1 吧,比如 1000011 里面有几个 1 ?

11.快排了解不?最坏的情况是怎样?如果有大量重复数据怎么优化?

技术三面

1.讲讲 handler 的底层实现原理?

这么简单?问到碗里来了,后面渐渐说到延迟消息是 nativePollOnce 来处理的,在 6.0 以上用的是 epoll 方式来监听文件描述符。接着问道了为什么要用这种方案?它跟 poll 和 select 比起来有哪些优势?它是怎么监听的你看过它的内部实现原理没?反正感觉很难受了。

2.说说你做的日志记录优化?

把第一轮面试的又讲了一通,你在每个文件的最后写入了当前内容的大小,你有没有想过如果文件被破坏的情况?这种异常情况怎么处理?后面还问到了加密和压缩。

3.你看过 binder 驱动的源码,说说他的内存映射过程,说说客户端等待服务端处理返回的流程,如果要跨进程传递大内存数据你具体会怎么做?简单写一写吧。

4.在公司做过哪些优化?

内存优化,启动优化,网络优化,包体积优化,具体说说包体积优化。我提到了包体积优化不仅仅是优化了包的大小,包体积太大从安装的那一刻开始,我们的应用就可能比较慢了,因为 pms 会去拷贝解压解析我们的 apk 安装文件,会去优化我们的 dex 等等,包体积太大还会影响我们的启动速度。然后就巴拉巴拉说具体怎么做,问到了为啥混淆资源能减少包体积大小?你当时优化的时候效果是怎样的减少了多少?

5.开发过程中遇到的一些最难解决的问题?

提到了动态修复替换加载 so ,那你知道怎么修复 class 吗?怎么修复资源呢?后面又聊到了插件化,提到了 360 用的是借尸还魂,那如果我们在插件的 Androidmanifest.xml 中注册了其它属性该怎么解决,资源方面怎么处理?

6.还有什么要问我的?

个人体会

要是换几年前我也跟大家一样,感觉这些面试题估计一个也答不好,但是今天回过头再来看其实感觉也就一般般吧。当我们读小学时感觉初中知识比较难,但当我们读到高中时再回过头来看就很简单了。因此我们不必在乎现在的自己能力是否足够强,一口也是吃不成胖子的,只要今天比昨天有进步这就足够了。但道理我们都懂,可是能坚持下来的同学却比较少了,人生贵在坚持!

随着年龄的增长意味着我们的时间也越来越少了,所以我们自己心里要明白想要什么?是想成为某个领域的专家,还是想多方面发展以后做领导型人才。一个时间段往往只能做好一件事情,有舍必会有得。当我们开着拖拉机在乡村道路时,不要看着别人开着跑车就羡慕,以为拖拉机也能上高速,但内心要有换喷气式飞机的勇气和决心。

但是不用凡是都抱着得到的心态去做,就好比学习我就一定是为了进 BAT,如果是这样那当我们进了 BAT 又该如何,就好比死亡并不是代表生命的结束,学习这件事应该是终身的。只要我们能静下心来该来的自然会来,作人无甚高远事业,摆脱得俗情,便入名流;为学无甚增益工夫,减除得物累,便超圣境。

不要凡是都抱着利益的心态去做,一直以来我都是崇尚成就自己的同时去成就别人。只要自己不抱着利益的心态去做,那么便能拿得起放得下,当我想讲的时候便可以讲,不想讲的时候便可以不讲。过程中肯定会有各种疑问和怀疑,若坚持不了就放弃,但心中若有挂碍就铭记。

September and participate OPPO Android Tencent interview: technical side of the dihedral + + + HR surrounded on three sides, by the summary of my face!

最后

大厂的正常面试流程周期一般是一到两个月,就算薪资谈完到 offer 最终审批下来可能都需要一到两周,这段时间心理是比较难熬的,因此建议大家尽量不要裸辞。面试完毕一般都会透露多久给答复,如果是猎头推的多跟猎头联系,大家要尽量想办法打听到最新的动态。

二本大学也会有一流的专业,所以并不一定说一线互联网企业就是最好的,因此在面试的时候一定要问一下部门和项目,自己根据自身的情况来选择企业和项目组。一般情况下通过面试的难易程度就能判断出部门的技术沉淀,那种几乎不问技术很容易过的情况,并不见得就一定是好现象,还是得根据自身的情况和以后的打算来判断,*有时选择可能会大于努力

以上就是我要说的内容,希望以上的内容可以帮助到正在默默艰辛,遇到瓶颈且不知道怎么办的Android程序员们,希望大家在往后的工作与面试中一切顺利。

想要成长为一个移动互联网架构师,一些技能是必不可少的,小编自己在一些平台收集到了许多学习资料和个人总结的一些经验,一线互联网公司得面试经历面试题在这里分享给大家,包括不限于高级UI、性能优化、移动架构师、NDK、混合式开发(ReactNative+Weex)微信小程序、Flutter等全方面的Android进阶实践技术还有相关的面试专题PDF;希望能帮助到大家,也节省大家在网上搜索资料的时间来学习,也可以分享动态给身边好友一起学习!

Add me wx: X1524478394 (or technical qun: 887084983) receive a free Android Advanced Learner video interview topics and BAT PDF

September and participate OPPO Android Tencent interview: technical side of the dihedral + + + HR surrounded on three sides, by the summary of my face!

Relevant learning list:

  • AES encryption to make your applications unbreakable
  • Android will learn advanced analytical -retrofit source
  • Android platform face recognition artificial intelligence
  • BAT interview will ask a cross-thread communication framework kernel Secret
  • Gradle in the end how to improve the efficiency of how
  • Source Handler explain
  • Source resolve hook-source implementation of HashMap Ali flicker-free resurfacing
  • Expression package a war -Glide display Gif actual performance optimization
  • Architecture technology evolution
  • Secret Android development to enhance the efficiency tenfold weapon
  • The face of third-party SDK applications emerging, architects how to do?
  • Artificial Intelligence Identity Card Recognition
  • Advanced Learner video
  • Performance optimization of data based on track to achieve optimization of one hour of face android technology
  • Mobile Internet architecture
  • Android App comprehensive performance tuning .xmind
  • Android cutting-edge technology .xmind
  • App development framework Knowledge System (APP also objects) .xmind
  • Advanced Java language and related technology Android kernel xmind
  • Senior Advanced essential articles: xmind
  • BAT set of interview questions and answers .docx
  • Small micro-channel mixing procedures and Hybrid Development .xmind
  • Mobile Internet development syllabus .png
  • Mobile Internet syllabus .xmind

Bat interview focused on large-scale share knowledge, follow-up will continue to update the hope that through these advanced face interview questions can lower the threshold Android posts, so that more Android Android system engineers to understand and master the Android system. Like I like in trouble clicking a look ~

Guess you like

Origin blog.51cto.com/14332859/2451916