CSE 222: All Questions

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 93

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

94 Terms

1

What is a directory?

A directory is a file system structure that contains references to other files and directories.

New cards
2

What is a thread?

A thread is the smallest unit of processing that can be scheduled by an operating system.

New cards
3

What information is stored in /etc/passwd?

The /etc/passwd file stores user account information including username, password, user ID, group ID, and home directory.

New cards
4

What are the permission bits of a file?

Permission bits of a file determine the access rights for the owner, group, and others, including read, write, and execute permissions.

New cards
5

What is a child process?

A child process is a process created by another process (the parent) during execution.

New cards
6

What is a kernel?

The kernel is the core component of an operating system that manages system resources and communication between hardware and software.

New cards
7

Name three types of files in Unix.

Regular files, directories, and special files (such as device files).

New cards
8

What is a shell?

A shell is a command-line interface that allows users to interact with the operating system.

New cards
9

What is an i-node?

An i-node is a data structure on a filesystem that stores information about a file or directory, including its size, ownership, and location on disk.

New cards
10

What is a process?

A process is an instance of a program in execution, which includes the program code and its current activity.

New cards
11

What is a umask?

A umask is a default file permission setting that determines the permissions assigned to newly created files and directories.

New cards
12

What are some ways an open call can fail?

An open call can fail due to reasons such as the file not existing, insufficient permissions, or reaching the maximum number of open files.

New cards
13

What does read return when at the end of a file?

When read reaches the end of a file, it returns 0 bytes, indicating that there is no more data to read.

New cards
14

What is a hole?

A hole in a file is a region that has not been allocated any data, resulting in a sparse file.

New cards
15

What are the three ways lseek can use to adjust the file offset?

lseek can adjust the file offset using SEEK_SET, SEEK_CUR, and SEEK_END.

New cards
16

What are the benefits of providing system calls in Unix?

System calls provide a controlled interface for user programs to request services from the kernel.

New cards
17

How do most system calls behave during a failure?

Most system calls return -1 and set the errno variable to indicate the error.

New cards
18

What are some appropriate error handling mechanisms?

Appropriate error handling mechanisms include checking return values, using errno, and implementing retries.

New cards
19

What is the difference between a file descriptor and an open file description?

A file descriptor is a unique identifier for an open file, while an open file description contains the actual file state and attributes.

New cards
20

What are the mandatory flags for opening a file?

Mandatory flags include O_RDONLY, O_WRONLY, and O_RDWR.

New cards
21

What is synchronous IO?

Synchronous IO is a type of input/output operation where the execution of the program is blocked until the operation completes.

New cards
22

What is synchronized IO?

Synchronized IO refers to operations that ensure data is fully transferred or processed before the program continues.

New cards
23

What information does ls with the long option provide?

The ls -l command provides detailed information about files, including permissions, number of links, owner, group, size, and modification date.

New cards
24

What can be found in the /var/log directory?

The /var/log directory contains log files generated by the system and applications.

New cards
25

What type of entries can be found in section 5 of the man pages?

Section 5 of the man pages contains file formats and conventions.

New cards
26

What unix command is used to modify file permissions?

The chmod command is used to modify file permissions.

New cards
27

What is the difference between du and df?

du reports the disk usage of files and directories, while df reports the available disk space on filesystems.

New cards
28

What is in /etc/issue?

The /etc/issue file contains a message or system identification to be printed before the login prompt.

New cards
29

What is the path variable used for in Unix?

The path variable specifies the directories in which the shell looks for executable files.

New cards
30

What Unix program can tell you how to use the cp command?

The man command can be used to access the manual pages for the cp command.

New cards
31

What is in /etc/fstab?

The /etc/fstab file contains information about filesystems and their mount points.

New cards
32

What unix command will search a file system for files?

The find command is used to search a file system for files.

New cards
33

What is double buffering?

Double buffering in terms of reading refers to using two buffers to manage data input: one buffer is actively used for reading data, while the other buffer is being filled in the background. Once the active buffer is full, it is processed, and the second buffer becomes the active one, ensuring continuous reading without delays or interruptions.

New cards
34

What happens when unlink deletes a file?

When unlink deletes a file, it removes the directory entry and decreases the link count; if the count reaches zero, the file is deleted from the filesystem.

New cards
35

What type of entries can be found in section 2 of the man pages?

Section 2 of the man pages contains system calls.

New cards
36

What is a unit test?

A unit test is a type of software testing that focuses on verifying the functionality of a specific section of code.

New cards
37

What is an integration test?

An integration test checks the interaction between different components or systems to ensure they work together correctly.

New cards
38

What does make do?

The make command automates the process of building and managing dependencies in software projects.

New cards
39

What program will check for style compliance?

The lint program checks for style compliance in code.

New cards
40

What is an implicit rule in make?

An implicit rule in make is a predefined rule that specifies how to build a target from its source files.

New cards
41

What is in /dev/zero?

/dev/zero is a special file that provides as many null bytes (zeroes) as are read from it.

New cards
42

What modes can raw file system data can be accessed?

Raw file system data can be accessed in character mode and block mode.

New cards
43

What is in /etc/sudoers?

The /etc/sudoers file contains configuration settings that define which users or groups have permission to execute commands with elevated privileges using sudo.

New cards
44

What type of entries can be found in section 4 of the man pages?

Section 4 of the man pages contains special files and drivers.

New cards
45

What functionality does the mount command provide?

The mount command attaches a filesystem to a specified mount point in the directory tree.

New cards
46

What is the difference between a hard link and a symbolic link?

A hard link points directly to the inode of a file, while a symbolic link is a reference to another file by its pathname.

New cards
47

Why must maximum path length be dynamically calculated?

Maximum path length must be dynamically calculated to accommodate varying filesystem structures and configurations.

New cards
48

What are some information stored in an i-node?

An i-node stores information such as file type, permissions, ownership, size, and pointers to data blocks.

New cards
49

How do you process a directory?

To process a directory, you typically open it, read its entries, and perform actions based on those entries.

New cards
50

What type of entries can be found in section 6 of the man pages?

Section 6 of the man pages contains games and demonstrations.

New cards
51

What is a tech lead?

A tech lead is a senior engineer responsible for guiding the technical direction of a project and mentoring team members.

New cards
52

What is a project manager?

A project manager is responsible for planning, executing, and closing projects, ensuring they meet deadlines and budgets.

New cards
53

What is a stand up meeting?

A stand up meeting is a brief daily meeting where team members share updates on their work and any obstacles they face.

New cards
54

What is a sprint?

A sprint is a set period during which specific work has to be completed and made ready for review in Agile project management.

New cards
55

What does sed do?

sed is a stream editor used to perform basic text transformations on an input stream.

New cards
56

What is a superblock?

A superblock is a data structure that contains information about a filesystem, such as its size, status, and location of the i-node table.

New cards
57

What does mount do?

The mount command attaches a filesystem to the directory tree, making it accessible to the system.

New cards
58

What command will report i-node usage?

The df -i command reports i-node usage on filesystems.

New cards
59

What is i-node 2 reserved for?

i-node 2 is typically reserved for the root directory in a filesystem.

New cards
60

What is in /dev/random?

/dev/random is a special file that provides random bytes generated from environmental noise.

New cards
61

What is a group?

A group is a collection of users that can be assigned permissions collectively.

New cards
62

How do you change the owner of a file?

You can change the owner of a file using the chown command.

New cards
63

How do you test if you can use a file?

The access() system call checks a process's permissions for a specified file.

New cards
64

What does the last command do?

The last command displays a list of the most recent user logins.

New cards
65

What are the two areas we can get dynamic memory from?

Dynamic memory can be allocated from the heap or the stack.

New cards
66

What Unix command will tell us how memory is currently used?

The free command provides information about memory usage.

New cards
67

What is the program break?

The program break is the end of the process's data segment, indicating the limit of dynamically allocated memory.

New cards
68

What is a memory block used by malloc?

A memory block used by malloc is a contiguous section of memory allocated for use by the program.

New cards
69

What is coalescing?

Coalescing is the process of merging adjacent free memory blocks to create larger contiguous blocks.

New cards
70

What does calloc do?

calloc allocates memory for an array of elements and initializes all bytes to zero.

New cards
71

What does realloc do?

