Operating Systems: Chapter 1

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

Match the following operating system functions with their descriptions:

Memory Management = Allocating and deallocating memory space as needed. Processor Management = Coordinating the execution of user programs. Device Management = Managing communication with hardware components. File Management = Organizing and tracking files in a structured manner.

Match the storage types with their characteristics:

Main Memory = Provides direct access to the CPU and is volatile. Secondary Storage = Offers large non-volatile storage capacity, slower access. Cache = Faster storage system used to temporarily store frequently accessed data. Registers = Fastest, but smallest storage on the CPU.

Match the computing environments with their focuses:

Multiprogramming = Focuses on maximizing CPU utilization through job organization. Multitasking = Allows users to interact with each job while it is running, interactive computing. Batch system = Jobs are collected and executed without user interaction. Real-time system = Provides immediate response and strict time constraints for computing.

Match the interrupt concepts with their roles:

<p>Interrupt = A signal to the CPU that an event needs immediate attention. Device Driver = Software that manages communication between the OS and a hardware device. Interrupt Handler = Code that determines what action should be taken for each type of interrupt. Trap = Software-generated interrupt caused by an error or user request.</p> Signup and view all the answers

Match the process management activities with their functions:

<p>Creating Processes = Allocating resources and setting up the initial state for execution. Suspending Processes = Pausing the execution of a process and saving its current state. Process Communication = Enabling data exchange and synchronization between processes. Deadlock Handling = Preventing or resolving circular dependencies among processes.</p> Signup and view all the answers

Match the operating system components with their functions:

<p>Kernel = The core software module of the OS, remains in main memory. Daemons = Services provided outside the kernel for system software maintenance. Device Driver = Allows operating system to interact with peripheral device. Bootstrap Program = Code to initialize the system and load the kernel.</p> Signup and view all the answers

Match the storage management concepts with their definitions:

<p>Caching = Copying information into faster storage system. Volatile Storage = Loses its contents when power is lost. Nonvolatile Storage = Retains its content when power is lost. Storage Hierarchy = Storage organized in terms of speed, cost, and volatility.</p> Signup and view all the answers

Match the security measures with their functions:

<p>Protection = Mechanism for controlling resource access. Security = Defense against system against external and internal attacks. User ID = A name that is associated with a number. Group ID = Allows a set of users to be defined, and controls managed.</p> Signup and view all the answers

Match the system operations with their roles:

<p>Bootstrap Program = Initializes system and loads the kernel. Dual-Mode operation = Protecting the system with user and kernel modes. Kernel loads = Core module of the operating system loaded first. Interrupt service = Ensures that device errors are handled correctly.</p> Signup and view all the answers

Match the system call process to the correct sequence:

<p>1 = User process executing. 2 = Gets system call. 3,4,5 = Execute system call. 7 = Return from system call.</p> Signup and view all the answers

Match the file system management tasks with their actions:

<p>Creating files = OS manages the creation of files and directories. Deleting files = OS is responsible for deleting directories. Mapping files = OS manages the way files are mapped onto secondary storage. Backup = Operating system handles the backup for non-volatile storage.</p> Signup and view all the answers

Match the following I/O subsystem components with their tasks:

<p>Buffering = Storing data temporarily while it is being transferred. Caching = Storing parts of data in faster storage for performance. Spooling = Overlapping of output of one job with input of other jobs. Device-Driver Interface = Communication between the operating system and a device.</p> Signup and view all the answers

Match the following types of memory with their speeds:

<p>Registers = The fastest among the choices. Cache = Slower than registers. Faster than main memory. Main memory = Fast, but not as fast as cache or registers. Solid-state disk = Slower than main memory.</p> Signup and view all the answers

Match the operating system activities related to memory management:

<p>Memory management = Optimizing CPU utilization. Keeping track = Storing the parts of memory being used. process decisions = Choosing which processes to memory into and out of memory. Memory allocation = Allocating and deallocating memory space.</p> Signup and view all the answers

Match the operation with the description

<p>Interrupt = An event that requires the attention of the CPU. Privileged instruction = An instruction that can only be run in kernel mode. Kernel = Runs in kernel mode. Mode switch = A transition from user to kernel.</p> Signup and view all the answers

