Operating Systems: Introduction

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

What is the primary role of an operating system?

  • To act as an intermediary between the user and the computer hardware (correct)
  • To create application programs
  • To develop new computer hardware
  • To provide entertainment to the user

Resource utilization is always the top priority for all users of an operating system.

False (B)

What is the 'kernel' of an operating system?

The one program running at all times on the computer

A ______ program is loaded at power-up or reboot to initialize the system.

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

What is the purpose of an interrupt in a computer system?

<p>To signal the CPU that a device needs attention (A)</p> Signup and view all the answers

A trap is a hardware-generated interrupt.

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

What two methods do Operating Systems use to determine which type of interrupt has occurred?

<p>Polling and Vectored interrupt system</p> Signup and view all the answers

In the case of a conflict, in the operating system resources are shared in a Bus, which is also known as a ______ conflict.

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

Which of the following is the smallest unit of computer storage?

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

Main memory is an example of nonvolatile storage.

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

What is the role of a 'disk controller' in storage management?

<p>Determines the logical interaction between the device and the computer</p> Signup and view all the answers

[Blank] is a process of copying information into faster storage system.

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

How is Direct Memory Access (DMA) different from traditional I/O?

<p>DMA transfers blocks of data directly to main memory without CPU intervention (C)</p> Signup and view all the answers

In asymmetric multiprocessing, each processor performs all tasks.

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

What is the advantage of communication of Multi-cores on one chip is faster than multi-chip communication?

<p>faster communication</p> Signup and view all the answers

Systems working together sharing is called a ______.?

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

What is the main goal of multiprogramming?

<p>To keep the CPU and I/O devices busy at all times (B)</p> Signup and view all the answers

A single-threaded process has multiple program counters.

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

What is the purpose of 'swapping' in an operating system?

<p>Moves processes in and out of memory to run</p> Signup and view all the answers

In memory management, the operating system keeps track of which ______ of memory are currently being used.

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

Logical Storage unit known as in the OS is known as?

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

Entire speed of computer operation hinges on disk subsystem and its algorithms.

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

What are the different types of cloud models?

<p>Public, Private and Hybrid</p> Signup and view all the answers

Teritary strorage includes optical storage and ______ ______

<p>magnetic tape</p> Signup and view all the answers

Which storage level has the fastest access time?

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

Fast storage means low bandwidth.

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

What is the use of multitasking when moving data and keeping its storage?

<p>Multitasking environments must be careful to use most recent value, no matter where it is stored in the storage hierarchy</p> Signup and view all the answers

Multiprocessor environment must provide ______ ______ in hardware such that all CPUs have the most recent value in their cache.

<p>cache coherency</p> Signup and view all the answers

Which of the following is NOT a responsibility of the I/O subsystem?

<p>CPU Scheduling (C)</p> Signup and view all the answers

Protection mechanisms in an OS only focus on external threats.

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

What is the purpose of user identifications (user IDs)?

<p>include name and associated number, one per user</p> Signup and view all the answers

A common data structure used in kernels is/are ______ ______

<p>Linked List</p> Signup and view all the answers

Which type of computing environment is characterized by providing web access to internal systems?

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

Emulation is generally the fastest method of virtualization.

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

What does VMM stand for in virtualization, and what is its role?

<p>Virtual Machine Manager, provides virtualization services</p> Signup and view all the answers

In cloud computing, the model where servers or storage are available over the Internet for backup use is known as ______ as a Service (IaaS).

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

Match the following storage definitions with their values:

<p>Kilobyte (KB) = 1,024 bytes Megabyte (MB) = 1,024^2 bytes Gigabyte (GB) = 1,024^3 bytes Terabyte (TB) = 1,024^4 bytes</p> Signup and view all the answers

Match the computing term with its best description:

<p>Client-server computing = Dumb terminals supplanted by smart PCs Peer-to-peer networking = All nodes are considered peers Cloud computing = Delivers computing, storage, and apps as a service Multiprogramming = Operating system keeps multiple jobs in memory</p> Signup and view all the answers

