Operating System Fundamentals
40 Questions
1 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What primary role does an operating system fulfill?

  • Managing computer hardware components directly.
  • Serving as the core resource manager. (correct)
  • Providing the graphical user interface between the user and applications.
  • Acting as a shell for executing commands.

Is it possible for an operating system to function without a Graphical User Interface (GUI)?

  • Only by utilizing a remote console on a server configuration.
  • No
  • Yes (correct)
  • Only with a customized kernel.

Can an operating system operate effectively with a single processor?

  • Yes (correct)
  • Yes, but only for a single process at a time.
  • No, a minimum of two processors are required.
  • No

Within the context of operating systems, what does 'booting' generally describe?

<p>The process of initializing the operating system upon system startup. (A)</p> Signup and view all the answers

An operating system directly manages which of the following?

<p>Hardware resources (B)</p> Signup and view all the answers

What is the essential difference between a monolithic kernel and a microkernel?

<p>Monolithic kernels execute most OS services in the kernel space, while microkernels keep most services in user space. (B)</p> Signup and view all the answers

Consider an operating system that employs a preemptive scheduling algorithm. What potential issue might arise if a high-priority process continuously consumes CPU time without relinquishing control?

<p>Other processes, including critical system services, may experience starvation, leading to system instability or failure. (A)</p> Signup and view all the answers

What type of security threat is a fork bomb considered?

<p>A form of denial-of-service (DoS) attack. (C)</p> Signup and view all the answers

What is the primary effect of a fork bomb on a system?

<p>It exhausts the process ID (PID) values. (C)</p> Signup and view all the answers

What disciplinary action would UNLV likely take against a student implementing a fork bomb?

<p>Suspension of account and referral to the office of student conduct. (A)</p> Signup and view all the answers

If a process is described as 'compute bound', where does it spend the majority of its time?

<p>Performing a large number of calculations. (D)</p> Signup and view all the answers

Consider a non-preemptive scheduling system and a long running process. Which of the following is a potential issue?

<p>A process monopolizing the CPU, potentially leading to system unresponsiveness. (B)</p> Signup and view all the answers

What is the primary function of the kernel in an operating system?

<p>Loading the operating system during the boot process. (B)</p> Signup and view all the answers

What does Symmetric Multiprocessing (SMP) signify in an operating system environment?

<p>Any processor can be assigned any task within the system. (B)</p> Signup and view all the answers

Besides a text-based interface, which of the following are common approaches for operating system interfaces?

<p>Touch-based and Graphical User Interface (GUI) (A)</p> Signup and view all the answers

What precisely is a 'process' in the context of operating systems?

<p>A program in the state of execution. (D)</p> Signup and view all the answers

Which of the following best describes a 'system call'?

<p>An interface for user programs to request services from the operating system kernel. (B)</p> Signup and view all the answers

Which of the following is a critical function managed by an operating system's memory management component?

<p>Allocating and deallocating memory to processes. (A)</p> Signup and view all the answers

How does the concept of 'virtual memory' enhance the capabilities of an operating system?

<p>It allows processes to use more memory than physically available. (A)</p> Signup and view all the answers

An operating system uses a preemptive scheduling algorithm. What potential issue does this introduce, necessitating careful synchronization mechanisms?

<p>Race conditions arising from interrupted critical sections. (D)</p> Signup and view all the answers

Consider an operating system employing a microkernel architecture. What is a crucial aspect of inter-process communication (IPC) within such a system, and why does it matter for overall system reliability?

<p>Message passing through the kernel to isolate failures. (C)</p> Signup and view all the answers

What key actions happen during a system call?

<p>Privilege escalation and privilege deescalation. (D)</p> Signup and view all the answers

What advantage does using an API provide for system calls?

<p>Portability and consistency. (C)</p> Signup and view all the answers

In the context of operating systems, what primarily differentiates user mode from kernel mode?

<p>Kernel mode has unrestricted access to system resources, while user mode operates with limited privileges. (C)</p> Signup and view all the answers

Which of the following is NOT a typical step involved in handling a system call?

<p>The CPU switches to user mode. (A)</p> Signup and view all the answers

What is the primary purpose of system call parameters?

<p>To pass data and instructions from the user process to the kernel. (D)</p> Signup and view all the answers

Which of the following system calls is most likely to be used for creating a new process?

<p><code>fork()</code> (C)</p> Signup and view all the answers

Consider a scenario where a user-level program attempts to directly access a memory location reserved for the kernel. What mechanism prevents this?

<p>Memory protection (C)</p> Signup and view all the answers

Which of the following scenarios would necessitate the use of a system call?

