Operating Systems: Introduction and Overview

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 provide entertainment and multimedia services to the user.
  • To directly manage and execute user applications without any abstraction.
  • To design and manufacture computer hardware components.
  • To act as an intermediary between the computer hardware and the user. (correct)

Which of the following is NOT a primary goal of an operating system?

  • Developing new hardware architectures. (correct)
  • Executing user programs and simplifying problem-solving.
  • Making the computer system convenient for user interaction.
  • Utilizing computer hardware in an efficient manner.

Which of the following is considered a component of a computer system?

  • Hardware, operating system, application programs, and users. (correct)
  • Only the operating system and application programs.
  • The users and application programs exclusively.
  • The CPU and memory only.

What is the role of 'users' in the context of computer systems, as defined in the material?

<p>Entities that utilize computer system components to solve problems or perform tasks. (C)</p>
Signup and view all the answers

An operating system balances the trade-off between performance and resource utilization. Which scenario exemplifies this?

<p>Users demanding ease of use while the OS optimizes hardware usage. (D)</p>
Signup and view all the answers

What is the role of the OS in a shared computer environment like a mainframe?

<p>Ensuring all users have a good experience with optimal resource allocation. (A)</p>
Signup and view all the answers

Which of the following describes the role of an OS in dedicated systems like workstations?

<p>Managing services and resources, and optimizing resource utilization on-demand. (B)</p>
Signup and view all the answers

How does the OS manage resources in handheld computers with limited battery life?

<p>The OS balances between service quality and minimal power consumption. (C)</p>
Signup and view all the answers

What is the defining characteristic of operating systems in embedded computers?

<p>Providing required services without user intervention. (C)</p>
Signup and view all the answers

What is the practical definition of an OS in terms of resource management?

<p>An OS is a resource allocator that manages all resources and resolves conflicting requests. (B)</p>
Signup and view all the answers

What is the primary function of an OS when viewed as a control program?

<p>To control the execution of programs, prevent errors, and ensure proper computer use. (C)</p>
Signup and view all the answers

What is the 'kernel' according to the content?

<p>The program that runs at all times on the computer. (A)</p>
Signup and view all the answers

What is the role of the 'bootstrap program' during computer startup?

<p>To load the operating system kernel and start its execution. (C)</p>
Signup and view all the answers

Where is the bootstrap program typically stored?

<p>ROM or EPROM, known as firmware. (A)</p>
Signup and view all the answers

What is the significance of the 'common bus' in computer system organization?

<p>It provides access to shared memory for CPUs and device controllers. (B)</p>
Signup and view all the answers

What is the function of a device controller in computer-system operation?

<p>To manage a specific type of device. (C)</p>
Signup and view all the answers

How does a device controller notify the CPU that it has completed its operation?

<p>By causing an interrupt. (C)</p>
Signup and view all the answers

Regarding interrupts, what is contained within the 'interrupt vector'?

<p>The addresses of all the interrupt service routines. (C)</p>
Signup and view all the answers

What is the key difference between a 'trap' and a typical interrupt?

<p>A trap is a software-generated interrupt caused by an error or user request. (A)</p>
Signup and view all the answers

What does it mean for an operating system to be 'interrupt driven'?

<p>The OS relies on interrupts to handle various system events. (C)</p>
Signup and view all the answers

How does the operating system preserve the state of the CPU when an interrupt occurs?

<p>By storing registers and the program counter (PC). (D)</p>
Signup and view all the answers

What is the role of 'polling' in interrupt handling?

<p>The CPU constantly checks the status of a device to see if it needs attention. (D)</p>
Signup and view all the answers

What is the purpose of a 'vectored interrupt system'?

<p>To assign each interrupting device a unique code for efficient identification. (D)</p>
Signup and view all the answers

In I/O structure, what does it mean when control returns to the user program 'only upon I/O completion'?

<p>The CPU idles or loops until the I/O operation is finished. (A)</p>
Signup and view all the answers

What is a 'system call' in the context of I/O operations?

<p>A request to the OS to allow a user to wait for I/O completion. (B)</p>
Signup and view all the answers

What information is typically contained in a 'device-status table'?

<p>Each I/O device's type, address, and state. (C)</p>
Signup and view all the answers

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

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

How many bits are typically in a byte?

<ol start="8"> <li>(C)</li> </ol>
Signup and view all the answers

What is the key characteristic of 'main memory'?

<p>It is the only storage medium that the CPU can directly access. (B)</p>
Signup and view all the answers