The two types of open-source licenses are as follows?

<p>Copyleft and Other (A)</p> Signup and view all the answers

Real-time operating systems are not used in devices that perform tasks without interruption.

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

Flashcards

Operating System

A program that acts as an intermediary between a computer user and the computer hardware.

Operating System Goals

Executes user programs and makes solving user problems easier, makes the computer system convenient to use and uses the computer hardware in an efficient manner.

Computer system components

Hardware, operating system, application programs and users.

Bootstrap program

A program loaded at power-up or reboot that initializes all aspects of the system and then loads the operating system kernel to start execution.

Signup and view all the flashcards

Firmware

Stored in ROM or EPROM.

Signup and view all the flashcards

Computer-system operation

Where I/O devices and the CPU can execute concurrently and device controller has a local buffer.

Signup and view all the flashcards

Interrupt

Transfers control to the interrupt service routine through the interrupt vector.

Signup and view all the flashcards

Interrupt Vector

Is a table which contains the addresses of all the service routines.

Signup and view all the flashcards

Trap/exception

A software-generated interrupt caused by an error or user request.

Signup and view all the flashcards

Interrupt Handling

The operating system preserves the state of the CPU by storing registers and the program counter.

Signup and view all the flashcards

Polling

CPU checks the status of devices for interrupts

Signup and view all the flashcards

Vectored interrupt

Device controller informs CPU that it wants to interrupt.

Signup and view all the flashcards

Synchronous I/O

Technique where control returns to user program only upon I/O completion. CPU idles until interrupt.

Signup and view all the flashcards

Asynchronous I/O

Technique where control returns to user program without waiting for I/O completion.

Signup and view all the flashcards

System call

A request to the OS to allow user to wait for I/O completion.

Signup and view all the flashcards

Bit

The basic unit of computer storage which contains one of two values, 0 and 1.

Signup and view all the flashcards

Byte

8 bits

Signup and view all the flashcards

Word

A given computer architecture's native unit of data, made up of one or more bytes.

Signup and view all the flashcards

Multicore

Computer with single or multiple core(s).

Signup and view all the flashcards

RAM

Main memory that the CPU can access directly which is typically volitile.

Signup and view all the flashcards

Secondary storage

Extension of main memory that provides large nonvolatile storage capacity.

Signup and view all the flashcards

Hard disks

Rigid metal or glass platters covered with magnetic recording material. Disk surface is logically divided into tracks and sectors.

Signup and view all the flashcards

Solid-state disks

Faster than hard disks and nonvolatile.

Signup and view all the flashcards

Caching

Copying information into faster storage system; main memory can be viewed as a cache for secondary storage.

Signup and view all the flashcards

Device driver

For each device controller to manage I/O and provides uniform interface between controller and kernel.

Signup and view all the flashcards

DMA

Only one interrupt is generated per block rather than the one interrupt per byte.

Signup and view all the flashcards

Multiprocessors

Systems growing in use and importance, also known as parallel systems or tightly-coupled systems.

Signup and view all the flashcards

Asymmetric Multiprocessing

Each processor is assigned a specific task.

Signup and view all the flashcards

Symmetric Multiprocessing

Each processor performs all tasks.

Signup and view all the flashcards

Clustered Systems

Multiple systems(nodes) running applications, monitoring each other.

Signup and view all the flashcards

Asymmetric Clustering

One machine in hot-standby mode, monitors other machines which run applications.

Signup and view all the flashcards

Symmetric Clustering

Multiple machines (nodes) running applications, monitoring each other.

Signup and view all the flashcards

Multiprogramming

Several jobs are kept in main memory at the same time.

Signup and view all the flashcards

Timesharing

logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing.

Signup and view all the flashcards

Dual-mode operation

Allow OS to protect the OS itself and other system components

Signup and view all the flashcards

Process

The unit of work within the system. Program is a passive entity and process is an active entity.

