Chapter 9 Flashcards

1
Q

Explain pipe

A

For communication between related processes on the system.

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

Explain named pipe (FIFO)

A

For communication between related or unrelated processes on the system. It will be a file.

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

Explain socket

A

For communication between related or unrelated processes on the same system of different systems.

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

What is read system call

A

It is for reading from a file

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

What is write system call

A

It is for writing through a file

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

What is close system call

A

It is for close a file

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

There are 3 parameters for opening a file, one is oflag, what is oflag

A

oflag specifies the purpose of opening a file

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

There are 3 parameters for opening a file, one is mode, what is mode

A

mode specifies the permissions

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

What is meaning when read hit 0

A

It means it is at the end of file

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

What are possible errors/call fail for file writing

A
  • Invalid arguments
  • file size limit
  • Disk is full
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is file table

A

This table is used during file operations

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

What is inode table

A

This table is used during file operations. Every unique file has a unique inode. It holds the attributes of file.

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

What are 3 files that Linux/UNIX opened it automatically for every process

A

These are called standard files. Standard input, standard output and standard error

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

What are standard file descriptors

A

The descriptors of standard files. It value is 0 for standard input, 1 for standard output and 2 for standard error.

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

When can pipe call fail

A
  • at least 2 slots not empty in PPFDT
  • Buffer space not available in the kernel
  • File table is full
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Does pipe are capable to use full duplex communication but normally they are half-duplex channel

A

Yes

17
Q

What is size of pipe in Linux

A

4 kb

18
Q

What is size of pipe in suns solaris

A

5 kb

19
Q

What is Perror library call

A

For more meaningful messages

20
Q

Can we connect 2 commands with pipe

A

Yes

21
Q

Which command display content of file on screen

A

cat/dir/filename