Quiz: Linux Basics

User Space, Kernel Space

  • Kernel/user space: which of the following statements are true?

    Statement

    True

    False

    In kernel space there exists the concept of a process

    In user space there exists the concept of a process

    Interrupts are generally serviced in user space

    Interrupts are generally serviced in kernel space

    Scheduling of processes is done by the kernel

    Address spaces are implemented in user space

  • How do programs communicate with the kernel? (One answer)

    Statement

    True

    False

    System calls

    Message queues

    IO ports

    Reverse interrupts

  • File abstraction: which concepts are represented by file decriptors?

    Statement

    True

    False

    Files

    Network sockets

    Timers

    Serial/UART devices

    Memory

    The process stack

  • The term “blocking” describes which behavior? (One answer)

    Statement

    True

    False

    A process can block another for communication purposes

    A process consumes no CPU time while it waits for an event to happen

    The kernel blocks access to network resources to enhance system security

Processes, Scheduling, and Virtual Memory

  • Scheduling: which of the following statements are true?

    Statement

    True

    False

    A timeslice is the amount of time that a process can run until it is suspended in favor of other processes

    Fair scheduling ensures that network resources are evenly shared

    On a single-CPU machine, no process may enter an infinite loop - or else, the entire machine will come to a halt

    Fair scheduling ensures that every process gets its fair share of CPU resources

    The scheduler gives processes the illusion that each of them owns the CPU

    A context switch happens when one process enters a blocking system call

  • Virtual Memory: which of the following statements are true?

    Statement

    True

    False

    A process can own all memory in the system

    The kernel is the owner of all memory in the system

    All processes share a single address space

    Each process in the system has its own address space

    An address space is three-dimensional

  • Processes: which of the following statements are true?

    Statement

    True

    False

    A process is identified by its process ID

    A process is identified by its pthread context number

    Processes are arranged in a process hierarchy, starting at process 1

    A process may have multiple parents

    Every process has a parent process

    Every process except process 1 has a parent process

(Solutions)

Dependencies

cluster_linux Linux cluster_linux_basics Linux Basics cluster_linux_basics_intro Introduction: Concepts and Terminology cluster_linux_basics_shell The Shell (Bash - “Bourne Again Shell”) cluster_linux_basics_permissions File System Permissions cluster_linux_sysprog Linux Systems Programming cluster_linux_sysprog_blocking_io Blocking I/O: What Is That? cluster_linux_sysprog_basics Linux Systems Programming: Basics cluster_linux_sysprog_fileio File I/O cluster_linux_toolchain Toolchain, And Cross Development linux_basics_intro_process Processes, Scheduling, Address Spaces linux_basics_intro_overview Overview linux_basics_intro_process->linux_basics_intro_overview linux_basics_intro_demo_everything_is_a_file Everything Is A File (Live Demo) linux_basics_intro_demo_everything_is_a_file->linux_basics_intro_overview linux_sysprog_blocking_io_blocking_io_file Blocking I/O (On A File): What is That? linux_basics_intro_demo_everything_is_a_file->linux_sysprog_blocking_io_blocking_io_file linux_basics_intro_fh_moodle_quiz Quiz: Linux Basics linux_basics_intro_fh_moodle_quiz->linux_basics_intro_process linux_basics_intro_fh_moodle_quiz->linux_basics_intro_overview linux_basics_intro_fh_moodle_quiz->linux_basics_intro_demo_everything_is_a_file linux_basics_intro_fh_moodle_quiz->linux_sysprog_blocking_io_blocking_io_file linux_basics_shell_paths Absolute and Relative Paths linux_basics_shell_commandline Commandline linux_basics_shell_paths->linux_basics_shell_commandline linux_basics_shell_file_dir_create_rm Creating And Removing Files and Directories linux_basics_shell_file_dir_create_rm->linux_basics_shell_paths linux_basics_shell_cwd Current Working Directory linux_basics_shell_file_dir_create_rm->linux_basics_shell_cwd linux_basics_shell_special_paths Special Paths linux_basics_shell_special_paths->linux_basics_shell_paths linux_basics_shell_ls Directory Listings: The ls Command linux_basics_shell_ls->linux_basics_intro_overview linux_basics_shell_ls->linux_basics_shell_paths linux_basics_shell_ls->linux_basics_shell_special_paths linux_basics_shell_ls->linux_basics_shell_cwd linux_basics_shell_cwd->linux_basics_intro_process linux_basics_shell_cwd->linux_basics_shell_paths linux_basics_shell_cwd->linux_basics_shell_commandline linux_basics_shell_commandline->linux_basics_intro_overview linux_basics_permissions_basics Permissions: Mode, User and Group Ownership linux_basics_permissions_basics->linux_basics_shell_ls linux_sysprog_blocking_io_blocking_io Blocking I/O: What is That? (“Everything is a file”) linux_sysprog_blocking_io_blocking_io_file->linux_sysprog_blocking_io_blocking_io linux_sysprog_fileio_basics File I/O: Basics linux_sysprog_blocking_io_blocking_io->linux_sysprog_fileio_basics linux_sysprog_basics_errorhandling Error Handling linux_sysprog_basics_syscalls System Calls vs. Library Functions linux_sysprog_basics_errorhandling->linux_sysprog_basics_syscalls linux_toolchain_basics Toolchain: Basics linux_sysprog_basics_syscalls->linux_toolchain_basics linux_sysprog_basics_groupnode Linux Systems Programming: Basics linux_sysprog_basics_groupnode->linux_sysprog_basics_errorhandling linux_sysprog_basics_groupnode->linux_sysprog_basics_syscalls linux_sysprog_fileio_basics->linux_basics_permissions_basics linux_sysprog_fileio_basics->linux_sysprog_basics_groupnode linux_toolchain_basics->linux_basics_shell_file_dir_create_rm