Signup and view all the flashcards

Multi-thread

System has many processes, some user, some operating system running concurrently on one or more CPUs.

Signup and view all the flashcards

Memory management

OS allocated memory to several jobs.

Signup and view all the flashcards

Mass-Storage Management

Disks used to store data that does not fit in main memory or must be kept for a "long" period of time.

Signup and view all the flashcards

Gyroscope

A device used for measuring or maintaining orientation

Signup and view all the flashcards

Study Notes

Introduction

  • Chapter 1 introduces the fundamental concepts of Operating Systems (OS).
  • It provides an overview of the structure, operations, and goals of an OS.
  • The chapter outlines key aspects such as computer system organization, memory management, and security.

Objectives

  • The basics of computer system organization are described.
  • A summary of the major components to OSs is provided.
  • An overview of different computing environments is included.
  • Open source OS are explored.

What is an Operating System?

  • An OS serves as an intermediary between computer users and hardware.
  • OS objectives include executing user programs, simplifying problem-solving, ensuring convenient use, and using hardware efficiently.

Computer System Structure

  • The structure can be divided into hardware, operating system, application programs, and users.
  • Hardware provides computing resources (CPU, memory, I/O devices).
  • The OS controls and coordinates hardware use across applications and users.
  • Application programs utilize system resources to solve user computing problems including word processors, compilers, web browsers, database systems and games.
  • Users can be people, machines or other computers.

What Operating Systems Do

  • The importance of convenience, ease of use, and good performance for users are important for computer systems.
  • Shared computers like mainframes must keep its users happy, therefore resource utilization is important
  • Handheld computers are resource poor, therefore usability and battery life are important.
  • Embedded computers in devices and automobiles may have very little to no user interface.

Operating System Definition

  • An OS functions as a resource allocator and manages all hardware resources.
  • It decides between conflicting requests for efficient and fair resource use.
  • The OS serves as a control program that controls program execution to prevent errors.

Operating System Definition (Cont.)

  • There isn't one accepted definition for an OS.
  • A good approximation is "Everything a vendor ships when you order an operating system."
  • The one program running all the time is the kernel.
  • Everything else is a system program, which ships with the OS, or an application program.

Computer Startup

  • The bootstrap program boots the system at power-up or reboot.
  • Commonly stored in ROM or EPROM, also known as firmware.
  • It initializes the system and loads the OS kernel to start execution.

Computer System Organization

  • Computer system operations include one or more CPUs with device controllers who connect through a common bus and provide access to shared memory.
  • CPUs and devices can have concurrent execution, but may compete for memory cycles.

Computer-System Operation

  • I/O devices and the CPU can execute concurrently.
  • The device controller is responsible for a specific device type and has a local buffer.
  • The CPU moves data to and from main memory and local buffers.
  • The I/O goes from the device to the local buffer of the controller.
  • The device controller informs CPU when its operation is over by sending an interrupt.

Common Functions of Interrupts

  • Interrupts transfer control to an interrupt service routine, typically via an interrupt vector containing addresses of service routines.
  • Interrupt architecture must save the address of the interrupted instruction and return there later.
  • A trap or exception is a software-generated interrupt caused by either an error or user request.
  • An operating system is interrupt driven.

Example: Reading from disk

  • CPU fetches a read instruction from memory into the instruction register and decodes it.
  • If data are needed, the CPU brings them from memory to data registers.
  • The program counter holds address of what will be executed next and then the CPU begins executing the read instruction.
  • A system call is made when code calls the read command which requests usage of HD.
  • This is considered an interrupt because the CPU is requesting a system service and stops its current program temporarily.
  • The source of the interrupt, because it comes from the program/software, is considered a trap or exception.
  • The HD driver then sends a signal via the bus to request data from the HD.
  • The read request signal is provided to the disk controller and the data is read and transferred to the HD buffer.
  • The HD controller sends an interrupt signal via bus to let the CPU know the operation is done.
  • A software interrupt is performed by a system call, which enables a switch from user mode to system mode.

