Operating System Fundamentals

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

Which of the following best describes the role of an operating system?

  • A utility for creating and editing documents.
  • A tool for writing and compiling code.
  • An intermediary between a user of a computer and the computer hardware. (correct)
  • A program that directly manages computer hardware.

The primary goal of an operating system is to maximize CPU and I/O utilization, even if it means sacrificing user convenience.

False (B)

Name the component that provides basic computing resources like the CPU, memory, and I/O devices.

hardware

The _________ is the one program running at all times on the computer.

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

In a multiprogramming system, what is the purpose of CPU scheduling?

<p>To choose which job is ready to run when several jobs are ready. (A)</p>
Signup and view all the answers

In a non-multiprogrammed system, the CPU is always busy.

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

What is the key characteristic of a time-sharing system that distinguishes it from a batch system?

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

In a time-sharing system, the CPU is allocated to a job only if the job is in _________.

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

Match the following system types with their descriptions:

<p>Parallel Systems = Multiprocessor systems with close communication. Distributed Systems = Systems distributing computation among physical processors. Real-Time Systems = Systems characterized by immediate response.</p>
Signup and view all the answers

What is a key advantage of parallel systems?

<p>Increased reliability due to fault tolerance. (B)</p>
Signup and view all the answers

In asymmetric multiprocessing, each processor runs an identical copy of the operating system.

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

How do loosely coupled systems (distributed systems) communicate?

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

A _________ system provides an interface to clients to request services, such as database access.

<p>compute-server</p>
Signup and view all the answers

Which of the following is a characteristic of clustered systems?

<p>They share storage via a storage-area network (SAN) (A)</p>
Signup and view all the answers

Hard real-time systems typically allow secondary storage and are supported by general-purpose operating systems.

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

What is the purpose of a 'disk controller' in the context of storage structure?

<p>logical interaction</p>
Signup and view all the answers

The positioning time on a magnetic disk, which consists of seek time and _________, affects the data access time.

<p>rotational latency</p>
Signup and view all the answers

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

<p>Moving data from slower to faster storage systems. (D)</p>
Signup and view all the answers

Data transfer from disk to memory is typically a hardware function with no operating system control.

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

Name the two modes of operation provided by hardware to differentiate between user processes and the operating system.

<p>user and monitor</p>
Signup and view all the answers

All I/O instructions are _________ instructions, which can only be executed in monitor mode.

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

What is the purpose of the base and limit registers in memory protection?

<p>To define the range of legal addresses a program may access. (A)</p>
Signup and view all the answers

The CPU hardware does not contribute to protection by comparing every address generated in user mode with the registers.

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

Explain the concept of 'Cache Coherency and Consistency' within a multiprocessor system.

<p>consistency shared</p>
Signup and view all the answers

In the context of magnetic disks, a 'cylinder' refers to a set of concentric _________ that share the same track number across all platters in a disk drive.

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

Flashcards

Operating System

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

Hardware

Provides basic computing resources like CPU, memory, and I/O devices.

Operating System

Controls and coordinates hardware use among application programs for various users.

System and Application Programs

They defines how system resources are used to solve computing problems.

Signup and view all the flashcards

Resource Allocator

Manages and allocates system resources.

Signup and view all the flashcards

Control Program

Controls the execution of user programs and I/O device operations.

Signup and view all the flashcards

Kernel

The one program running at all times on the computer.

Signup and view all the flashcards

Multiprogramming

Keeping several jobs in memory at once, CPU multiplexed among them.

Signup and view all the flashcards

Time-Sharing System

Using CPU scheduling and multiprogramming to give each user a portion of time.

Signup and view all the flashcards

Personal Computer

A computer system dedicated to a single user.

Signup and view all the flashcards

Parallel Systems

Systems with multiple CPUs in close communication, sharing memory and a clock.

Signup and view all the flashcards

Tightly Coupled system

Processors share memory and a clock; communication through shared memory.