<p>Displaying text on the console. (C)</p> Signup and view all the answers

A software developer is debugging an application and suspects that a particular system call is failing intermittently. To diagnose this, they need to inspect the return value of the system call immediately after it's invoked. Which of the following debugging techniques would be MOST effective and non-intrusive in this scenario?

<p>Use a system call tracing tool (like <code>strace</code> on Linux or <code>dtruss</code> on macOS) to monitor the application's system call activity in real-time. (B)</p> Signup and view all the answers

Under which circumstance would a RUNNING process transition to the NEW state?

<p>This transition is impossible; a <code>RUNNING</code> process cannot transition to <code>NEW</code>. (A)</p> Signup and view all the answers

Which of the following best describes a loadable kernel module?

<p>A feature to add or remove functionality from the kernel while it's running. (C)</p> Signup and view all the answers

What is the primary purpose of the SYSGEN process?

<p>Generating the OS specific to the current hardware environment. (B)</p> Signup and view all the answers

When is a SYSGEN typically performed?

<p>At the initial installation of the operating system. (D)</p> Signup and view all the answers

What is the crucial function of the ROM-based boot loader?

<p>Loading the OS from secondary storage to primary storage. (D)</p> Signup and view all the answers

Which state transition is enacted by the process scheduler?

<p>Running to Ready (D)</p> Signup and view all the answers

Which is not a typical responsibility of an operating system?

<p>Compiling source code. (C)</p> Signup and view all the answers

Advanced knowledge is needed to answer: Which of the following is the most accurate description of the 'init' process (PID 1) in a Unix-like system?

<p>It's the first user-space process started by the kernel and serves as the ultimate parent of all other processes. (A)</p> Signup and view all the answers

Assuming infinite resources and ignoring overhead, what is the theoretical maximum speedup achievable by parallelizing a program where 20% of the execution time is inherently serial?

<p>5x (D)</p> Signup and view all the answers

This needs expert-level knowledge: A system uses a multi-level page table scheme for virtual memory management. The virtual address space is 48 bits, and the physical address space is 40 bits. Page size is 4KB, and each page table entry (PTE) is 8 bytes. Assuming a four-level page table, how many bits are used for the offset within the page?

<p>12 bits (C)</p> Signup and view all the answers

Flashcards

Operating System (OS)

Manages computer hardware and software resources.

OS Responsibility

An OS must manage all resources.

OS without GUI

An OS can function without a GUI, using a command-line interface.

Booting

A way to start a computer by loading the kernel.

Signup and view all the flashcards

Kernel

The core of the OS, managing essential functions.

Signup and view all the flashcards

Shell

The shell allows users to interact with command line interface

Signup and view all the flashcards

OS and Single Processor

OS can operate with just one processor.

Signup and view all the flashcards

What is booting?

Turning on the computer by loading the kernel.

Signup and view all the flashcards

Symmetric Multiprocessing (SMP)

Each processor can perform any assigned task.

Signup and view all the flashcards

Graphical User Interface (GUI)

A visual way to interact with a computer using icons and windows.

Signup and view all the flashcards

What is a process?

A program being executed.

Signup and view all the flashcards

What is a system call?

A request from a program to the operating system for a service.

Signup and view all the flashcards

Privilege escalation/de-escalation

Elevation of access rights to execute privileged instructions, then returning to user-level.

Signup and view all the flashcards

System call API advantage

It provides consistent and portable interface for applications across different systems.

Signup and view all the flashcards

Objective of dual-mode operation

Protecting the operating system and kernel from errant users or processes.

Signup and view all the flashcards

Fork Bomb

A type of denial-of-service attack where a program replicates itself rapidly, exhausting system resources.

Signup and view all the flashcards

Consequence of a Fork Bomb on UNLV System

Suspension of account and referral to student conduct.

Signup and view all the flashcards

Compute Bound Process

A process that performs a large number of calculations.

Signup and view all the flashcards

Non-Preemptive Scheduling

Scheduling system where once a process starts, it runs until completion or voluntary pause.

Signup and view all the flashcards

Orphan Process

A process that is still executing, but whose parent process has terminated.

Signup and view all the flashcards

Live Kernel Patching

Adding/removing functionality from the kernel while running.

Signup and view all the flashcards

SYSGEN Process

Finalizes the OS build, tailored for the specific hardware.

Signup and view all the flashcards

When to SYSGEN?

Performed during the initial OS installation.

Signup and view all the flashcards

ROM Boot Loader

Loads the OS from secondary (disk) to primary storage (RAM).

Signup and view all the flashcards