Interrupt Handling

  • The OS saves the CPU state by storing registers and the program counter to handle interrupts.
  • The type of interrupt is determined through polling, where the CPU checks the device status, or through a vectored interrupt system, where the device controller informs the CPU.
  • Separate code segments define actions for each interrupt type.

Interrupt Timeline for a Single Process output

  • CPU runs process 1, and during this, the I/O device is idle.
  • Process 1 starts an I/O, so the device starts working and the CPU switches to another process.
  • The I/O device is then idle after it finishes, issues an interrupt for the CPU,
  • Then the CPU stops working on the other job, takes the interrupt call, and goes back to the first process.
  • This repeats until the process 1 finishes everything.

I/O Structure

  • After I/O starts, control returns to user program after I/O completion.
  • The CPU idles until the next interrupt.
  • For system calls, the OS indexes into the table to see the type and status to modify it.

Storage Definitions and Notation Review

  • The basic unit of computer storage is a bit (0 or 1).
  • A byte is 8 bits
  • Kilobyte (KB): 1,024 bytes
  • Megabyte (MB): 1,024^2 bytes
  • Gigabyte (GB): 1,024^3 bytes
  • Terabyte (TB): 1,024^4 bytes
  • Petabyte (PB): 1,024^5 bytes
  • Computer makers often round numbers; 1 million bytes (MB), and 1 billion Bytes (GB)

Storage Structure

  • Main memory is the only large storage media that can be directly accessed by the CPU.
  • Is random access memory (RAM) and volatile (lose data when power is off).
  • Secondary storage is an extension of the main memory which provides large nonvolatile storage.
  • Hard disks are rigid metal or glass platters with magnetic recording material, and are logically divided into tracks and sectors.
  • The disk controller, determines the interaction of the device and computer.
  • Solid state disks are faster than hard disks and non-volatile.

Storage Hierarchy

  • Storage is organized in a hierarchy of speed, cost, and volatility.
  • Caching copies data into faster storage.
  • Main memory can be used as a cache for secondary storage.
  • The device driver manages I/O and makes the interface between the controller and kernel uniform.

Caching

  • Caching is a way to copy quicker information into a faster storage location temporarily.
  • The cache checks the faster storage to see if the the information is there.
  • If it is there, the cache will use information right from the cache.
  • If it is no there, it will copy the data over to cache and then use the information.
  • An important design choice behind this, is that cache is much smaller than the storage it is being cached.
  • There are important design problems that are considered with this, cache size and replacement policy, and cache consistency.

Direct Memory Access (DMA) Structure

  • Used for high-speed I/O devices that can transmit data close to memory speeds.
  • The buffer storage's blocks of data are transferred directly to main memory by the device's controller.
  • Instead of having an interrupt for every byte, and DMA uses only one interrupt per block.

How a Modern Computer Works

  • Fetch instructions from memory, place them in the Instruction Register, decode them, and execute them.
    • This is part of Von Neumann architecture.

Computer-System Architecture

  • Multiprocessor systems are on the rise.
  • Multiprocessors are known as tightly-coupled or parallel systems.
  • Advantages include increased throughout, more economy, and increased reliability.
  • There are two types of multiprocessing
    • Asymmetric which gives each processor a specific task, and Symmetric which enables each processor to conduct all tasks.

A Dual-Core Design

  • A chip can have one or multiple cores.
  • Multichip can have several chips with one core.
  • Multicore is when you have several cores on one chip.
  • Communication of multi-cores on a single chip is faster than multi-chip communication.
  • Some systems can contain all chips within a computer.

Clustered Systems

  • It is like multiprocessor systems, but with multiple systems that work together by sharing local area networks.
  • They offer high-availability through asymmetric or symmetric clustering.
  • High-performance computing (HPC) relies on clusters.
  • A Storage Area Network (SAN) is a network of switches, routers, and storage devices that are used to provide connectivity for hosts.