Match the components of the OS with their characteristics.

<p>Kernel = Manages the most basic hardware and software processes. System daemons = Handle system level processes. Network daemons = Manage network processes. Device daemons = Handle processes related to devices.</p> Signup and view all the answers

Match the goal of a dual operation mode task to its characteristic:

<p>Kernel = Has unrestricted access to hardware. User = Runs user application. Goal = Protect the system components. Instruction = Executes privileged instructions.</p> Signup and view all the answers

Match the type of storage with its definition.

<p>Non-volatile = Will retain storage when turned off. Volatile = Does not retain storage when turned off. Storage Hierarchy = Terms of different speed, cost, and volatility. Cache = Quicker way of accessing frequently used data.</p> Signup and view all the answers

Regarding process management match the type with its description.

<p>Process switch = OS switches between the jobs. process scheduling = If tasks are ready to run the CPU allots task. Virtual memory = If tasks do not fit in main memory, the task is allocated to virtual memory. Memory = The user programs are allocated to main memory.</p> Signup and view all the answers

Match the following memory with their characteristics:

<p>Random access = Has random access. Volatile = The memory will be erased. Secondary Storage = An extension of main memory with large, non-volatile storage. Dynamic RAM = Random access memory.</p> Signup and view all the answers

What are the three things that operating system goals want to achieve?

<p>User program = Execute user-friendly programs. Convenient program = Make the computer system convenient to operate. Computer hardware = Use the computer hardware in an efficient manner. Program = Acts as an intermediary between computer and user.</p> Signup and view all the answers

Match the job accounting processes with their performance.

<p>Errors = Detect errors. Coordination = Allows user and software coordination. Computer tasks = Performs basic computer tasks. Network = Used on networks.</p> Signup and view all the answers

Which of the 4 components can a computer system be split upon?

<p>Hardware = provides basic computing resources. Operating system = controls and coordinates the use of hardware among various applications and users. Operating system application programs = define the ways in which the system resources are used to solve the computing problems of the users. Users = People, machines, other computers.</p> Signup and view all the answers

What device is responsible for a single operation.

<p>Disk = Connected through common bus providing access to shared memory. CPUs = Concurrent execution device. Memory = Competing memory cycles. USB controller = Provides USB connection.</p> Signup and view all the answers

Why is the memory hierarchy important?

<p>Speed = Memory has different speeds. Cost = Some memory has different costs. Volatility = Volatile memory is used for frequent tasks. Controller = Provides uniform access to memory.</p> Signup and view all the answers

Mass storage provides operations what operation should these operations have

<p>Mounting = These operations should be unmounted. Storage = Needs to have a method for storage allocation. Planning = Needs to create a disk scheduling. Partitioning = Should have a plan for creating the disk scheduling.</p> Signup and view all the answers

When the software is not working what method can be taken.

<p>Software glitch = An issue is caused by a divide/0. OS service call = The program calls the system. Infinite loop = The system gets stuck in a loop. Hardware = Driver has bug.</p> Signup and view all the answers

Match the three types of daemons with its use.

<p>System = Manages the system-wide settings, like time. Network = Manages the network interactions, like a DNS. System device = Interactions with the local devices connected to the hardware. Hardware integration = Software allows the hardware to be integrated.</p> Signup and view all the answers

Many of these are considered to be memory management what can be a task associated with memory management

<p>Program = The OS needs to load all of these into memory. Memory tasks = Optimal utilization of computers for users. Tracking = Where in the memory the task is. Storage = Allocating and deallocating memory as needed.</p> Signup and view all the answers

What does the modern computer system need to properly connect and what do they do.

<p>One or more CPUs. = Device is connected to a common bus. Shared memory. = Devices communicate and share data with memory. Concurrency = Multiple devices communicate at the same time. USB controller = Is a USB connection that can be accessed through controllers.</p> Signup and view all the answers

Match the different roles a computer system needs to perform an action.

<p>IO device = CPU can execute the interrupt concurrently. Each controller = Manages the particular device type. Local buffer = Each device can have its own access without interruption. Interrupt = The CPU gets informed that the operation is finished.</p> Signup and view all the answers

