Introduction to Operating Systems

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 in the context of computer system components?

  • To control and coordinate the use of hardware among various application programs for various users. (correct)
  • To define the ways in which system resources are used to solve computing problems.
  • To provide basic computing resources such as CPU and memory.
  • To serve as the interface through which users directly interact with hardware.

Which of the following best describes the 'kernel' in the context of operating system definitions?

  • A set of libraries that application programs use to interface with the operating system.
  • A program that manages and allocates resources.
  • The core program that runs at all times, with all other programs being system or application programs. (correct)
  • A program that controls the execution of user programs and I/O device operations.

In a multiprogramming batched system, how does the operating system handle a situation where a job needs to perform an I/O operation?

  • The operating system terminates the job and notifies the user.
  • The operating system moves the job to a special I/O queue and continues processing other jobs.
  • The operating system waits for the I/O operation to complete before proceeding.
  • The operating system switches to another job in memory to keep the CPU busy. (correct)

Which characteristic is a key feature of time-sharing systems that distinguishes them from multiprogramming batched systems?

<p>Providing each user with a small portion of a time-shared computer. (B)</p>
Signup and view all the answers

What is the primary goal of personal computer operating systems, contrasting them with other types of operating systems?

<p>To maximize user convenience and responsiveness. (B)</p>
Signup and view all the answers

In the context of parallel systems, what is a key characteristic of a 'tightly coupled system'?

<p>Processors share memory and a clock, facilitating close communication. (C)</p>
Signup and view all the answers

Which of the following is a primary advantage of using a parallel system (multiprocessor system)?

<p>Increased throughput and reliability. (D)</p>
Signup and view all the answers

What distinguishes a symmetric multiprocessing (SMP) system from an asymmetric multiprocessing system?

<p>In SMP systems, each processor runs an identical copy of the operating system. (A)</p>
Signup and view all the answers

In distributed systems, what does a 'loosely coupled system' primarily involve?

<p>Processors connected through a communication link, each having its own OS and local memory. (C)</p>
Signup and view all the answers

Which of the following is a significant advantage of distributed systems?

<p>Resource sharing and increased reliability through redundancy. (A)</p>
Signup and view all the answers

What is the key characteristic of Peer-to-Peer (P2P) systems in the context of distributed systems?

<p>All nodes are considered peers and can act as both client and server. (A)</p>
Signup and view all the answers

What is a primary characteristic of clustered systems?

<p>They provide high-availability service by having multiple systems working together. (A)</p>
Signup and view all the answers

What is the defining characteristic of real-time systems?

<p>They guarantee immediate response within well-defined time constraints. (A)</p>
Signup and view all the answers

What is the main difference between "hard" and "soft" real-time systems?

<p>Hard real-time systems have stricter timing requirements, where missing a deadline can be catastrophic. (C)</p>
Signup and view all the answers

In the context of computer-system architecture, what is the role of a device controller?

<p>To be in charge of a particular device type and manage data transfer. (A)</p>
Signup and view all the answers

How do I/O devices and the CPU operate in a modern computer system?

<p>I/O devices and the CPU can execute concurrently, improving overall system efficiency. (C)</p>
Signup and view all the answers

What event triggers a device controller to inform the CPU that it has completed its operation?

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

Why is main memory essential for CPU operation?

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

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

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

How is data accessed in the storage hierarchy, and what does "caching" achieve in this hierarchy?

<p>Data is accessed based on speed, cost, and volatility; caching copies information into faster storage systems. (D)</p>
Signup and view all the answers

What is the purpose of 'Dual-Mode Operation' in operating systems?

<p>To provide hardware support to differentiate between at least two modes of operation (user mode and monitor mode). (A)</p>
Signup and view all the answers

In the context of dual-mode operation, what is the significance of 'privileged instructions'?

<p>They can only be issued in monitor mode to protect system resources. (D)</p>
Signup and view all the answers

How does an operating system typically handle I/O requests from a user program?

<p>The user program makes a system call to request the operating system to perform I/O. (D)</p>
Signup and view all the answers

What mechanisms are used by operating systems to provide memory protection?

<p>Base and limit registers to define the range of legal addresses a program may access. (B)</p>
Signup and view all the answers

How is memory protection accomplished by CPU hardware?

<p>The CPU compares every address generated in user mode with base and limit registers. (A)</p>
Signup and view all the answers

Flashcards

What is an Operating System?

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

What is Hardware?

Providing basic computing resources such as CPU, memory, and I/O devices.

What is an Operating System's Role?

Controls and coordinates the use of hardware among various applications for multiple users.

System & Application Programs

Defines how system resources are used to solve computing problems for users.

Signup and view all the flashcards

What does a Resource Allocator do?

Manages and allocates resources within a computer system.

Signup and view all the flashcards

What is a Control Program?

Controls the execution of user programs and operation of I/O devices.

Signup and view all the flashcards

What is the Kernel?

The one program running at all times on the computer.

Signup and view all the flashcards

Multiprogramming definition

Several jobs are kept in main memory at the same time and the CPU is multiplexed among them.

Signup and view all the flashcards

Multiprogramming execution

OS picks and begins to execute one job from memory.Once this job needs an I/O operation, the OS switches to another job.

Signup and view all the flashcards

OS features for Multiprogramming

Memory management where the system allocates memory to several jobs, scheduling, allocation of devices, protection

Signup and view all the flashcards

Time-Sharing System

Uses CPU scheduling and multiprogramming to provide each user with a small portion of a time-shared computer.

Signup and view all the flashcards

Time-Sharing Characteristics

Swapping jobs between memory and disk, providing online communication, allowing interactive access.

Signup and view all the flashcards

Personal Computer

Computer system dedicated to a single user.

Signup and view all the flashcards

PC Operating System Goals

Maximize user convenience and responsiveness instead of maximizing CPU and I/O utilization.

Signup and view all the flashcards

Parallel Systems

Multiprocessor systems with more than one CPU in close communication.

Signup and view all the flashcards

Tightly Coupled System

Processors share memory and a clock; communication usually takes place through the shared memory.

Signup and view all the flashcards

Advantages of Parallel Systems

Increased throughput, economical, faster, increased reliability (fault – tolerant).

Signup and view all the flashcards

Symmetric Multiprocessing

Each processor runs an identical copy of the operating system.

Signup and view all the flashcards

Asymmetric Multiprocessing

Each processor is assigned a specific task; master processor schedules and allocates work to slave processors.

Signup and view all the flashcards

Distributed Systems

Distribute the computation among several physical processors.

Signup and view all the flashcards

Loosely Coupled System

Involves connecting 2 or more independent computer systems via communication link.

Signup and view all the flashcards

Storage Hierarchy

Storage systems organized in order of speed, cost, size, volatility.

Signup and view all the flashcards

Caching

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

Signup and view all the flashcards

Dual-Mode Operation

Provide hardware support to differentiate between at least two modes of operations: user, monitor

Signup and view all the flashcards

Memory Protection

Adding two registers - base and limit - that determine the range of legal addresses a program may access.

Signup and view all the flashcards

Study Notes

  • Introduction to operating systems covering topics such as what an operating system is, system architecture, system components, and memory layout

What is an Operating System?

  • Acts as an intermediary between a computer user and its hardware
  • Goal is to execute user programs, solve user problems and make the system convenient and efficient.

Computer System Components

  • Hardware provides the basic computing resources like CPU, memory, and I/O devices
  • The operating system controls and coordinates hardware use among different application programs and various users
  • System and application programs define how system resources are used to solve computing problems
  • Users can be people, machines, or other computers

Operating System Definitions

  • Resource Allocator manages and allocates resources
  • Control Program controls the execution of user programs and I/O device operations
  • Kernel is the one program running at all times, with all other programs being system or application programs

Multiprogramming Batched Systems

  • Multiprogramming involves keeping several jobs in main memory simultaneously
  • CPU is multiplexed among them, requiring memory management and protection
  • The OS picks and begins executing one job from memory
  • While a job requires an I/O operation the OS switches to another job, keeping the CPU busy
  • The number of jobs in memory is typically less than the number of jobs in the job pool on disk
  • If there isn't enough room in memory, the system chooses which jobs get loaded in, also known as job scheduling
  • The system must also decide which jobs get run at the same time, or CPU scheduling
  • Having multiple programs in memory at the same time requires effectively managing the memory
  • The CPU sits idle in a non-multiprogrammed system, but is always in use in a multiprogramming system