Operating System Structure

  • Multiprogramming is a batch system that is used for efficiency to execute multiple programs simultaneously.
  • Multiprogramming organizes jobs (code and data), therefore the CPU always has something to execute
  • Time sharing provides a logical extension in which the CPU switches jobs frequently, so users can simultaneously interact with their jobs in interactive computing.
  • If there are several jobs that are ready to run at the same time, CPU scheduling kicks in, if there is not enough memory, then swapping moves a process, and then virtual memory allows execution of processes not completely in memory.

OS Features Needed for Multiprogramming

  • These features include supplied I/O routines, allocating jobs memory management, disk job scheduling, and in-memory CPU scheduling.
  • In addition, there needs to be allocation of devices and protection of both the OS and the programs within.

Operating-System Operations

  • Operations in the OS are interrupt driven by both hardware and software.
  • Software interrupts include software error, a requested OS service, and process issues such as modifying each other, or infinite loops.

Operating-System Operations

  • Dual-operation modes allow the OS to protect itself with user mode and kernel mode enabled via a mode bit within hardware.
  • If in kernel mode, this gives special instruction to conduct tasks, and conducts all I/O instructions which then changes to kernel, and reverts back to user when complete.
  • VMs are supported with multiple modes for guest Machines.

Transition from User to Kernel Mode

  • Timers set to prevent infinite loops or a process hogging resources, where after, counter zero generates an interrupt.

Common Operating-System Components

  • The operating system has common items: process, memory, and storage management, file and I/O subsystem implementation, and security/protection tools.

Process Management

  • Active entities, processes take the form of programs.
  • They need CPU, memory, and I/O resources to accomplish their task
  • After it is over, termination reclaims re-usable resources.
  • Process activities include creating and deleting processes, suspending and resuming processes, mechanisms for process synchronization, communication, and deadlock.
  • There are two types of processes, processes with a single thread, or multiple threads.

Memory Management

  • Every program requires all or part of their instructions to be in-memory for execution.
  • What data is needed and when is determined by memory management and helps overall response time.
  • Activitiees include keeping track of memory usage, which processes/data to move, and space allocation which optimizes CPU utilization and response time.

Storage Management

  • The OS has a physical to logical storage mapping in the file.
  • The OS is device controlled with access based on speed, capacity and data-transfer rates.
  • Storage management occurs through file system management.
  • They are put into directories.
  • Access is controlled by user/group levels, and primitives exist to manipulate them.
  • Stable storage is created through backups.

Mass-Storage Management

  • Disks store necessary memory not stored elsewhere.
  • Proper management is critical, therefore OS activities include managing disk scheduling, allocation, and freespace.
  • Tertiary storage and WORM storage also have to be managed.

Performance of Various Levels of Storage

  • Fast storage=lower access time, means high bandwidth.
  • Registers are small, have the lowest access time, magnetic disks the highest.

Migration of data “A” from Disk to Register

  • Because in a multitasking environment the most recent value is critical, cache coherency is critical and has to be managed within the software.

I/O Subsystem

  • The OS hides the specific functionality of hardware devices from the user, and manages the I/O, which includes.
  • Buffering.
  • Caching.
  • Spooling.

Protection and Security

  • Protection ensures processes or users have authorized access.
  • Security defends various attacks to the system.
  • Systems distinguish which users can use what and protect against illegitimate access.
  • Protection is done through user IDs + appropriate access control to processes and files.
  • Group identifiers also exist.

Kernel Data Structures

  • Linked lists, double linked lists, circular linked lists, and Binary search trees are common.
  • Binary search trees on the right are greater and search can be (n), also balanced search trees.
  • Bitmap string is a 1 or 0 string representing the status of the ite

Studying That Suits You

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

Quiz Team

Related Documents

More Like This

Operating Systems: Structure and Scheduling
10 questions
Operating System: Functions and Structure
15 questions
Use Quizgecko on...
Browser
Browser