What is the primary difference between main memory and secondary storage?

<p>Main memory is volatile, while secondary storage is nonvolatile. (B)</p>
Signup and view all the answers

How is the surface of a hard disk logically organized?

<p>Tracks that are subdivided into sectors. (D)</p>
Signup and view all the answers

What is the function of a 'disk controller'?

<p>Determining the logical interaction between the device and the computer. (B)</p>
Signup and view all the answers

Which storage technology is faster and nonvolatile compared to traditional hard disks?

<p>Solid-state disks. (C)</p>
Signup and view all the answers

What are the key characteristics that define the storage hierarchy?

<p>Speed, cost, and volatility. (B)</p>
Signup and view all the answers

What is 'caching' in the context of storage systems?

<p>Copying information into a faster storage system. (C)</p>
Signup and view all the answers

What is the role of a 'device driver'?

<p>To provide a uniform interface between a device controller and the kernel. (C)</p>
Signup and view all the answers

According to the material, what does caching dictate?

<p>Information in use is copied from slower to faster storage temporarily. (D)</p>
Signup and view all the answers

What is the purpose of Direct Memory Access (DMA)?

<p>To allow high-speed I/O devices to transmit information at close to memory speeds without CPU intervention. (C)</p>
Signup and view all the answers

In the context of computer architecture, what is a key advantage of multiprocessor systems?

<p>Increased throughput by executing more operations. (C)</p>
Signup and view all the answers

What is the defining characteristic of 'Symmetric Multiprocessing'?

<p>Each processor performs all tasks, working together using the same OS and memory. (B)</p>
Signup and view all the answers

Flashcards

What is an Operating System?

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

What is Hardware?

All electronic devices and circuitry providing computing resources.

What is an Operating System?

Controls and coordinates the use of hardware among applications and users.

What are Application Programs?

Defines how system resources are used to solve computing problems.

Signup and view all the flashcards

Who are Users?

Entities that use the computer components to solve tasks.

Signup and view all the flashcards

What is a Bootstrap Program?

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

Signup and view all the flashcards

What is a Common Bus?

CPUs and device controllers connect through this to access memory.

Signup and view all the flashcards

What is an Interrupt?

When I/O devices signal the CPU that an operation is finished.

Signup and view all the flashcards

What is Resource Allocation?

OS role to balances convenience and efficiency for Users.

Signup and view all the flashcards

What is the Kernel?

A specialized program that runs at all times, managing the computer.

Signup and view all the flashcards

What does Interrupt do?

It transfers control to a service routine via the interrupt vector.

Signup and view all the flashcards

What does the OS do in Interrupt Handling?

It saves CPU state and determines the interrupt type.

Signup and view all the flashcards

What is Polling?

It constantly checks the status of a device to see if it needs attention.

Signup and view all the flashcards

Whats is Device-Status Table?

Each device contains entry for each I/O device indicating its type.

Signup and view all the flashcards

What is a bit?

Basic unit of computer storage.

Signup and view all the flashcards

What is a byte?

8 bits

Signup and view all the flashcards

What is a word?

native unit of data.

Signup and view all the flashcards

What is a Kilobyte (KB)?

1024 bytes

Signup and view all the flashcards

What is a Megabyte (MB)?

1024 Kilobytes

Signup and view all the flashcards

What is a Gigabyte (GB)?

1024 Megabytes

Signup and view all the flashcards

What is a Terabyte (TB)?

1024 Gigabytes

Signup and view all the flashcards

What is a Petabyte (PB)?

1024 Terabytes

Signup and view all the flashcards

What is Main Memory?

Only storage directly accessible by the CPU.

Signup and view all the flashcards

What is Secondary Storage?

Extension of main memory providing large, nonvolatile capacity.

Signup and view all the flashcards

What is Disk Surface?

Divided into tracks, then sectors.

Signup and view all the flashcards

What does Disk Controller do?

Interaction between device and computer (CPU, main memory).

Signup and view all the flashcards

What is Solid-State Disks?

Faster than hard disks, nonvolatile.

Signup and view all the flashcards

What is Caching?

Copying info into a faster storage system.

Signup and view all the flashcards

What does Device Driver do?

Manages I/O for each device controller.

Signup and view all the flashcards

What is DMA?

High-speed device info transfer at memory speeds.

Signup and view all the flashcards

Advantages of Multiprocessors?

Increased throughput, economy of scale and increased reliability through interconnected processors.