Regarding interrupt match the function name with the result.

<p>Interrupt architecture = Saves the memory locations. Exception = Caused by the software when an error occurs or user request. Interrupt driven = An OS's interrupts are driven by interrupts. User mode = The part that goes to enter kernel mode.</p> Signup and view all the answers

Match the following definitions between user and kernel mode.

<p>User mode = Program starts. Kernel mode = Access the hardware. If interrupt = In user mode only the task's operation is harmed. Can access = Kernel can access user programs.</p> Signup and view all the answers

Match the types of systems:

<p>Multiprogramming = Loads computer programs into memory. Increases the computer = Reduces the computer when it is idle. Used = When a program task is waiting. Batch operations = Used when operations need to run a long-running task.</p> Signup and view all the answers

Flashcards

Operating System (OS)

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

What Operating Systems Do

Managing computer resources, providing services to user programs, and coordinating program execution.

Functions of Operating System

Memory, processor, device, file, and I/O management.

Computer System Components

Hardware, OS, system/application programs, and users.

Signup and view all the flashcards

Bus (in Computer Systems)

A communication pathway allowing CPUs and device controllers to access shared memory.

Signup and view all the flashcards

Device Driver

A software component that manages a specific hardware device.

Signup and view all the flashcards

Interrupt

A signal that interrupts the CPU to indicate an event requiring attention.

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

What Interrupt Architecture Must Save

Saves the address of the interrupted instruction.

Signup and view all the flashcards

Interrupt Handling

Preserves the CPU state, determines interrupt type, and executes appropriate code.

Signup and view all the flashcards

Main Memory

Only storage media that the CPU can access directly.

Signup and view all the flashcards

Volatile Memory

Memory that loses its data when power is removed.

Signup and view all the flashcards

Nonvolatile Memory

Memory that retains data even when power is removed.

Signup and view all the flashcards

DRAM

Main memory in the form of Dynamic Random-Access Memory.

Signup and view all the flashcards

Storage Hierarchy

Organizing storage systems by speed, cost, and volatility.

Signup and view all the flashcards

Caching

Copying information into faster storage for quicker access.

Signup and view all the flashcards

Bootstrap Program

Simple code to initialize the system and load the kernel.

Signup and view all the flashcards

Operating System

It is loaded into RAM by the bootstrap program after system start.

Signup and view all the flashcards

Kernel

Core software module of an operating system, it remains in main memory.

Signup and view all the flashcards

Daemons

Services provided outside of the kernel, running in the background.

Signup and view all the flashcards

Kernel (Interrupt Driven)

OS activated by a hardware or software interrupt.

Signup and view all the flashcards

User Mode

Mode for running user applications with restricted access.

Signup and view all the flashcards

Kernel Mode

Mode for running kernel code with unrestricted hardware access.

Signup and view all the flashcards

Multitasking

Switches job so frequently that users can interact creating interactive computing.

Signup and view all the flashcards

Multiprogramming

Loading multiple programs into memory to share the CPU.

Signup and view all the flashcards

Timer

Saves OS from infinite loops by interrupting after a time period.

Signup and view all the flashcards

Process

A program in execution and an active unit of work.

Signup and view all the flashcards

Process Management Activities

Include process creation, deletion, suspension, and synchronization.

Signup and view all the flashcards

Memory Management

Optimizing CPU use, tracking memory parts, and allocating space

Signup and view all the flashcards

File-System Management

Files organized into directories and accessed with access control.

Signup and view all the flashcards

Mass-Storage Management

Disks store data that doesn't fit in main memory.

Signup and view all the flashcards

Caching

Copy from faster Storage.

Signup and view all the flashcards

I/O Subsystem

The OS provides uniform, logical view.

Signup and view all the flashcards

Protection

Mechanism for controlling access of users to the resources

Signup and view all the flashcards

Security

Defense of the system against internal and external threats.

Signup and view all the flashcards

Study Notes

  • Chapter 1 introduces the fundamental concepts of operating systems.