SYSGEN Functionality

Hardware-specific process of generating final OS.

Signup and view all the flashcards

SYSGEN Timing

Occurs at the initial OS installation.

Signup and view all the flashcards

ROM-based boot loader purpose

Loads OS from storage to memory

Signup and view all the flashcards

Linux Kernel Feature

Dynamic Kernel Modules.

Signup and view all the flashcards

Boot Loader

ROM-based boot loader

Signup and view all the flashcards

SYSGEN launch

At the initial installation.

Signup and view all the flashcards

Study Notes

  • CS 370 - Worksheet 1

Operating Systems

  • Responsible for managing resources.
  • Booting refers to turning on the computer by loading the kernel.
  • Symmetric Multiprocessing (SMP) means each processor can perform any assigned task.
  • The common approaches for operating system interfaces include Touch-based and a Graphical User Interface (GUI).
  • Can work without a Graphical User Interface (GUI).
  • System calls use an API (Application Programming Interface), enabling portability and consistency.
  • The basic modes of operation in an operating system are User mode and Kernel mode.
  • Kernel mode can access hardware.

Processes

  • A process is a program being executed.
  • Privilege escalation and de-escalation occurs during a system call.
  • Functions with only one processor.
  • Process table are used in Windows 10/7, Mac OS's, and Linux Based OS's.
  • A process context switch is the switching of the CPU core from one process or thread to another.
  • fork() Makes a duplicate of the current process.
  • exec() Replaces the entire current process with a new program.
  • System services include exec(), waitPid(), fork(), and exit().
  • Long-term scheduler selects which processes are allowed into the system.

Scheduling Algorithms

  • A process that performs a large number of calculations is referred to as compute bound, but when performing a large number of I/O's, is referred to as I/O bound.
  • Most processes alternate between bursts of computing and I/O (disk or network).
  • In a non-preemptive scheduling system, the process are not preempted and will execute until completion.
  • In a preemptive scheduling system, process are preempted in order to more effectively share the CPU core.
  • Goals of an OS scheduler include good response time, starvation freedom, ensure fairness, policy enforcement, and implement preemption.
  • Scheduling decisions relate to Response time, CPU Utilization, Policy enforcement and Throughput.
  • CFS does not use priorities directly, instead they are tracked/selected based on vruntime.
  • Maximum allowed CPU time a process is allowed to execute is called Quantium or Time Slice.
  • Process that executes in the background is Daemon or a Service.

SYSGEN and Linux Kernel Modules

  • SYSGEN process functionality makes the final generation of the OS specific to the current hardware environment.
  • Kernel module is added or removed from the kernel while it's running.
  • SYSGEN is performed at the initial Installation and whenever the hardware is changed or updated.
  • ROM-based boot loader loads a more capable boot loader.

System Program Traits

  • The following refers to system programs
  • Lies between the user interface and system calls.
  • Can't preform multiple processes.
  • Includes cp, rm, ls, cat, ps, top, free, etc.
  • OS Design Goals includes Efficiency, high throughput, reliability

Fork Bombs

  • The fork bomb is a form of denial-of-service (DoS) attack
  • Implementing a fork bomb on a UNLV system may lead to suspension.
  • Scheduling waiting time is the minimized time spent waiting in the ready queue for ready processes.

Scheduler

  • A desktop system might focus on throughput and a server on response time.
  • Batch System describes Typically first-come, first-served (FCFS) or first-in-first-out (FIFO) and Non-preemptive.
  • A batch environment uses first-come, first-served (FCFS) or first-in-first-out (FIFO) and Shortest job next (SJN).
  • An interactive system describes allows sharing of resource (i.e., CPU core) and Preemptive.
  • Interactive systems uses Round-robin scheduling and Priority scheduling.
  • A round-robin scheduling algorithm shares some characteristics with a first-come, first-served (FCFS) algorithm.
  • Priority scheduling algorithms do not treat all process equally, and may cause possible starvation.
  • Different scheduling environment may be used.

The Completely Fair Scheduler (CFS)

  • Features include ensuring no process is starved
  • Maintains a time-ordered red-black tree for each CPU.
  • Uses the left-most node of the red-black tree to schedule the next process to maintain fairness.
  • When a process/thread, it accumulates vruntime (runtime of the process/thread divided by its weight).
  • Lowering the NICE value of a process reduces its vruntime.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

Description

Explore the core functions of operating systems, including resource management and kernel types. Understand the concept of 'booting' and the impact of preemptive scheduling. Also, learn about security threats like fork bombs and process behavior.

More Like This

Use Quizgecko on...
Browser
Browser