HWs 1-7

RicherBixbite avatar
RicherBixbite
·
·
Download

Start Quiz

Study Flashcards

42 Questions

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

kernel

In what way is an operating system like a government?

It creates an environment within which other programs can do useful work.

What is a signal to the processor emitted by hardware or software indicating an event that needs immediate attention?

Interrupt

Where is the location of L1 cache?

Inside the processor but outside CPU core

What is the denotation of 1024^3 bytes?

GB

Which storage is nonvolatile?

Hard-disk drive

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

Dispatches

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.

True

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

False

Which of following are advantages of multiprocessor systems?

Both B and C

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

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

All

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

A, D, F

What statement concerning privileged instructions is considered false?

They are used to manage interrupts.

A _____ is an example of a systems program.

command interpreter

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

user mode and kernel mode

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

KDE or GNOME

Which of the following is not an operating system service?

graphical user interface

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

True

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

False

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.

False

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

System calls

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

open() invokes open() system call to get service from operating system

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

fork()

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

application and system programs

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

False

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

False

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

True

iOS is open source, Android is closed source.

False

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

last in first out (LIFO)

Microkernels use _____ for communication.

message passing

A process control block ____.

includes information on the process's state

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

context switch

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

heap

Which of the following contains the executable code?

text

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

all of them

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

running

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

True

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

ready queue

Which of the following is true?

An I/O-bound process is one that spends more of its time doing I/O than it spends doing computations

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

all of the above

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

PCB0, PCB1

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?

CPU scheduler

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.

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.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Operating Systems Introduction Quiz
5 questions
Operating Systems Overview Quiz
0 questions
Multithreading and Process Creation
5 questions
Use Quizgecko on...
Browser
Browser