Signup and view all the flashcards

Symmetric Multiprocessing (SMP)

Each processor runs an identical copy of the OS.

Signup and view all the flashcards

Asymmetric Multiprocessing

Master assigns tasks; master schedules work for slave processors.

Signup and view all the flashcards

Distributed Systems

Distributing computation among physical processors connected via a communication link.

Signup and view all the flashcards

Loosely Coupled Systems

Connecting independent systems via a communication link.

Signup and view all the flashcards

Compute-Server

Provides an interface to clients for requesting services (e.g., database).

Signup and view all the flashcards

File-Server

Provides an interface for clients to store and retrieve files.

Signup and view all the flashcards

Peer-to-Peer (P2P) Systems

Nodes act as client, server, or both; registers service via network.

Signup and view all the flashcards

Clustered Systems

Multiple systems working together, sharing storage via a storage-area network (SAN).

Signup and view all the flashcards

Asymmetric Clustering

One machine in hot-standby mode.

Signup and view all the flashcards

Symmetric Clustering

Multiple nodes running applications, monitoring each other.

Signup and view all the flashcards

Real-Time Systems

Networks characterized by immediate response; used as control devices.

Signup and view all the flashcards

Storage Structure

Supplies main memory, programs must be in main memory to execute.

Signup and view all the flashcards

Caching

Checks cache, copies to cache if not there, assuming it will be used again.

Signup and view all the flashcards

Study Notes

Introduction to Operating Systems

  • An operating system (OS) is a program that acts as an intermediary between a user and computer hardware.
  • OS goals include executing user programs, solving user problems, making the system efficient to use, and utilizing hardware efficiently.

Computer System Components

  • Hardware provides the fundamental computing resources (CPU, memory, I/O).
  • The OS controls and coordinates hardware use among application programs for users.
  • System and application programs define how system resources are used to solve user computing problems like compilers, video games or database systems.
  • Users can be people, machines, or other computers.

Operating System Definitions

  • A resource allocator manages and allocates resources.
  • A control program controls the execution of user programs and I/O device operations.
  • The kernel is the core program running at all times; all else is system and application programs.

Multiprogramming Batched Systems

  • Multiprogramming keeps several jobs in main memory at once, multiplexing the CPU among them, which requires memory management and protection.
  • The OS picks and executes jobs from memory, switching to another job when the current one needs an I/O operation. This keeps the CPU and OS consistently active.
  • The number of jobs in memory is less than the number of all jobs on disk.
  • If memory is limited, the system chooses which jobs to bring in, in other words job scheduling.
  • If several jobs are ready to run, the system selects among them, in other words CPU scheduling.
  • Running multiple programs simultaneously requires memory management.
  • In older systems, the CPU sits idle when waiting for I/O. Conversely in multiprogramming, the CPU is continuously active.

OS Features Needed for Multiprogramming

  • OS Features needed for Multiprogramming include I/O routines, memory management, job and CPU scheduling, device allocation, and protection between the OS and programs.
  • Two main disadvantages of multiprogrammed batched systems include the user being unable to interact with their jobs while executing, and modification prohibition to study behavior.

Time-Sharing Systems - Interactive Computing

  • A time-sharing system uses CPU scheduling and multiprogramming to give each user a small portion of a time-shared computer.
  • The CPU is multiplexed among jobs in memory and on disk, and is allocated to a job only if the job is in memory.
  • The CPU switches jobs when one needs I/O, ensuring it remains consistently active.
  • Jobs are swapped between memory and disk, with the disk providing backup for main memory.
  • Online communication is provided between the user and the system.

Time-Sharing Systems

  • Disk management is a necessity for online file systems, because they store the files on collections of disks.
  • Concurrent execution uses CPU scheduling schemes.
  • Job synchronization and communication are required for orderly execution.
  • A mechanism to avoid deadlock is needed, to prevent jobs from waiting for each other indefinitely.