OS Features Needed for Multiprogramming

  • I/O routines are supplied by the system
  • Memory management allocates memory to several jobs
  • Job scheduling chooses jobs ready to run from disk
  • CPU scheduling chooses jobs ready to run in memory
  • Includes allocation of devices and general protection
  • Multiprogrammed batched systems cannot be used to interact with jobs as users are executing
  • Programmers also cannot modify a program as it executes to study its behavior

Time-Sharing Systems - Interactive Computing

  • Time-sharing systems utilize CPU scheduling and multiprogramming to provide a fraction of a time-shared computer to each user
  • The CPU is multiplexed among jobs in memory and on disk, and only allocated to jobs in memory
  • When a job requires an I/O operation, the CPU switches to another job, which keeps the CPU busy
  • Jobs get swapped between memory and disk, with the disk to act as a backup in main memory
  • On-line communication is provided between the user and the system
  • The OS gets the next control statement from the user's keyboard and not a card reader
  • It must be available for users to access data and code

Time-Sharing Systems

  • Features include an on-line file system, that manages disk collections
  • A mechanism for concurrent execution, involving CPU scheduling schemes
  • There is also job synchronization and communication to ensure orderly execution
  • A mechanism prevents deadlock, in case a job is waiting for another job forever

Personal-Computer Systems

  • Personal computers are computer systems dedicated to a single user
  • I/O devices include keyboards, mice, display screens and small printers
  • PC operating systems were not initially multi-user or multi-tasking
  • The main goal of PC Operating systems is to maximize user convenience and responsiveness instead of maximizing CPU and I/O utilization
  • Examples include Microsoft Windows and Apple Macintosh

Parallel Systems

  • Multiprocessor systems consists of multiple CPUs in close communication
  • In tightly coupled systems, processors share memory and a clock, where communication happens through shared memory
  • Advantages include increased throughput(completed processes per unit of time)
  • More economical, removing the need for multiple data copies
  • Faster because work is divided across processors
  • They also feature increased reliability and fault tolerance by picking up work from failed processors

Parallel Systems (Symmetric Multiprocessing)

  • Symmetric multiprocessing (SMP) model involves each processor running an identical copy of the operating system
  • Most modern operating systems support SMP, like UNIX for Multimax computers

Parallel Systems (Asymmetric Multiprocessing)

  • An asymmetric multiprocessing model involves each processor being assigned a specific task
  • The master processor schedules and allocates work to slave processors
  • The master handles I/O and executes only the operating system while the slave runs user programs only
  • If the master fails, the entire system cannot perform I/O and the same is true if there are lost slave computations
  • This model is more common in extremely large systems

Distributed Systems

  • Involves distributing computation among multiple physical processors
  • A loosely coupled structure describes two or more computer systems connected via a communication link
  • Each processor has its own operating system and local memory
  • Processors communicate using message passing over communication lines like high-speed buses or telephone lines
  • Advantages of distributed systems include sharing of resources(files and printers)
  • Computation can be partitioned for concurrent processing, which improves the system reliability and fault tolerance
  • This is also used for communications with electronic mail, ftp etc.

Distributed Systems - Networks

  • Local Area Network (LAN)
  • Wide Area Network (WAN)
  • Metropolitan Area Network (MAN)

Distributed Systems - Client-Server Systems

  • The compute-server provides an interface for clients to request services like accessing a database
  • The file-server provides an interface for clients to store and retrieve files

Distributed Systems - Peer-to-Peer (P2P)

  • P2P systems do not distinguish between clients and servers
  • All nodes are considered equals and can act as both client and server
  • Nodes can join the network by registering with a central lookup service or broadcasting requests via a discovery protocol
  • Napster and Gnutella represent examples of this

Clustered Systems

  • Consists of multiple systems working together like multiprocessor systems
  • Storage is usually shared via a storage-area network (SAN)
  • Provides high-availability through asymmetric(one machine is hot-standby) or symmetric clustering(multiple nodes running applications, monitoring each other)
  • Some clusters are used for high-performance computing (HPC), requiring applications to be written with parallelism in mind

Real-Time Systems

  • Real-time systems are characterized by the need to supply immediate responses, particularly when sensors bring data
  • They are often used as a control device in scientific experiments, medical imaging, industrial control systems, etc.
  • Such systems typically have well-defined, fixed-time constraints
  • Hard real-time systems have limited or no secondary storage
  • Data is stored in short-term memory or read-only memory (ROM)
  • These systems conflict with time-sharing systems and are not supported by general-purpose operating systems
  • Soft real-time systems have limited utility in industrial control or robotics
  • They can be used in multimedia applications, virtual reality requiring advanced operating-system 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 transfers data to and from main memory and local buffers
  • Memory controller ensures orderly access to shared memory, synchronizing all shared memory accesses
  • Device controllers notify the CPU upon operation completion by creating an interrupt

Storage Structure

  • Main memory is a large storage medium that the CPU accesses directly for program execution
  • Secondary storage is an extension of main memory, with large, non-volatile storage capacity
  • Magnetic disks have rigid metal or glass platters covered with magnetic recording material
  • Disk surfaces are logically divided into tracks which are then further divided into sectors
  • Disk controller handles the interface between the device and computer

Magnetic Disk Mechanism

  • Platters have two magnetic material-covered surfaces
  • Platter diameters may range from 1.8 to 5.25 inches
  • Disk drives may have thousands of cylinders organized into concentric cylinders, and each track may contain hundreds of sectors
  • The transfer rate is the rate at which data flows between the drive and the computer
  • Positioning time (or random access-time) consists of both the seek time and rotational latency
  • Seek time is the time required to move the disk arm to the desired cylinder
  • Rotational latency is the time required for the desired sector to rotate to the disk head

Memory & Storage Structure

  • Floppy disks are composed of one platter and a head that sits directly on the surface
  • Consisting of less storage at 1.4MB, it features slower speeds compared to hard disks, and are generally removable
  • The load moves a word from main memory to an internal register for CPU execution
  • The store instruction moves the content of a register to main memory
  • Programs/data are generally not stored in the main memory permanently because the main memory's maximum storage is limited
  • Main memory (RAM) is volatile, losing it's contents when power is turned off or lost
  • Therefore, data is generally backed up in secondary storage such as disks, CDs, drives etc.

Storage Hierarchy

  • Storage systems are organized based on levels
  • Attributes include Speed, Cost, Size, and Volatility
  • Caching involves copying information into faster storage system
  • Main memory acts as a last cache for secondary storage
  • CPU registers, caches, and main memory are volatile
  • All storage beyond main memory is non-volatile
  • Caching first checks cache memory, upon data absence it goes to main memory and assumes that there is a high probability that it will be needed again
  • Data must be moved from secondary storage into main memory before being used
  • Data transfer from cache to CPU and registers is a hardware function without OS control
  • Data transfer from disk to memory is controlled by the operating system
  • In multi-processor systems, when any shared data is held by 2+ caches, Cache Coherency and Consistency ensures that no 2 caches hold different values of the shared data simultaneously

Hardware Protection

  • Dual-Mode Operation
  • I/O Protection
  • Memory Protection

Dual-Mode Operation

  • Addresses shared resource concerns
  • Ensures that an incorrect program does not impact the correct running of other programs
  • Hardware supports two different modes of operation, User Mode and Monitor Mode
  • User mode is execution done on behalf of a user
  • Monitor mode is execution done by the operating system
  • At system boot time, the hardware starts in Monitor mode; the Operating system is loaded and starts user processes in User mode
  • Whenever an interrupt occurs, the hardware switches from User mode to Monitor mode
  • Whenever the O.S. gains control of the computer, it is in Monitor mode
  • MS-DOS for 8088 architecture does not have a dual mode and can be wiped over or written down
  • MS-Widows NT and IBM OS/2 take advantage of dual mode feature and provide greater protection for the O.S
  • A mode bit is added to the computer hardware to indicate the current mode: monitor (0) or user (1)
  • When either an interrupt or fault occurs, the hardware switches to monitor mode
  • Privileged instructions can only be issued in monitor mode

I/O Protection

  • All I/O instructions are privileged instructions of monitor mode
  • This ensures that a user program cannot gain control of the computer in monitor

System Call to Perform I/O

  • Only the operating system can process I/O instructions and operations
  • A user program executes the system call to request the operating system perform I/O

Memory Protection

  • The operating system and user programs must have memory protected from each other
  • In order to have memory protection, two registers can be added to define a range of legal addresses
  • The base register holds the smallest legal physical memory address of code
  • The limit register contains the size of the range
  • Any memory access outside of what range is protected
  • This protection is accomplished by CPU hardware comparing every address generated in User mode with the registers
  • The O.S. can load the base and limit registers

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