当前位置:网站首页>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 ?
边栏推荐
- JS array
- Lost connection to the flow server (0 retries remaining): |Out of retries, exiting! Error reporting solution (flow)
- Use PHP to delete the specified text content in the file
- Alipay certificate mode payment interface
- Implement a long-click list pop-up box on apiccloud
- Summary of use of laravel DCAT admin
- Crypto questions
- CCF drawing (full mark code + problem solving ideas + skill summary) February 2, 2014
- JS to realize simple lottery function
- [buuctf] [actf2020 freshman competition]include
猜你喜欢
![[geek challenge 2019] PHP problem solving record](/img/bf/038082e8ee1c91eaf6e35add39f760.jpg)
[geek challenge 2019] PHP problem solving record

Using docker to manage MySQL services under Windows

【BUUCTF】 EasySql

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

CCF command line options (Full Score code + problem solving ideas + skill summary) March 3, 2014

Error $(...) size is not a function
![【BUUCTF】[GXYCTF2019]Ping Ping Ping1](/img/dc/4d87dfb0c2fa9cd75b54e092fd3971.jpg)
【BUUCTF】[GXYCTF2019]Ping Ping Ping1

ES6 notes

I love network security for new recruitment assessment

How does hbuilder display in columns?
随机推荐
Implement a long-click list pop-up box on apiccloud
Detailed explanation of the first three passes of upload Labs
PS cutting height 1px, Y-axis tiling background image problem
V3 01_ Welcome
The kth largest element in the sorted array
August 24, 2021 deque queue and stack
ot initialized – call ‘refresh’ before invoking lifecycle methods via the context: Root WebApplicati
PHP recursive multi-level classification, infinite classification
DiceCTF - knock-knock
The JSON data returned from the control layer to JS has a "\" translator. How to remove it
@PathVariable
Add attributes to multimode
PHP multidimensional array sorting
Pseudocode writing specification
Larave8 JWT API expiration custom error return
Greedy interval problem (5)
Not satisfied with markdown native code block style? Try this beautify code screenshot tool~~
Four isolation levels of MySQL
Querywrapper in mybaits plus
Double pointer letter matching