Personal-Computer Systems

  • Personal computers are dedicated to a single user.
  • They use I/O devices like keyboards, mice, display screens, and small printers.
  • PC operating systems were designed without multi-user or multi-tasking capabilities.
  • PC operating systems prioritize user convenience and responsiveness over maximizing CPU and I/O utilization.
  • Examples of PC operating systems are Microsoft Windows and Apple Macintosh.

Parallel Systems

  • Parallel systems are multiprocessor systems with more than one CPU in close communication.
  • Tightly coupled systems involve processors sharing memory and a clock with the communication often taking place across the shared memory.

Parallel system advantages

  • Increased throughput improves the number of processes completing per time unit.
  • Economics improve for large jobs, eliminating the need to make copies and distribute them among processors.
  • Speed increases for large jobs, because work is divided across processors.
  • Reliability increases via fault tolerance; when a processor fails, the remaining ones pick up the slack.

Parallel System Models

  • Symmetric multiprocessing (SMP) has each processor running an identical copy of the OS.
  • Most modern operating systems support SMP, like UNIX for the Multimax computer.
  • Asymmetric multiprocessing has each processor assigned a specific task, with a master processor scheduling and allocating work to slave processors.
  • The master performs I/O and computations, and only it can execute the OS.
  • Slaves can only execute user programs; the system cannot perform I/O if the master fails.
  • If a slave fails, it will cause some computations to be lost but the system will still function.
  • Asymmetric multiprocessing is more common in extremely large systems.

Distributed Systems

  • Distribute computation among multiple physical processors.
  • Loosely coupled systems connect two or more independent computer systems via a communication link.
  • Each processor in Loosely coupled systems has its own OS and local memory.
  • Processors communicate through lines (message passing) like high-speed buses or telephone lines.
  • Shared files and printers provide resource sharing.
  • Computation speed increases, because a job can be partitioned so each processor concurrently does a portion in load sharing.
  • Reliability increases because if one processor fails the rest still function.
  • Communications increases with things such as electronic mail and ftp.
  • LANs (Local Area Network), WANs (Wide Area Network), and MANs (Metropolitan-Area Network) are types of distributed systems.
  • Compute-servers provide an interface to clients for requesting services like database access.
  • File-servers provide an interface for clients to store and retrieve files.

Client-Server and Peer-to-Peer Systems

  • Client-server systems involves a network connecting multiple clients to a central server.
  • Peer-to-peer (P2P) systems do not distinguish between clients and servers with all nodes considered peers that can act as client, server, or both.
  • A node in P2P joins the P2P network, registers its service with a lookup service, and responds to service requests via a discovery protocol.
  • Napster and Gnutella are examples of P2P systems.

Clustered Systems

  • Clustered systems are like multiprocessor systems but involve multiple systems working together, often sharing storage via a storage-area network (SAN).
  • They provide high-availability by surviving failures through:
  • Asymmetric clustering (one machine in hot-standby mode).
  • Symmetric clustering (multiple nodes running applications, monitoring each other).
  • Some clusters support high-performance computing (HPC), with applications written to use parallelization.

Real-Time Systems

  • Real-Time Systems provide immediate responses, such as sensors bringing the data directly into the computer.
  • Often used as control devices in specialized applications, like scientific experiments, medical imaging or industrial control systems, and some display systems.
  • Well-defined fixed-time constraints are a must.
  • Hard real-time systems have limited or absent secondary storage, with data stored in short-term or read-only memory (ROM).
  • Hard real-time systems have conflicts with time-sharing systems and are not generally supported by general-purpose OSs.
  • Soft real-time systems have limited utility in industrial control or robotics, but are useful in multimedia or virtual reality applications needing advanced OS features.

Computer-System Architecture

  • I/O devices and the CPU can execute concurrently.
  • Each device controller manages a specific device type and has a local buffer.
  • The CPU moves data between main memory and local buffers.
  • I/O is done from device to the local buffer of controller.
  • The memory controller ensures orderly shared memory access by synchronizing access to the shared memory.
  • A device controller informs the CPU about operation completion by causing an interrupt.

