Lektion 1 Flashcards

(80 cards)

1
Q

In X Windowing system, the application is a

A

client

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

In X Windowing system, the GUI machine is a

A

server

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

GNU means

A

GNU is Not Unix

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

GNU’s father was

A

Richard Stallman

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

GNU’s vision

A

Open and free OS

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

Unix was originally in internal project at

A

AT&T

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

Unix was originally written in

A

assembly

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

Unix was later ported to

A

C

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

Unix in C portability

A

10% had to be rewritten in assembly

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

Main variants of Unix

A

BSD-Unix and System V

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

AT&T’s Unix variant

A

System V

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

System V was developed by

A

AT&T

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

BSD was developed by

A

Berkley University

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

Sun Microsystems’ Unix variant

A

SunOS and Solaris

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

SunOS developed by

A

Sun

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

Solaris developed by

A

Sun

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

HPUX developed by

A

HP

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

AIX developed by

A

IBM

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

GPL

A

General Public License

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

copyleft

A

opposite of copyright

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

FSF

A

Free Software Foundation

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

Linus Torvald presented a Unix compatible kernel in

A

1991

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

What we call Linux, is really named

A

GNU/Linux

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

Linux is not really an OS, but

A

a kernel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
XNU
kernel of iOS
26
Kernel of iOS is
XNU
27
XNU is based on
Mach, BSD
28
a "terminal" is a
command window
29
A terminal runs
a separate shell program
30
Default Linux shell program
bash
31
bash
gnu Bourne Again SHell
32
Executed at login
~/.bash_profile
33
executed at terminal start
~/.bashrc
34
~
my home library
35
my home library
~
36
~/.bash_profile
at login
37
~/.bashrc
at terminal start
38
apropos
find man page of subject
39
bash file extension
.sh
40
file header to indicate bash script
#!/bin/bash
41
how to type ~
AltGr+ð SPACE
42
see kernel version
uname -r
43
see operating system
hostnamectl
44
Tell bash to wait for the application it started to end
no & at the end of the command
45
Tell bash to start a background application, and go on
& at the end of the command
46
show the path
echo $PATH
47
show path on separate lines
echo "${PATH//:/$'\n'}"
48
run a make file to build a program
make
49
stdio.h : no such file or directory
sudo apt-get install build-essential
50
stderr
default: terminal
51
stdout
default: terminal
52
fprintf(stderr,"...")
print to both stdout and stderr, but only once if they are the same.
53
Asynchronous operation
events happen at | unpredictable times and in an unpredictable order
54
Concurrency
sharing of resources in the same time frame
55
quantum
CPU time allocated to a process before it has to let | another process run
56
context-switch time
the time it takes to switch from executing one process to another
57
Timesharing
the illusion that several processes execute simultaneously
58
interruption
hardware flag, checked at each instruction cycle
59
An event is asynchronous to an entity
if the time at which it occurs is not determined by that | entity
60
timer
generates an interrupt after a specified interval of time (or cycles?)
61
signal
software notification of an event
62
stack canary
Known random value that must be overwritten to overwrite the return address
63
A program whose execution has started but | has not yet terminated
is a process
64
Each source file is compiled into
an object file
65
Object files are
linked with libraries to produce an executable module
66
At ececution, the executable module
is copied into a program image in main memory
67
static storage
exists for the life of the process
68
automatic storage
allocated when execution enters a block and deallocated when it leaves
69
Interactions between processes
- files - pipes - shared memory - network
70
context switch
execution switches from one process to the next
71
Threads
- execute within the same process - avoid context switches - share code and data
72
execution stack
a.k.a. call stack
73
activation record
element on the call stack. | return address, parameters, register values to be reset on return
74
void perror(const char *s);
Output to standard error gt he string and the message for the current errno
75
char *strerror(int errnum)
- returns a pointer to the system error message corresponding to the error code - produce informative messages - use it with functions that return error codes directly without setting errno - may change the static errno! (Not its parameter.) You should save and restore errno if you need to use it again! - the returned string may be overwritten by later calls.
76
restarting library
- restart.h | - r_*, eg restartng close is r_close
77
a function that allocates memory should
either free the memory | or make a pointer available to the calling program
78
Standard approaches to handling errors in UNIX
- Print out an error message and exit the program (only in main). - Return –1 or NULL, and set an error indicator such as errno. - Return an error code.
79
conditional compilation for error messages in functions
``` #define DEBUG /* comment this line out for no error messages */ int myfun(int x) { x++; #ifdef DEBUG fprintf(stderr, "The current value of x is %d\n", x); #endif } ``` Alternative: cc -DDEBUG ... om the compiler line
80
restrict
require that 'restricted' parameters not occupy the same memory (typically because parameters are changed by the function)