Operating System: Functions and Structure

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 is an example of a task that is typically restricted to kernel mode in an operating system?

  • Performing input/output (I/O) operations (correct)
  • Running a web browser
  • Displaying a graphical user interface
  • Executing user-level applications

Why is it generally discouraged for users to directly modify the clock interrupt handler in an operating system?

  • It is encouraged as a way to customize the system
  • It simplifies the process of updating the operating system
  • It is part of the operating system and protected by hardware (correct)
  • It can improve the performance of user applications

What is the primary role of a 'disk driver' within an operating system?

  • Handle user authentication and security
  • Allocate memory to running processes
  • Manage network connections
  • Provide a high-level interface to interact with the disk hardware (correct)

Which of the following best describes the operating system's role in resource management from a bottom-up perspective?

<p>Overseeing the orderly allocation of processors, memories, and I/O devices (B)</p> Signup and view all the answers

What is the concept of 'time multiplexing' in resource management?

<p>Allowing different programs or users to take turns using a resource (B)</p> Signup and view all the answers

What was a key characteristic of the first generation of digital computers (1945-1955)?

<p>Programming done by wiring electrical circuits (B)</p> Signup and view all the answers

How did the introduction of the transistor impact the computer industry during the second generation (1955-1965)?

<p>Computers became reliable enough to be sold to paying customers (D)</p> Signup and view all the answers

During the third generation of computing (1965-1980), what was a major challenge for computer manufacturers?

<p>The need to develop and maintain two distinct product lines (A)</p> Signup and view all the answers

What technological development enabled the rise of personal computers during the fourth generation (1980-Present)?

<p>The development of Large-Scale Integration (LSI) circuits (B)</p> Signup and view all the answers

Which component in a computer is responsible for fetching instructions from memory and executing them?

<p>Central Processing Unit (CPU) (B)</p> Signup and view all the answers

What is the role of the 'program counter' in a CPU?

<p>Contains the memory address of the next instruction to be fetched (A)</p> Signup and view all the answers

Why do modern computers utilize a memory hierarchy instead of relying on a single type of memory?

<p>No current technology satisfies all memory goals (speed, size, cost) (A)</p> Signup and view all the answers

What is the purpose of a 'cache' in a computer's memory system?

<p>To hold frequently used data for faster access (A)</p> Signup and view all the answers

Which of the following is a key difference between Solid State Drives (SSDs) and traditional Hard Disk Drives (HDDs)?

<p>SSDs use flash memory to store data, while HDDs use platters (A)</p> Signup and view all the answers

What is the role of the BIOS (Basic Input/Output System) during the computer boot process?

<p>To initialize the hardware and load the operating system (D)</p> Signup and view all the answers

Flashcards

Operating System

The software that runs in kernel mode, providing a clean set of resources and managing hardware.

Kernel Mode

Mode with complete hardware access, where the OS runs.

User Mode

Mode with restricted instructions, used for applications.

Disk Driver

Software dealing with hardware, providing a read/write interface.

Signup and view all the flashcards

Multiplexing

Sharing resources in time or space between programs/users.

Signup and view all the flashcards

Vacuum Tubes (1945-55)

First generation computers used what?

Signup and view all the flashcards

Transistors (1955-65)

Second generation computers depended on what technology?

Signup and view all the flashcards

ICs and Multiprogramming (1965-1980)

Third generation computers employed what?

Signup and view all the flashcards

LSI (Large Scale Integration)

Thousands of transistors integrated on silicon.

Signup and view all the flashcards

CPU Cycle

CPU fetches, decodes, and executes instructions in a loop.

Signup and view all the flashcards

Program Counter

CPU register holding the address of the next instruction.

Signup and view all the flashcards

Stack Pointer

CPU register pointing to the top of the current stack.

Signup and view all the flashcards

Cache Memory

Fast memory close to the CPU storing frequently used data.

Signup and view all the flashcards

Magnetic Disk

Metal platters rotating to store data through magnetic fields

Signup and view all the flashcards

Track

Annular region readable by heads at a given arm position.

Signup and view all the flashcards

Study Notes

Operating System Overview

  • The operating systems course introduces techniques for implementing operating systems and related system software.
  • Will cover operating systems functions and structure.
  • Topics include: process management, processor scheduling, deadlock prevention, avoidance, and recovery.
  • Main memory and virtual memory management are discussed.
  • Also covers the control of disks and other input/output devices.
  • File-system structure and implementation, and protection and security are also included.

Introduction to Operating System

  • Computers operate in two modes: kernel mode and user mode.
  • The operating system runs in kernel mode (supervisor mode).
  • Programs in kernel mode have complete hardware access and can execute any machine instruction.
  • Other software runs in user mode, with limited machine instructions, restricting control and I/O operations.
  • User interface programs (shell or GUI) is lowest level of user-mode software, allows user to start programs.

