当前位置:网站首页>IO interview questions
IO interview questions
2022-06-30 14:42:00 【qq_ fifty-six million eight hundred and eighty-three thousand t】
Written interview questions :
1 file IO And standards IO The difference between
file IO yes Linux system call ( kernel API), And the standard IO yes C Library functions ;
file IO Without buffer , standard IO With buffer
file IO The operation is the file descriptor , standard IO The operation is the flow FILE
file IO And standards IO The function names used are different
2 What is flow ?、 How do you understand standards IO Flow in
The process of input and output .
The flow of data , Data has no boundaries Linux The operation on a stream is called IO operation
3 What is a file descriptor 、 Principles for using file descriptors 、 What is the maximum size of a file descriptor
ulimit –n
① Is a way to access files ② The principle of minimum distribution is generally followed ③ Used to identify the file accessed by the running program
4 What is an empty file 、 How an empty file is formed ?
An empty file is an empty file ,
5 standard IO Access to files in r,r+,w,w+,a,a+ What do you mean
6 standard IO Medium r+ Corresponding documents IO What is the way to write ?
7、 Pen test : What's the difference between a process and a program
1 The program is static , Storage immovable ; The process is dynamic , It's a running program
2 The program is on disk , The process runs in memory
3 process = Program + PCB( Process control block )+ Time slice
8、 What is write time replication technology ?
Use vfork Function to create a new child process , But it will share the address space with the parent process , When the new child process executes different code data from the parent process , Only then will the memory be copied , Create a new space , This technology becomes ” When writing copy ”-Copy on write
9、vfork What are the execution characteristics of ?
10、 fork And vfork What's the difference ?
vfork Share address space with parent process 、fork Is to open up a new address space
vfork Make it clear that the subprocess executes first
11、 fork What content of the parent process is copied by the child process ?
The user no. UIDs And user group number GIDs
Environmental Science Environment
Stack
Shared memory
Open the descriptor of the file
Close on execution (Close-on-exec) sign
The signal (Signal) Control settings
Process group number
Current working directory
root directory
Create screen word in file mode
Resource constraints
Control terminal
The child process is created , The processor allocates memory for subprocesses , Code snippet of the parent process , Data segment , The stack segment is copied to the child process
12、 Interview questions :exit Functions and _exit The difference in the use of functions
difference :_exit It's a system call ,exit It's a library call
exit Will clean up IO cache ,_exit It's a direct exit , Cache will not be cleaned up
13、
What is the child process that does not copy the parent process ?( What are unique to child processes 、 What are the child processes different from the parent process )?
14、 Please write out the process of creating a daemon
Pen test :
Face to face examination questions : What is Daemons ?
Which resources of the process are shared by threads ?
Which resources of a process cannot be accessed by a thread ?
2 Which resources of the process are shared by threads ?
• Executable instructions
• Static data , Global data
• File descriptor opened in process
• Signal processing functions
• Current working directory
• user ID
• User group ID
3 Resources owned independently by threads ?
Threads ID (TID)
PC( Program counter ) And related registers
Stack
• local variable
• The return address
Error number (errno)
Signal mask and priority
Execution status and properties
Interview questions :
Why should the corresponding read and write ends be closed in the respective processes when the anonymous pipes are used ?
1 To achieve half duplex
2 In order to avoid programmer misoperation
Interview questions : What should be paid attention to when using pipeline files ?
If there is more than one write , A read , Write first and then read , The read content is the last written content .
If there is more than one write , A read , Read first and then write , The read content is the content written at the beginning .
If it is a write , Multiple reading . Write first and then read , Start the process to read first .
If it is a write , Multiple reading . Read first and then write , After starting the reading process, the content is read , Start the reading process to read the subsequent contents , If the post read process finishes reading the contents written , Then the read result of the later started process is 0
Pen test : Please describe in detail OSI Seven layer model ?
Please explain OSI The seven story model and TCP/IP The difference between the four layer model ?
边栏推荐
- jsPlumb. Deleteeveryconnection is not a function & jsplumb clear canvas jsplumb delete all nodes and all connections
- For loop and promise to solve the problem of concurrent callback
- Laravel upload error
- Knowledge learned from the water resources institute project
- Zend studio how to import an existing project
- ot initialized – call ‘refresh’ before invoking lifecycle methods via the context: Root WebApplicati
- In situ merging of two arrays with two pointers
- Not satisfied with markdown native code block style? Try this beautify code screenshot tool~~
- Lihongyi machine learning 2020 homework summary
- On simple code crawling Youdao translation_ 0's problem (to be solved)
猜你喜欢

2021-07-14 mybaitsplus

ThinkPHP v3.2 comment annotation injection write shell

Lihongyi machine learning 2020 homework summary

KnightCTF WEB

Crypto questions

CCF string matching (Full Score code + problem solving ideas + skill summary) March 3, 2014

After the MySQL service on the local computer is started and stopped, some services will automatically stop when they are not used by other services or programs

V3 03_ Getting started

Detailed explanation of settimeout() and setinterval()

Upgrade centos7 mysql5.5 to mysql5.7 non RPM in the form of tar package
随机推荐
Not satisfied with markdown native code block style? Try this beautify code screenshot tool~~
Clear the route cache in Vue
@ResponseBody的作用
JS time conversion standard format, timestamp conversion standard format
Race of golang
Effect of shadow around the block after mouse over
DiceCTF - knock-knock
XSS challenge (1-5) more detailed answers
Introduction to the construction and development of composer private warehouse
Finding the median of two arrays by dichotomy
ot initialized – call ‘refresh’ before invoking lifecycle methods via the context: Root WebApplicati
Laravel artist command error
Error $(...) size is not a function
Fastcgi CGI shallow understanding
Is it troublesome for CITIC futures to open an account? Is it safe? How much is the handling charge for opening an account for futures? Can you offer a discount
Notes on reverse learning in the first week of winter vacation
Learn about data kinship JSON format design from sqlflow JSON format
PHP recursive multi-level classification, infinite classification
[extensive reading of papers] a delicious recipe analysis framework for exploring multi modal recipes with variable attributes
2021-08-05 leetcode notes