Signup and view all the flashcards

What is Asymmetric Multiprocessing?

When one CPU handles OS, while other handling input/output jobs

Signup and view all the flashcards

What is Symmetric Multiprocessing?

Processors working together on tasks using same OS and memory.

Signup and view all the flashcards

What does Multi-Core/Multi-Chip do?

Describe a computer or processor that has more than one CPU core

Signup and view all the flashcards

What are Clustered Systems?

Systems working together sharing storage.

Signup and view all the flashcards

Asymmetric Clustering?

A machine in hot-standby mode continuously monitors the entire system.

Signup and view all the flashcards

Symmetric Clustering?

All nodes run apps and monitor each other.

Signup and view all the flashcards

What is Multiprogramming?

Needed for efficiency.

Signup and view all the flashcards

What does Job scheduling do?

One job selected and run.

Signup and view all the flashcards

What is Timesharing?

Switches jobs so frequently that users can interact with each job while it running.

Signup and view all the flashcards

Study Notes

Lecture 1: Introduction & Overview of Operating Systems

  • The lecture introduces fundamental concepts of operating systems
  • The lecture is presented by Dr. Nasser Tamim

Objectives

  • The purpose is to describe the basic organisation of computer systems
  • The goal is to provide a tour of the major components of systems
  • The aim is to give an overview of computing environments
  • The lecture will explore open source operating systems

What is an Operating System?

  • An operating system is a program that acts as an intermediary between a computer user and the computer hardware
  • The operating system enables execution of user programs (apps) and simplifies problem-solving
  • Operating systems make computers convenient to use by creating interaction between user and hardware, working as a platform for applications
  • The operating system handles resources efficiently

Computer System Structure

  • A computer system consists of four components
  • The Hardware provides computing resources such as CPU, memory, and I/O devices
  • The Operating System controls and coordinates hardware use across applications and users
  • Application Programs define how system resources are used to solve users' computing problems
    • Examples are word processors, compilers, browsers, database systems, and video games
  • Users relates to entities, including people, machines, and other computers, that utilize the system

Operating System Roles

  • User perspective is convenience, ease of use, and performance, regardless of resource utilization
    • The OS balances performance and resource utilization
  • Shared computers serve many users, so the OS manages services and optimizes resource allocation to ensure quality
  • Dedicated systems use dedicated resources and shared server resources
    • The OS provides services with optimal resource utilization on-demand
  • Handheld computers have limited resources
    • The OS balances performance with minimal power consumption for longer battery life
  • Embedded computers without user interfaces require the OS to provide required services without intervention

Operating System Definition

  • An OS is a resource allocator that manages all resources and decides between conflicting requests for efficient utilization
  • An OS is a control program that prevents errors and improper computer use
  • There is no universally accepted OS definition
  • One approximation is "Everything a vendor ships when you order an operating system," but capabilities and functionalities vary wildly across operating systems
  • The Kernel is the core program running at all times on the computer
  • All else is either a system or application program

Computer Startup

  • A Bootstrap program is loaded during power-up or reboot with the following characteristics
  • Stored in ROM or EPROM, also known as firmware
  • Initialises OS, hardware, and system programs
  • Loads the operating system kernel and starts execution

Computer System Organization

  • One or more CPUs and device controllers connect through a common bus
  • The common bus provides access to shared memory (main memory) for executing operations or tasks
  • CPUs and devices compete for memory cycles concurrently, turns or time is needed to perform a task

Computer-System Operation

  • I/O devices and the CPU can execute concurrently
  • Each device controller manages a specific device type has a local buffer
  • The local buffer stores for a certain amount of time
  • The CPU moves data between main memory and local buffers
  • I/O moves data between device and the controller's local buffer
  • A device controller informs the CPU of operation completion via an interrupt

Common Functions of Interrupts

  • Interrupts transfer control to the interrupt service routine (ISR) via an interrupt vector with addresses of all service routines
  • Interrupt architecture saves the address of the interrupted instruction
  • A trap or exception is a software-generated interrupt that signals errors or user requests
  • Operating systems are interrupt driven

Interrupt Handling

  • To handle interrupts, the OS preserves the CPU by storing registers to allow for Program Counter (PC) management
  • Polling allows checking device statuses
  • Vectored interrupt systems assign unique codes, four to eight bits long, to interrupting devices
    • The device sends its code over the data bus to tell the processor which routine to execute
  • Separate code segments handle actions for each type of interrupt