Storage Structure

  • Main memory is the only directly accessible storage media for the CPU; programs must be in it to execute.
  • Secondary storage extends main memory, providing large, nonvolatile storage capacity.
  • Magnetic disks are metal or glass platters covered with magnetic recording material.
  • Disks are logically divided into tracks subdivided into sectors.
  • Disk controllers determine the logical interaction between the device and the computer.
  • The two surfaces of a platter are covered with magnetic material.
  • Platter diameters range from 1.8 to 5.25 inches.
  • There may be thousands of concentric cylinders in a disk drive, and each track may contain hundreds of sectors.
  • The transfer rate is the rate at which data is transferred between the drive and the computer.
  • Positioning time (or random access) consists of seek time and rotational latency.
  • Seek time is the time to move the disk arm to the desired cylinder.
  • Rotational latency is the time for the desired sector to rotate to the disk head.
  • Floppy disks consist of one platter with the head directly sitting on the surface. It’s inexpensive, has 1.4MB storage, and is slow compared with the hard disk.
  • The load instruction moves a word from main memory to an internal register to be executed.
  • The store instruction moves the content of a register to main memory.
  • Main memory is too limited to permanently store all the data, so secondary storage is used.
  • RAM is volatile, losing contents once power is off or lost.

Storage Hierarchy

  • Storage systems are organized in a hierarchy based on speed, cost, size, and volatility.
  • Caching copies information into faster storage, so main memory can be considered a last cache for secondary storage.
  • Registers, cache, and main memory are volatile.
  • All storage after main memory is non-volatile.
  • Caching involves checking cache memory first and then copying data from main memory assuming it will be needed again.
  • Data must be moved from secondary storage into main memory before use.
  • Data transfer from cache to CPU and registers is usually in hardware without OS involvement.
  • Data transfer from disk to memory is controlled by the OS.
  • Cache Coherency and Consistency in multiprocessor systems means that if shared data is in 2 or more caches, no caches have different values simultaneously.

Hardware Protection

  • Dual-Mode Operation provides hardware support to differentiate between at least two operation modes: user mode and monitor mode.

Dual-Mode Operation

  • Sharing system resources demands the operating system makes sure an incorrect program doesn't cause other programs to execute incorrectly.
  • User mode is for executing user programs on behalf of a user.
  • Monitor mode, also known as supervisor/system mode, operates on operating system's behalf.
  • At boot time, hardware starts in monitor mode. The OS loads, then starts user processes in user mode.
  • When an interrupt occurs, hardware switches from user to monitor mode.
  • When the OS gains control, it is in monitor mode
  • If dual mode is absent, systems are subject to the dual mode problem
  • Examples: MS-DOS for 8088 architecture lacks a dual mode, and MS-Windows NT and IBM OS/2 utilize the dual mode for greater protection.
  • A mode bit is added to the computer hardware to indicate current mode: Monitor (0) or User (1).
  • When an interrupt or fault occurs, hardware switches to monitor mode.
  • Privileged instructions can only be issued in monitor mode.

I/O Protection

  • All I/O instructions are privileged instructions.
  • A user program can not assume control of the computer while it is in monitor mode.

User of a System Call to Perform I/O

  • The system can execute I/O instructions only by the O.S.
  • For I/O, a user executes a system call requesting that the O.S. perform I/O.

Memory Protection

  • The goal is to protect the OS from user programs, and isolate user programs.
  • In cases of memory protection, two registers are added to establish the legal address range.
  • A base register holds the smallest legal physical memory address.
  • The Limit register contains the size of the legal range.
  • Memory outside the defined range is protected.
  • This hardware protection is accomplished in the CPU that only compares addresses generated that are in User Mode with the registers.
  • The base/limit registers can only be loaded by the O.S.

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