• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/55

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

55 Cards in this Set

  • Front
  • Back

fork

A system call th­­at creates a new process by creating a logical copy of the current process. Each copy has a return value the child is 0, the parent is the childs PID.

kernel

The part of the operating system that runs in supervisor mode on the CPU and has the code that is run for all interrupts. First thing that loads after boot. Determines how everything else runs by allocating memory for each process which is called virtualization.


file

A stream of bytes associated with a hierarchical name. Stored in kernel, location is stored in inode numbers.

system calls

The API used by a process to access outside resources (disk/user input/network) that are inside the kernel.

shell variables

A variable that can only be accessed within the current shell.

environment variables

Process specific. A variable that can be accessed within the current process and in child processes (unless filtered).

zombie process

A process that has terminated but its parent has not retrieved its return value.

library

An indexed collection of object files that may be linked into a program. Contains a bunch of functions that may be needed for reuse. Ex. C std lib

execve

A system call that loads an executable into the current process and runs it (erasing the process's old code and data).

thread

A schedulable entity with its own CPU context that can share its memory with other schedulable entities.

signals

A type of inter-process communication that is also used in UNIX to manage processes. The signal is sent through the kernel to get to the other process. Interrupt signal, kill signal... when the

function call

Compile time, calling a function. (An invocation of code present inside of a process that was included when the program was compiled.)

library call

Run time, calling a function that we have to get dynamically from a library by going outside of the program. (An invocation of code present inside of a process that was loaded into the process at runtime. A function used that came from a library.)

process

a running program that thinks it has its own cpu. It has it's own memory location and it's own register state. (The main abstraction for running programs that gives each program its own memory and virtual CPU.)

filesystem

A hierarchical collection of key/value pairs, where the values are inodes - that point to the metadata - which helps locate the file - which is a streams of bytes of arbitrary length. The key is the file name.

init

The booting component that takes parts of the kernel and puts them where they belong its a setup. it runs on a UNIX-like system.

wait

It is called by a parent when the child has terminated to receive the return value (PID) to free the process resources like memory. ( A system call to get the return value of a process that has terminated.)

disk

a device for storing data. Example of a block device because it stores data in blocks.

device driver

The computer that's in the device that provides an API on how to actually use the device. (Code that runs in the kernel and abstracts access to a specific piece of hardware.)


kernel module

Attachment to the kernel that modifies it - the project we have to do is create one - can be loaded and unloaded, easy to use which is why they've been made. (Code that is loaded into to the kernel at runtime in order to add (or change) kernel functionality)

fsck

If files may have been corrupted, you can go here to check, and also retrieve other informations - check/repair.

root filesystem

The home directory of a filesystem that all of the other filesystems spawn from ( A set of files and directories that must exist on every UNIX system. )

make

A program that directs the compilation of other programs.

block device

buffered IO device that stores information/data. A UNIX device abstraction that is primarily used for persistent storage devices. Not the hard drive itself but the information the hard drive needs to store in a buffered block.

character device

Non buffered/stored data. A UNIX device abstraction that allows byte-level access to hardware (input and/or output). It is often used today to represent keyboards, mice, and printers.

root user

The user account on a UNIX system with the highest level of privileges.

superblock

The inode of the filesystem. The block that stores metadata about a filesystem needed to properly mount it.

inode

Metadata about a file. Contains location in memory(to allow access), size etc. Defines the structure of the file where as the data defines what is put into the structure. (An on-disk data structure that stores file metadata including length, modification times, and ownership information.)

extents

Sequential ranges of blocks used to store file data.

logical size of a file

The size of a file as seen by a program accessing that file. Actual file size in bytes. (Note: Physical size is the size of the total number of blocks needed to store it. )

kernel oops

Null exception error in the kernel space. Happens when the kernel detects an internal error, such as access to an illegal memory location, that can generally be recovered from. It produces a certain error log.

pseudo tty

Teletype interface, way of communicating with the terminal like a virtual keyboard. Like a terminal, means to send input to the computer (A UNIX device that virtualizes keyboard input and text output.)

/proc

A virtual filesystem (into ram instead of in persistent storage) that allows access to kernel state in mostly human-readable formats.

/sys

A virtual filesystem that allows access to kernel state where every file stores exactly one value.

mount

Command to make thecontents of a filesystem accessible.

rmmod

Command that unloads a module from the currently running kernel.

ls -lt | head

a command that lists the recently modified files in a directory.

lsmod

a command for listing the modules loaded into the kernel

/dev

The part of the filesystem normally used to give names to connected hardware. Provides interfaces that are the names so you can access them, the device drivers might live in here.

what can the kernel do that regular processes cant?

Make syscalls, access kernel space, use reserved hardware resources, schedule the CPU.

why wouldn't you want to do things inside the kernel

Because it can get complicated and risky. A bunk program can peace out but a bunk kernel module could mess it up.

device files

dd is used to make this interface for device drivers. Only used for peripherals. Block and character devices are examples.


how does mounting change the filesystem hierarchy?

when you mount a filesystem you're expanding the root filesystem.

where are permissions stored?

the inode because it has all of the metadata.

why cant you make a system call using a function call mechanism

someone email anil about this or post on the forum lol.

how do you create and destroy a process?

create: run a program - fork, execve
destroy: kill -9


how to create and destroy processes

The Process API – what must be included in any interface of an operating system:Create: method to create new processes, when you type a cmd into the shell or click on an icon, the os is invoked to creake a new process to run the program you have indicated.Destroy: systems provide an interface to destroy processes forcefully. Many processes will run and exit when complete;but when they don’t the user can kill them; making a interface to halt a process useful.Wait: sometimes useful towait for a process to stop running.Miscellaneous Control: anything other than basics. Ex: most operating systems provide some method to suspend a process then resume it.Status: interface to get some status information about a process. Ex: runtime, state.

Process States: at a given time a process can be in one of the following three states
Running: a process is running on a processor and executing instructions.Ready: a process is ready to run but the OS has not chosen to run it yet at the moment.Blocked: a process has performed some operation that makes it not ready to run until another event takes place like maybe an I/O request on a disk blocks the process so another process uses the processor.

strace



system call tracer

ltrace

library call tracer

how do you load program binaries?

compile it first.

how are libraries incorporated into programs?

statically linked or dynamically linked.

Statically Linked

at compile time. Statically compiled programs are much larger in size.

Dynamically linked

at runtime.

how are processes controlled using signals, command line variables, and environment variables?

Signals can tell the process what to do. Cmd line variables
Environment variables