HWs 1-7
42 Questions
7 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

Which of the following programs runs all the time on the computer?

  • text editor
  • assembler
  • compiler
  • kernel (correct)
  • In what way is an operating system like a government?

  • It seldom functions correctly.
  • It creates an environment within which other programs can do useful work. (correct)
  • It is always concerned primarily with the individual's needs.
  • It performs most useful functions by itself.
  • What is a signal to the processor emitted by hardware or software indicating an event that needs immediate attention?

  • Virtualization
  • I/O device
  • Message passing
  • Interrupt (correct)
  • Where is the location of L1 cache?

    <p>Inside the processor but outside CPU core</p> Signup and view all the answers

    What is the denotation of 1024^3 bytes?

    <p>GB</p> Signup and view all the answers

    Which storage is nonvolatile?

    <p>Hard-disk drive</p> Signup and view all the answers

    The CPU catches the interrupt and ____ it to the interrupt handler

    <p>Dispatches</p> Signup and view all the answers

    The operating system provides an interface that sits between the hardware and everything else and is easier and safer to program and use than the raw hardware.

    <p>True</p> Signup and view all the answers

    The operating system kernel consists of all system and application programs in a computer.

    <p>False</p> Signup and view all the answers

    Which of following are advantages of multiprocessor systems?

    <p>Both B and C</p> Signup and view all the answers

    Which of following are types of resources the operating system allocate?

    1. I/O devices 2) Disk space 3) Memory 4) CPU

    <p>All</p> Signup and view all the answers

    Which of the following machine instructions should be run in kernel mode? A. Set value of the timer B. Write to memory C. Modify a register D. Turn off interrupts E. Issue a trap instruction F. Access I/O device

    <p>A, D, F</p> Signup and view all the answers

    What statement concerning privileged instructions is considered false?

    <p>They are used to manage interrupts.</p> Signup and view all the answers

    A _____ is an example of a systems program.

    <p>command interpreter</p> Signup and view all the answers

    The two separate modes of operating in a system are kernel mode and privileged mode.

    <p>user mode and kernel mode</p> Signup and view all the answers

    Which of the following is not a type of command interpreter?

    <p>KDE or GNOME</p> Signup and view all the answers

    Which of the following is not an operating system service?

    <p>graphical user interface</p> Signup and view all the answers

    System call interface is the boundary between user programs and operating system services.

    <p>True</p> Signup and view all the answers

    System calls can be run in either user mode or kernel mode.

    <p>False</p> Signup and view all the answers

    Applications that are designed to work on one operating system will also work on another operating system as long as they provide the same APIs.

    <p>False</p> Signup and view all the answers

    _____ provide(s) an interface to the services provided by an operating system.

    <p>System calls</p> Signup and view all the answers

    What is the relationship between library call open() and open() system call?

    <p>open() invokes open() system call to get service from operating system</p> Signup and view all the answers

    The Windows CreateProcess() system call creates a new process. What is the equivalent system call in UNIX?

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

    Which of the following defines the view of the operating system seen by most users?

    <p>application and system programs</p> Signup and view all the answers

    In operating system design, a policy should be defined together with the mechanism.

    <p>False</p> Signup and view all the answers

    Applications compiled on one operating system can be directly executable on other operating systems due to common structure.

    <p>False</p> Signup and view all the answers

    Mac OS X is a hybrid system consisting of both the Mach microkernel and BSD UNIX.

    <p>True</p> Signup and view all the answers

    iOS is open source, Android is closed source.

    <p>False</p> Signup and view all the answers

    Which of the following principles is used for adding and removing items from a stack?

    <p>last in first out (LIFO)</p> Signup and view all the answers

    Microkernels use _____ for communication.

    <p>message passing</p> Signup and view all the answers

    A process control block ____.

    <p>includes information on the process's state</p> Signup and view all the answers

    A _________________ saves the state of the currently running process and restores the state of the next process to run.

    <p>context switch</p> Signup and view all the answers

    Which of the following contains memory allocated by malloc()?

    <p>heap</p> Signup and view all the answers

    Which of the following contains the executable code?

    <p>text</p> Signup and view all the answers

    A process may transition to the Ready state by which of the following actions?

    <p>all of them</p> Signup and view all the answers

    Which of the following process state will be switched from “ready” state?

    <p>running</p> Signup and view all the answers

    For a single-processor system, there will never be more than one process in the Running state.

    <p>True</p> Signup and view all the answers

    The list of processes waiting to execute on a CPU is called a(n) ____.

    <p>ready queue</p> Signup and view all the answers

    Which of the following is true?

    <p>An I/O-bound process is one that spends more of its time doing I/O than it spends doing computations</p> Signup and view all the answers

    Which of the following cases could cause a process being removed from the CPU?

    <p>all of the above</p> Signup and view all the answers

    If process P0 is switched to process P1, state for P0 will be saved into _____, and state from _____ will be reloaded?

    <p>PCB0, PCB1</p> Signup and view all the answers

    Which of the following selects from among the processes that are in the ready queue to execute and allocate the CPU to one of them?

    <p>CPU scheduler</p> Signup and view all the answers

    Study Notes

    Operating System Basics

    • The operating system provides an interface that sits between the hardware and everything else, making it easier and safer to program and use than the raw hardware.
    • An operating system is like a government, managing the computer's resources and ensuring everything runs smoothly.

    Hardware and Interrupts

    • A signal to the processor emitted by hardware or software indicating an event that needs immediate attention is called an interrupt.
    • The CPU catches the interrupt and passes it to the interrupt handler.
    • L1 cache is located on the CPU chip.

    Computer Memory and Storage

    • 1024^3 bytes is denoted as a gigabyte.
    • Nonvolatile storage is a type of storage that retains its data even when the power is turned off.

    Operating System Kernel and Modes

    • The operating system kernel consists of the low-level, core components of the operating system.
    • The two separate modes of operating in a system are user mode and kernel mode.
    • Kernel mode is used for running privileged instructions, such as modifying a register, turning off interrupts, and accessing I/O devices.

    Multiprocessor Systems and Resource Allocation

    • Multiprocessor systems have advantages such as increased throughput, improved responsiveness, and better Resource Utilization.
    • The operating system allocates resources such as I/O devices, disk space, memory, and CPU.

    System Calls and Command Interpreters

    • System calls can be run in either user mode or kernel mode.
    • The system call interface is the boundary between user programs and operating system services.
    • A library call, such as open(), is different from the open() system call.
    • The Windows CreateProcess() system call creates a new process, and the equivalent system call in UNIX is fork().
    • System calls provide an interface to the services provided by an operating system.

    Operating System Design and Principles

    • In operating system design, a policy should be defined together with the mechanism.
    • The principle of Last-In-First-Out (LIFO) is used for adding and removing items from a stack.
    • Microkernels use message passing for communication.

    Process Management

    • A process control block (PCB) saves the state of the currently running process and restores the state of the next process to run.
    • The heap contains memory allocated by malloc().
    • The text segment contains the executable code.
    • A process may transition to the Ready state by completing its execution, being interrupted, or being terminated.
    • A process in the Ready state will be switched to the Running state by the scheduler.
    • For a single-processor system, there will never be more than one process in the Running state.
    • The list of processes waiting to execute on a CPU is called a ready queue.
    • The scheduler selects from among the processes that are in the ready queue to execute and allocate the CPU to one of them.
    • A process can be removed from the CPU due to time slice expiration, I/O completion, or arrival of a higher-priority process.
    • If process P0 is switched to process P1, the state for P0 will be saved into the PCB, and the state from the PCB will be reloaded.

    Studying That Suits You

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

    Quiz Team

    Description

    This quiz is an introduction to operating systems and covers 11 questions. It is worth 20 points and has a time limit of none. You are allowed 3 attempts and the quiz was locked on Sep 3 at 11:59pm. The latest attempt scored a perfect 20 out of 20.

    Use Quizgecko on...
    Browser
    Browser