What is an Operating System?

  • An operating system (OS) acts as an intermediary between a computer user and the computer hardware.
  • The goals of an OS are to execute user programs, make computing easier, and utilize hardware efficiently.

What Operating Systems Do

  • Operating systems manage hardware and software, acting as communication channels.
  • They control computer resources, provide services to programs, coordinate program execution, and offer a user interface (virtual machine).
  • Operating Systems also hide software complexity, support multiple execution modes, and monitor program execution for errors.

Functions of Operating Systems

  • Operating systems handle memory, processors, devices, and files.
  • They also manage I/O, user interfaces, computer booting, security, system performance, job accounting, error detection, coordination between software/users, basic computer tasks, and network.

Computer System Structure

  • A computer system consists of hardware, operating systems, application programs, and users.
  • Hardware provides computing resources and the operating system controls and coordinates hardware use.
  • Application programs define how system resources are used, and users interact with the system.

Computer System Organization

  • Modern systems use CPUs and device controllers connected via a common bus for shared memory access.
  • Concurrent execution enables CPUs and devices to compete for memory cycles.

Computer System Operation

  • I/O devices and the CPU execute concurrently.
  • Device controllers manage specific device types, each with a local buffer.
  • The device driver manages this, and the CPU moves data between main memory and local buffers.
  • I/O occurs from the device to the local buffer and the device controller signals completion by causing an interrupt.

Common Functions of Interrupts

  • Interrupt architecture saves the address of interrupted instructions.
  • Traps or exceptions are software-generated interrupts caused by errors or user requests.
  • Operating systems are interrupt-driven.

Interrupt Handling

  • The operating system saves the CPU state (registers, program counter) upon interrupt.
  • It identifies the interrupt type and executes specific code to handle each interrupt.

Interrupt-driven I/O Cycle

  • The device driver initiates I/O.
  • While the CPU executes other code, the I/O controller initiates I/O and the CPU checks for interrupts.
  • When complete, the controller sends an interrupt signal.
  • The CPU transfers control to an interrupt handler, data is processed, and the CPU resumes the interrupted task.

Storage Structure

  • Main memory is accessible by the CPU, allowing random access.
  • Main memory is typically volatile while secondary storage provides larger, nonvolatile capacity.

Storage Hierarchy

  • Storage systems are organized in a hierarchy based on speed, cost, and volatility.
  • Caching involves copying information into faster storage for quicker access.
  • A device driver is used for each device controller to manage I/O and provide a uniform interface between the controller and the kernel

Operating-System Operations

  • The bootstrap program initializes the system and loads the kernel, typically residing in the ROM.
  • The operating system is then loaded into RAM, and device drivers are started.

Kernel Loading

  • The kernel is the core software module of an operating system, loading first and residing in main memory permanently.
  • It is placed in protected memory and controls device functions, memory/task management, and disk management.
  • The kernel also provides software infrastructure, like drivers to integrate system hardware with application software.

Daemons

  • Daemons are system software running in the background without direct user interaction.
    • System Daemons manage system-wide functions like time synchronization
    • Network Daemons handle network-related processes such as DNS
    • Device Daemons manage processes specific to a particular device, i.e. Bluetooth

Kernel Operations

  • Kernel operations are interrupt-driven, activated by hardware and software.
  • The OS is activated by an interrupt and suspends a running program and transfers control to the OS.
  • A program resumes once the service is completed.
  • Hardware interrupts are caused by devices, while software interrupts (exceptions or traps) occur due to software errors/system calls.

Multiprogramming (Batch system)

  • Single users cannot always keep CPU and I/O busy.
  • Multiprogramming organizes jobs so that CPU always has one to execute, and a job is selected and run by job scheduling.
  • In order to do this, a subset of total jobs in the system is kept in memory
  • When a job waits (e.g., for I/O), the operating system switches to another job.

Multitasking (Timesharing)

  • Multitasking allows frequent switching between jobs enabling interactive computing.
  • Each user has at least one process (task) executing in memory.
  • CPU scheduling takes place if several jobs are ready to run at the same time.
  • Swapping moves processes in and out of memory and Virtual memory allows the execution of processes not completely in memory.