Operating System as an Extended Machine

  • It runs on bare hardware and provides the base for all other software.
  • A key difference exists between the operating system and user-mode software.
  • Users can choose or create their own email readers.
  • Users cannot modify the clock interrupt handler, as it is part of the operating system and hardware-protected.
  • Operating systems are large, complex, and long-lived compared to user applications.
  • Linux/Windows OS source code can be over five million lines.
  • It is software running in kernel mode and performs two main functions.
  • Provides application programmers with a clean, abstract set of resources.
  • Manages hardware resources.
  • The architecture at the machine-language level can be difficult to program, especially for I/O.
  • Disk drivers provide an interface to read/write disk blocks without dealing with hardware details.
  • The real customers of the operating system are the application programs.
  • End users interact with abstractions offered by the user interface.

Operating System as a Resource Manager

  • From a bottom-up perspective, it manages the components of a complex system.
  • It is responsible for orderly allocation of processors, memories, and I/O devices.
  • Resource management includes multiplexing (sharing) resources in time and space.
  • Time multiplexing involves different programs taking turns using a resource.
  • Space multiplexing involves allocating parts of the resource to different programs.

Computer Generations: Evolution of Operating Systems

  • First Generation (1945–1955): Used vacuum tubes.
    • Early digital computers were developed during World War II.
    • Programming was done in absolute machine language or by wiring electrical circuits.
  • Second Generation (1955–1965): Used transistors and batch systems.
    • Transistors made computers reliable enough for commercial use.
    • Clear separation emerged between designers, builders, operators, programmers, and maintenance staff.
    • These machines, called mainframes, were housed in large, air-conditioned rooms.
  • Third Generation (1965–1980): Used ICs and multiprogramming.
    • Computer manufacturers had distinct product lines.
    • Scientific computers for calculations and commercial computers for data processing.
  • Fourth Generation (1980–Present): Personal computers emerged.
    • LSI (Large Scale Integration) allowed personal computers.
    • In 1974, Intel wanted an OS to test the 8080 CPU.

Computer hardware review

  • The OS extends the computer's instruction set and manages resources and knows hardware.
  • Review of computer hardware includes CPU, memory and I/O devices.
  • A simple personal computer has the CPU, memory, and I/O devices connected by a system bus.
  • The CPU fetches/executes instructions.
  • The basic CPU cycle is fetch, decode, execute, and repeat.
  • The program counter has the memory address of the next instruction. -The stack pointer points to the top of the current stack which holds the data.

Memory structure

  • Memory should be fast, large but cheap.
  • The hierarchy of memory includes: registers, cache, main memory, magnetic disk.
  • Higher layers have higher speed, smaller capacity, and greater cost per bit.
  • Registers are internal to the CPU and just as fast.
  • Cache lines are kept in a high-speed cache close to the CPU using cache hits.
  • Disks are cheaper than RAM but slower.
  • Disk consists of metal platters that rotate.
  • Disk data is written on tracks, tracks from arm positions write on cylinders.
  • People talk about non-disk disks in the form of SSD's or solid state drives
  • Solid state drives do not have moving parts. so are not really "disks"

I/O Devices and managing the system

  • The CPU and memory are resources the OS must manage.
  • I/O devices have a controller and the device itself.
  • The controller manages the device, and has registers for communication.
  • Registers control disk address, memory address, and read/write direction.
  • All device register collections form the I/O Port Space

Busses

  • As processors and memories become faster the bus becomes strained to the breaking point
  • Added additional busses for faster I/O devices and CPU to memory traffic
  • The PCI express Buss was invented by intel that is faster then any predecessors at tens of gigabytes/second
  • Shared bus architecture means that multiple devices use the same wires, so you need an arbiter to know who can use the bus
  • PCI uses parallel bus architecture to send each word of data over multiple wires.
  • PCI-e has serial bus architecture and send all bits in a message through a single connection like a network packet
  • CPU talks to memory over a fast DDR3 bus to an external device via PCI-e and other devices via a DMI hub.

Booting

  • Every PC has a parentboard (motherboard) that contains a system BIOS (Basic Input- Output system)
  • the BIOS has a low-level I/O software for the keyboard, screen, I/O disk that is held in flash memory
  • when a computer boots. the BIOS does the work, checking Keyboard, and if other devices are installed/responding
  • The BIOS also scans PCIE and PCI busses to detect all the devices attached to them.
  • BIOS checks for the boot device (CD, USB), if fails then it boots from hard disk.
  • Boot data is read into memory and excuted.
  • the OS then queries the BIOS to get the configuration information.
  • The OS checks for a device driver, if not the OS prompts the user to add one
  • the OS loads all device drivers into the kernel.
  • The OS then initializes tables, starts background processes and a login program or GUI.

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