realloc changes the size of previously allocated memory, preserving the contents.

New cards
72

What does alloca do?

alloca allocates memory on the stack that is automatically freed when the function returns.

New cards
73

How does the malloc strategy first fit work?

The first fit strategy allocates the first block of memory that is large enough to satisfy the request.

New cards
74

What type of entries can be found in section 1 of the man pages?

Section 1 of the man pages contains user commands.

New cards
75

What are the four ways to terminate a process?

A process can be terminated by exit, abort, kill, or returning from main.

New cards
76

What happens when a process exits via system call?

When a process exits via a system call, it performs cleanup and releases resources before terminating.

New cards
77

What happens when a process's main returns?

When a process's main returns, the process terminates, the return value is passed as the exit status to the operating system, and the operating system cleans up allocated resources.

New cards
78

What does atexit do?

atexit registers functions to be called on normal program termination.

New cards
79

What command allows you to change the scheduling priority of a program or process?

The nice command allows you to change the scheduling priority.

New cards
80

What command will tell you the path of a command?

The which command will tell you the path of a command.

New cards
81

How do you create a new Unix process?

You create a new Unix process using the fork system call.

New cards
82

What states can a process be in?

A process can be in states such as running, runnable, sleeping, stopped, or zombie.

New cards
83

How does a parent process find out about its child?

A parent process can find out about its child through wait system calls or after a fork(), which will return the child process's ID to the parent.

New cards
84

How do you load a program?

A program is loaded into memory using the exec family of functions. The OS reads the executable file from storage, allocates memory for the program's code and data, and then transfers control to the program's entry point.

New cards
85

What information is provided to a running program?

A running program is provided with its command-line arguments and environment variables.

New cards
86

What command is used to see the current environment?

The env command is used to see the current environment.

New cards
87

How is the environment stored?

The environment is stored as an array of strings, each representing a key-value pair.

New cards
88

What are the variants to exec?

Variants to exec include execv, execvp, execve, and execl.

New cards
89

How do you access environment values in the shell?

Environment values in the shell can be accessed using the syntax $VARIABLE_NAME.

New cards
90

What is a signal?

A signal is a limited form of inter-process communication used to notify a process that a specific event has occurred.

New cards
91

What are the two signal handler macros?

The two signal handler macros are SIG_DFL and SIG_IGN. SIG_DFL is the default action for the signal and SIG_IGN ignores the signal.

New cards
92

How do you send a signal from the command line?

You can send a signal from the command line using the kill command.

New cards
93

What signal does ctrl-c generate?

Ctrl-C generates the SIGINT signal. By default, this signal causes the process to terminate, but the process can handle it by setting up a custom signal handler using the signal() system call, allowing it to perform specific actions before terminating or even ignore the signal.

New cards
94

What is a signal mask?

A signal mask is a set of signals that are blocked from being delivered to a process.

New cards

Explore top notes

note Note
studied byStudied by 18 people
60 days ago
5.0(1)
note Note
studied byStudied by 125 people
706 days ago
4.5(4)
note Note
studied byStudied by 15 people
788 days ago
5.0(1)
note Note
studied byStudied by 2 people
67 days ago
5.0(1)
note Note
studied byStudied by 40 people
941 days ago
5.0(3)
note Note
studied byStudied by 12 people
661 days ago
5.0(1)
note Note
studied byStudied by 29 people
962 days ago
5.0(1)
note Note
studied byStudied by 505 people
59 minutes ago
4.8(5)

Explore top flashcards

flashcards Flashcard (34)
studied byStudied by 10 people
148 days ago
5.0(1)
flashcards Flashcard (80)
studied byStudied by 5 people
483 days ago
5.0(1)
flashcards Flashcard (124)
studied byStudied by 35 people
427 days ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 8 people
396 days ago
5.0(1)
flashcards Flashcard (59)
studied byStudied by 11 people
774 days ago
5.0(1)
flashcards Flashcard (37)
studied byStudied by 4 people
767 days ago
5.0(1)
flashcards Flashcard (59)
studied byStudied by 4 people
233 days ago
5.0(1)
flashcards Flashcard (94)
studied byStudied by 85 people
14 days ago
5.0(1)
robot