Chapter 10 Flashcards

1
Q

Which standard file attach with keyboard and which one attach with screen

A

input standard with keyboard

output standard and error standard with screen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Where pipe size is stored

A

Header file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is input, output and error redirection

A

We can use the Linus redirection features to detach the default files from stdin, stdout and stderr and attach other files with them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What ‘cat < phones’ command do

A

Search from phone file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to create FIFO

A

‘make fifo’ command at command line

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is special file

A

A special file is used to represent device

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are 2 types of special files

A
  1. Block special files (for those devices whose IO are block e.g. disk)
  2. Character special files (for those devices whose IO are characters)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Does FIFO must be opened before communication unlike pipe

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is SIGPIPE signal

A

SIGPIPE signal is a result when we write to FIFO that no process has opened for reading. User will get a SIGPIPE signal/broken pipe message

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Who sends EOF when multiple process write on FIFO

A

Kernel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is atomic write

A

When multiple process writes on FIFO then kernel make sure that each process writes separately and there should not be intermixing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are 2 common uses of FIFO

A
  1. Client server architecture

2. command line - pass data from one shell command to another pipeline without creating a temporary file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What mknod system call do

A

Create special (device) file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is batch job

A

Program runs at background

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What wc command do

A

Display size of file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are 3 options for wc command

A

line, words, bytes