Scheduling: Exam Questions

  • Which term reflects a guaranteed response time? (One correct answer.)

    • Multithreading

    • Realtime

    • Scheduling

  • What is the difference between a thread and a process? (One correct answer.)

    • A process has its own address space, where a thread has not.

    • A thread has its own address space, where a process has not.

  • Which of the following statements about a process’s address space is true? (Wrong answers are subtracted from correct answers.)

    • A range of memory set aside for a process’s exclusive use.

    • Provides memory isolation between processes.

    • A pool of IP addresses that are made available to it.

    • A process cannot access memory outside of that space.

  • What is the effect of running the command sha1sum /dev/zero? (Wrong answers are subtracted from correct answers.)

    • It consumes as much CPU time as it can.

    • It will exhaust all physical memory that is available.

    • It tries to calculate a SHA1 fingerprint of an infinite sequence of null bytes.

    • It calculates the sum of the major numbers of all character devices on the machine.

    • The process is compute-bound.

  • Which of the following statements about fair scheduling are true? (Wrong answers are subtracted from correct answers.)

    • It is the default scheduling policy for a task (that task is said to be in the fair scheduling domain).

    • A task that is in the fair scheduling domain can provide guaranteed response times.

    • The scheduler favors IO bound processes over CPU bound processes.

    • Fair scheduling can be considered the opposite of realtime scheduling.

  • Which of the following statements about the OS scheduler are true? (Wrong answers are subtracted from correct answers.)

    • The scheduler provides the illusion of task parallelism, even on single-CPU machines.

    • The scheduler is a core component of the GNOME desktop environment which manages the user’s to-do list, using machine learning.

    • Its main responsiblity is to assign CPU time slices to waiting tasks (effectively moving them into the “running” state).

    • Its main responsiblity is to assign CPU time slices to runnable tasks (effectively moving them into the “running” state).

  • When a task becomes runnable, under which circumstances is it made running (i.e., is assigned a CPU to run on) immediately? (Wrong answers are subtracted from correct answers.)

    • When no task with higher priority is runnable.

    • When a CPU is free.

    • When all other tasks explicitly agree.

    • When the administrator permits it to.

  • How does a CPU become available/free for another task to run on? (Wrong answers are subtracted from correct answers.)

    • By preemption: the scheduler interrupts a running task in favor of another (runnable) task.

    • Voluntarily: the task puts itself to sleep by declaring to the kernel that it has to wait for something.

    • The CPU is signaled (by an inter-processor interrupt) by another CPU’s cache that it should free resources. Reason: one task constantly thrashes the signaler’s cache.

  • Which of the following statements about priority inversion is true? (Wrong answers are subtracted from correct answers.)

    • Priority inversion can occur only when fair scheduling is in place.

    • It is a deadlock scenario (a bug).

    • Realtime systems are particularly susceptible to priority inversion.

  • Which of the following statements about wakeup latency is true? (Wrong answers are subtracted from correct answers.)

    • Wakeup latency is the time between the occurence of an event (usually an interrupt), and the point where a task that waits for that event enters the running state.

    • Realtime scheduling provides a guaranteed upper bound to wakeup latency.

    • Fair scheduling provides a guaranteed upper bound to wakeup latency.

cluster_linux Linux cluster_linux_sysprog Linux Systems Programming cluster_linux_sysprog_basics Linux Systems Programming: Basics cluster_linux_sysprog_scheduling Scheduling cluster_linux_sysprog_fileio File I/O cluster_linux_sysprog_blocking_io Blocking I/O: What Is That? cluster_linux_basics Linux Basics cluster_linux_basics_shell The Shell (Bash - “Bourne Again Shell”) cluster_linux_basics_intro Introduction: Concepts and Terminology cluster_linux_basics_permissions File System Permissions cluster_linux_toolchain Toolchain, And Cross Development linux_sysprog_basics_syscalls System Calls vs. Library Functions linux_toolchain_basics Toolchain: Basics linux_sysprog_basics_syscalls->linux_toolchain_basics linux_sysprog_basics_errorhandling Error Handling linux_sysprog_basics_errorhandling->linux_sysprog_basics_syscalls linux_sysprog_basics_groupnode Linux Systems Programming: Basics linux_sysprog_basics_groupnode->linux_sysprog_basics_syscalls linux_sysprog_basics_groupnode->linux_sysprog_basics_errorhandling linux_sysprog_scheduling_realtime Realtime linux_sysprog_scheduling_wakeup_latency Wakeup Latency, CPU Frequency (Gotcha) linux_sysprog_scheduling_realtime->linux_sysprog_scheduling_wakeup_latency linux_sysprog_blocking_io_blocking_io Blocking I/O: What is That? (“Everything is a file”) linux_sysprog_scheduling_realtime->linux_sysprog_blocking_io_blocking_io linux_sysprog_scheduling_processes_and_threads Tasks? Processes? Threads? linux_sysprog_scheduling_basics Scheduling (and Multitasking) linux_sysprog_scheduling_processes_and_threads->linux_sysprog_scheduling_basics linux_sysprog_scheduling_wakeup_latency->linux_sysprog_scheduling_basics linux_sysprog_scheduling_wakeup_latency->linux_sysprog_blocking_io_blocking_io linux_sysprog_scheduling_exam_questions Scheduling: Exam Questions linux_sysprog_scheduling_exam_questions->linux_sysprog_scheduling_realtime linux_sysprog_scheduling_exam_questions->linux_sysprog_scheduling_processes_and_threads linux_sysprog_scheduling_exam_questions->linux_sysprog_scheduling_wakeup_latency linux_sysprog_scheduling_basics->linux_sysprog_blocking_io_blocking_io linux_sysprog_fileio_basics File I/O: Basics linux_sysprog_fileio_basics->linux_sysprog_basics_groupnode linux_basics_permissions_basics Permissions: Mode, User and Group Ownership linux_sysprog_fileio_basics->linux_basics_permissions_basics linux_sysprog_blocking_io_blocking_io->linux_sysprog_fileio_basics linux_basics_shell_file_dir_create_rm Creating And Removing Files and Directories linux_basics_shell_paths Absolute and Relative Paths 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_commandline Commandline linux_basics_shell_paths->linux_basics_shell_commandline linux_basics_shell_ls Directory Listings: The ls Command linux_basics_shell_ls->linux_basics_shell_paths linux_basics_shell_ls->linux_basics_shell_cwd linux_basics_intro_overview Overview linux_basics_shell_ls->linux_basics_intro_overview linux_basics_shell_commandline->linux_basics_intro_overview linux_basics_shell_cwd->linux_basics_shell_paths linux_basics_shell_cwd->linux_basics_shell_commandline linux_basics_intro_process Processes, Scheduling, Address Spaces linux_basics_shell_cwd->linux_basics_intro_process linux_basics_intro_process->linux_basics_intro_overview linux_basics_permissions_basics->linux_basics_shell_ls linux_toolchain_basics->linux_basics_shell_file_dir_create_rm