当前位置:网站首页>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 ?
边栏推荐
- PS tip: the video frame to Layer command cannot be completed because dynamiclink is not available
- Detailed explanation of settimeout() and setinterval()
- val_ Loss decreases first and then increases or does not decrease but only increases
- DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703
- [extensive reading of papers] sentimental analysis of online reviews with a hierarchical attention network
- Basic learning notes of C language
- NoViableAltException([email protected][])
- The difference between settimeout() and setinterval()
- C language & the difference between the address pointed to and the address pointed to by the pointer
- V3 01_ Welcome
猜你喜欢

MySQL back to table query optimization

XSS challenge (6-10) more detailed answers

Initial attack and defense world Misc
![[buuctf] [actf2020 freshman competition]include](/img/42/50439290177fdea5f431e315cac1a1.jpg)
[buuctf] [actf2020 freshman competition]include

Learn about data kinship JSON format design from sqlflow JSON format

@PathVariable

go channel && select

Detailed explanation of settimeout() and setinterval()

Laravel configures passport and returns token using JWT

Detailed explanation of the first three passes of upload Labs
随机推荐
The first dark spring cup dnuictf
Effect of shadow around the block after mouse over
Experiment 2: stack
DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703
Wechat applet realizes map navigation + door-to-door recycling
Minimum covering substring of two pointers
Finding the root of an integer by dichotomy
JS delete the objects in the array and specify to delete the objects
Why is the resolution of the image generated by PHP GD library 96? How to change it to 72
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
PHP generate images into Base64
Invalid argument during startup: Failed to open the . conf file: redis-window
Knowledge learned from the water resources institute project
ot initialized – call ‘refresh’ before invoking lifecycle methods via the context: Root WebApplicati
PHP 2D array change key name
[buuctf] [geek challenge 2019] secret file
JS time conversion standard format, timestamp conversion standard format
Non decreasing column
On simple code crawling Youdao translation_ 0's problem (to be solved)
Searching for single element in dichotomy