如題慰毅,應(yīng)屆生除了要良好地掌握算法和數(shù)據(jù)結(jié)構(gòu)以外,以下一些技能點(diǎn)列表希望對(duì)大家有幫助扎阶,有興趣的朋友可以參考這個(gè)針對(duì)性地補(bǔ)缺補(bǔ)差汹胃。文章列出的技能點(diǎn)有的要求熟悉,有的了解即可东臀,注意技能點(diǎn)前面的修飾詞着饥。如果沒(méi)有明確給出“熟悉”“了解”等字眼,要求均為熟悉惰赋。
一宰掉、操作系統(tǒng)方面
多線程相關(guān)與線程之間同步技術(shù)
熟練使用(但不局限于)以下linux API
linux下的線程創(chuàng)建、等待赁濒、獲取線程id
1 int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg);
2 int pthread_join(pthread_t thread, void **retval);
3 pthread_t pthread_self(void);
常見(jiàn)線程之間的同步技術(shù)(何時(shí)該用那種技術(shù))
互斥體
1 int pthread_mutex_init(pthread_mutex_t* mutex, const pthread_mutexattr_t* mutexattr);
2 int pthread_mutex_destroy(pthread_mutex_t* mutex);
3 int pthread_mutex_lock(pthread_mutex_t *mutex);
4 int pthread_mutex_trylock(pthread_mutex_t* mutex);
5 int pthread_mutex_unlock(pthread_mutex_t* mutex);
信號(hào)量
1 int sem_init(sem_t* sem,int pshared,unsigned int value);
2 int sem_destroy(sem_t* sem);
3 int sem_wait(sem_t* sem);
4 int sem_post(sem_t* sem);
5 int sem_getvalue(sem_t* sem, int* valp);
條件變量
1 int pthread_cond_init(pthread_cond_t* restrict cond,const pthread_condattr_t* restrict attr);
2 int pthread_cond_destroy(pthread_cond_t* cond);
3 int pthread_cond_signal(pthread_cond_t* cond);
4 int pthread_cond_broadcast(pthread_cond_t* cond);
5 int pthread_cond_wait(pthread_cond_t* restrictcond, pthread_mutex_t* restrictmutex);
6 int pthread_cond_timedwait(pthread_cond_t* restrictcond,pthread_mutex_t* restrict mutex, const struct timespec *restrict abstime);
讀寫(xiě)/自旋鎖
1 int pthread_rwlock_init(pthread_rwlock_t* restrict rwlock, const pthread_rwlockattr_t* restrict attr);
2 int pthread_rwlock_destroy(pthread_rwlock_t* rwlock);
3 int pthread_rwlock_rdlock(pthread_rwlock_t* rwlock);
4 int pthread_rwlock_tryrdlock(pthread_rwlock_t* rwlock);
5 int pthread_rwlock_wrlock(pthread_rwlock_t* rwlock);
6 int pthread_rwlock_trywrlock(pthread_rwlock_t* rwlock);
7 int pthread_rwlock_unlock(pthread_rwlock_t* rwlock);
//以下這兩個(gè)函數(shù)在Linux和Mac的man文檔里都沒(méi)有轨奄,新版的pthread.h里面也沒(méi)有,舊版的能找到
9 int pthread_rwlock_timedrdlock_np(pthread_rwlock_t* rwlock, conststruct timespec *deltatime);
10 int pthread_rwlock_timedwrlock_np(pthread_rwlock_t* rwlock, const struct timespec * deltatime);
11 int pthread_spin_init(__pthread_spinlock_t* __lock, int__pshared);
12 int pthread_spin_destroy(__pthread_spinlock_t* __lock);
13 int pthread_spin_trylock(__pthread_spinlock_t* __lock);
14 int pthread_spin_unlock(__pthread_spinlock_t* __lock);
15 int pthread_spin_lock(__pthread_spinlock_t* __lock);
熟悉守護(hù)進(jìn)程的創(chuàng)建拒炎、原理
了解計(jì)劃作業(yè)crontab
熟悉進(jìn)程挪拟、線程狀態(tài)查看命令(top、strace击你、pstack)
熟悉內(nèi)存狀態(tài)查看命令memstat玉组、free
熟悉IO狀態(tài)查看命令iostat、df丁侄、du
了解linux文件的權(quán)限惯雳、用戶、時(shí)間(ctime鸿摇、mtime吨凑、atime)、inode等文件基本屬性户辱,熟練使用chmod、chown糙臼、chgrp等基本命令庐镐。
熟悉文件傳輸命令scp、rz变逃、sz命令必逆、
熟悉文件定位命令find、whereis命令。
熟悉軟鏈接名眉,熟悉ln命令粟矿。
熟悉lsof命令。
二损拢、網(wǎng)絡(luò)
熟悉tcp狀態(tài)機(jī)(三次握手陌粹、四次揮手)。
熟悉tcpdump命令福压。
熟悉網(wǎng)絡(luò)狀態(tài)和防火墻狀態(tài)查看命令:netstat掏秩、ifconfig、iptables
熟悉socket API荆姆,包括但不限于(connect蒙幻、accept、bind胆筒、listen邮破、send/sendto、recv/recvfrom仆救、select抒和、gethostbyname)
1 int connect(int sockfd,const struct sockaddr *addr, socklen_t addrlen);
2 int accept(int sockfd, struct sockaddr *addr, socklen_t* addrlen);
3 int bind(int socket,const struct sockaddr *address, socklen_t address_len);
4 int listen(int sockfd, int backlog);
5 ssize_t send(int sockfd, const void* buf, size_t len, int flags);
6 ssize_t sendto(int sockfd, const void* buf, size_t len,int flags, const struct sockaddr *dest_addr, socklen_t addrlen);
7 ssize_t recv(int sockfd, void* buf,size_t len,int flags);
8 ssize_t recvfrom(int sockfd, void* buf, size_t len,int flags, struct sockaddr *src_addr, socklen_t* addrlen);
9 int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
11 void FD_CLR(int fd, fd_set *set);
12 int FD_ISSET(int fd, fd_set *set);
13 voidFD_SET(int d, fd_set *set);
14 void FD_ZERO(fd_set *set);
15 struct hostent *gethostbyname(const char* name);
熟悉epoll,熟悉水平觸發(fā)與邊緣觸發(fā)派桩。
1 int epoll_create(int size);
2 int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);
3 int epoll_wait(int epfd, struct epoll_event? *events, int maxevents, int timeout);
熟悉阻塞socket和非阻塞socket在connect构诚、send、recv等行為上的區(qū)別铆惑,如何將socket設(shè)置為非阻塞的范嘱。
三、腳本工具
了解shell基本語(yǔ)法员魏、變量操作丑蛤、函數(shù)、循環(huán)/條件判斷等程序結(jié)構(gòu)撕阎。
熟練使用文本編輯工具vi/vim受裹。
了解使用文本處理命令grep、sed虏束、cut棉饶。
了解awk命令。
四镇匀、數(shù)據(jù)庫(kù)
熟悉數(shù)據(jù)表結(jié)構(gòu)設(shè)計(jì)(三范式照藻、字段屬性)。
了解查詢優(yōu)化(索引的概念與創(chuàng)建汗侵、sql優(yōu)化)幸缕。
熟悉常見(jiàn)的mysql API函數(shù):
1 mysql_real_connect
2 mysql_select_db
3 mysql_query
4 mysql_store_result
5 mysql_free_result
6 mysql_num_rows
7 mysql_close
8 mysql_errno
五群发、編程語(yǔ)言
C/C++方面
熟悉內(nèi)存分布(堆、棧发乔、靜態(tài)/全局/局部變量熟妓、虛指針…)
熟悉Makefile。
熟悉gdb調(diào)試(斷點(diǎn)栏尚、查看內(nèi)存起愈、執(zhí)行跟蹤、了解CPU主要寄存器作用…)抵栈。
熟悉性能分析工具(gprof)告材。
熟悉C-Runtime常用函數(shù)(如字符串格式化函數(shù)printf、scanf古劲,字符串比較連接函數(shù)斥赋、內(nèi)存分配函數(shù)、文件與目錄操作函數(shù)等)产艾。
熟悉stl庫(kù)疤剑。
熟悉OO思想、常見(jiàn)設(shè)計(jì)模式(如單例模式闷堡、工廠設(shè)計(jì)模式隘膘、裝飾者模式、Builder模式杠览、生產(chǎn)者消費(fèi)者模式弯菊、策略模式等)。
熟悉RAII踱阿、pimpl慣用法管钳。
有一定的代碼質(zhì)量和重構(gòu)能力。
文章版權(quán)所有软舌,轉(zhuǎn)載請(qǐng)保留文章末尾版權(quán)信息和公眾號(hào)信息才漆。
歡迎關(guān)注公眾號(hào)『高性能服務(wù)器開(kāi)發(fā)』。如果有任何技術(shù)或者職業(yè)方面的問(wèn)題需要我提供幫助佛点,可通過(guò)這個(gè)公眾號(hào)與我取得聯(lián)系醇滥,此公眾號(hào)不僅分享高性能服務(wù)器開(kāi)發(fā)經(jīng)驗(yàn)和故事,同時(shí)也免費(fèi)為廣大技術(shù)朋友提供技術(shù)答疑和職業(yè)解惑超营,您有任何問(wèn)題都可以在微信公眾號(hào)直接留言鸳玩,我會(huì)盡快回復(fù)您。