Multiprogramming vs Multitasking

  • Multiprogramming loads multiple programs to share the CPU, switching between them, to increase CPU utilization. It usually does not involve direct user interaction.
  • Multitasking executes multiple tasks simultaneously by rapidly switching between them. This improves user responsiveness and allows for interactive computing.

Dual-mode Operation

  • Dual-mode operation protects the OS and system components.
  • User mode runs user applications, while kernel mode executes OS code with unrestricted hardware access.

Transition from User to Kernel Mode

  • System calls switch the mode to kernel, and return calls reset the mode to user.
  • Some privileged instructions can only be executed in kernel mode.
  • The mode bit provided by hardware distinguishes between user and kernel code.
  • When a user runs, the code bit is "user" while if the kernel is running the mode bit is set to "kernel".

User Mode vs Kernel Mode

  • User Mode is restricted, with application programs executing. An interrupt will cause only one process to fail and cannot access kernel programs directly.
  • Kernel Mode is privileged when accessing hardware resources.
  • In kernel mode, an interrupt could cause the whole operating system to fail, although both user and kernel programs can perform access.

Timer

  • A timer can prevent infinite loops by interrupting the computer after a set time period.
  • After an interrupt the operating system sets a counter (privileged instruction), and generates an interrupt upon zero.
  • Timers are setup before scheduling so as to regain control or terminate a program.
  • The Timer is privileged, only the OS can load it.

Process Management

  • A process is an active program in execution, requiring resources to accomplish its task (CPU, memory, I/O, files).
  • Every single-threaded process has a program counter, while a multi-threaded process has one program counter per thread.
  • Processes can run concurrently using concurrency by multiplexing CPUs among threads.

Process Management Activities

  • Process Management Activities are the responsibility of the operating system.
  • O/S activities includes creating/deleting processes, suspending/resuming, providing mechanisms for synchronization, communication, and preventing deadlocks.

Memory Management

  • Instructions must be in memory to execute programs.
  • The data that needed by programs must be in memory.
  • Memory management optimizes CPU utilization and computer response to users.
  • Memory must also be tracked for usage, decide which data to move in or out, and allocate/deallocate as needed.

File-system Management

  • The operation system provides a uniform, logical view of information storage through files.
  • Managing a file-system includes files usually organized into directories, access control to determine who can access what, and OS activities like creating/deleting, primitives to manipulate files and directories, mapping/backup, and files onto secondary storage.

Mass-Storage Management

  • Disks are usually used to store data that must be kept for a "long" period.
  • It is important to properly manage storage.
  • Storage activities include: mounting/unmounting, fee-space management, storage allocation, disk scheduling, partitioning, and protection.

Caching

  • Caching is used performantly at multiple computer levels (hardware, operating system, software).
  • Information in use is copied from slower to faster storage temporarily.
  • If information is available, it is used directly from the (cache)
  • Otherwise, data is copied to cache and used there.
  • Issues include caching management and size / replacement policy

Types of Storage

  • There are different levels of storage with different characteristics like name, size, implementation, technology, access-time, and transfer speed.
  • The main levels are registers, cache, main memory, solid-state disk, and magnetic disk.
  • Moving between levels of storage hierarchy can be explicit or implicit.

I/O Subsystem

  • An operating system hides hardware device peculiarities.
  • I/O Subsystem provides Memory management, General device-driver interface and Drivers for specific hardware devices
  • Memory management includes I/O request scheduling, buffering, caching, spooling, error handling and I/O protection

Protection and Security

  • Protection mechanism controls access of processes or users to defined resources.
  • Security defends the system internally and externally (denial-of-service, worms, viruses, identity theft, theft).
  • Systems distinguish users via user identities (user IDs, security IDs).
  • Systems also utilize group identifier which allows a set of users to be defined and managed, then associated with each process, file
  • Security is escalated using Privilege escalation to allow the user to the affected ID with more rights

Studying That Suits You

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

Quiz Team

Related Documents

More Like This

Introducción a Sistemas Operativos
13 questions
Operating Systems: Functions and Types
20 questions
Use Quizgecko on...
Browser
Browser