I/O Structure

  • Control returns to the user program upon I/O completion
    • A wait instruction idles the CPU or a wait loop arises
    • I/O requests are processed sequentially
  • The system call requests the OS to wait for I/O completion
    • A device status table contains entries showing I/O device type, address, and status
    • The OS indexes the I/O device table to modify the entry for the table status to include "interrupt"

Storage Definitions and Notation Review

  • The base computer storage is a bit which contains 0 or 1
  • A byte is 8 bits and is the smallest chunk for storage
  • A word is a unit of data size
  • Operations execute based on word size, rather than a byte
  • Storage is measured in bytes
  • A Kilobyte (KB) is 1,024 bytes
  • A Megabyte (MB) is 1024^2 bytes = 1,048,576 bytes = 1024 Kilobytes
  • A Gigabyte (GB) is 1024^3 bytes = 1,073,741,824 bytes = 1024 Megabytes
  • A Terabyte (TB) is 1,024^4 bytes
  • A Petabyte (PB) is 1,024^5 bytes
  • Computer manufacturers may round off
  • Networking uses bits because networks move data bit by bit

Storage Structure

  • Main memory is directly accessible by CPU, like RAM
    • It is often volatile
  • Secondary storage extends main memory, providing nonvolatile storage
  • Hard disks use magnetic recording material with divided tracks and sectors
  • A disc controller interacts logical interactions between device (CPU and main memory)
  • Solid-state disks are nonvolatile and becoming more popular

Storage Hierarchy

  • Storage systems are organized by speed, cost, and volatility
  • Caching involves copying information into faster storage and can view main memory as the cache
  • Device drivers manage I/O with a uniform interface between controller and kernel

Caching

  • Caching transfers information from slower to faster storage temporarily
  • Faster storage caches check information
  • If it is not there, data copies to cache
  • Cache is smaller than the information stored and cache management design is an important consideration

Direct Memory Access (DMA) Structure

  • DMA structure uses high-speed I/O devices to transmit data at memory speeds
  • It transfers data blocks bypassing CPU intervention so it uses one interrupt per block

Computer-System Architecture

  • Most systems use general-purpose processors, also using special-purpose processors
  • Multiprocessor systems, are also known as parallel/tightly-coupled systems, growing importance
    • Increased throughput
    • Economy of scale
    • Increased reliability
  • Multiprocessor systems have 2 types
  • Asymmetric Multiprocessing assigns tasks to different CPUs
    • eg one CPU handles the OS while another performs I/O
  • Symmetric Multiprocessing assigns all processor all tasks
    • CPUs all work on the same OS and memory

Dual-Core & Multi-Core Design

  • Multi-chip or multicore refers to computers or processors having more than one processing unit (CPU) core

Clustered Systems

  • Clustered systems work like multiprocessor systems
    • Share storage via a storage-area network (SAN)
    • Provide a high-availability service for failure survival
  • Asymmetric clustering uses one machine in hot-standby node to monitor the system while other nodes do real tasks
  • Symmetric clustering involves all nodes running applications and monitoring each other
  • HPC enables parallelization
  • Distributed lock managers (DLM) prevent multiple operations by maintaining a list to monitor the system

Operating System Structure

  • Multiprogramming is needed for efficiency
  • A single user cannot keep CPUs and I/O busy -Organizes code and data of the current job
  • Total jobs in system are also kept in memory
  • Time sharing (multitasking) is a logical extension of multiprogramming It is interactive computing
    • Response time is sub second -Each user can execute one process
      • CPU scheduling if there are multiple ready jobs and the swapping handles when there is no more memory
  • Virtual memory allows execution of processes that are not completely in memory

Operating-System Operations

  • Operating system operations are triggered by software and hardware interrupts
  • A software interrupt can also describe a trap, or exception (divide by zero), process issues - infinite loops

Operating-System Operations (cont.)

  • Dual-mode operation protects the OS by switching between user mode and kernel mode
    • A mode bit distinguishes current code execution
    • Privileged instructions only exist in kernel mode
    • System calls switch operations from user to kernel mode
  • Increasingly, CPUs such as VMs support multiple operations

Transition from User to Kernel Mode

  • Protection of the OS relies on timers to prevent loops that hog resources.
  • Timers interrupt the computer after some period
  • The OS sets a decrementing counter (privileged instruction)
  • The interrupt will generate when zero is reached
  • The timer sets before scheduling to control and terminate allotted time

Studying That Suits You

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

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser