CPT 304: Operating Systems Theory and Design

The major functions of operating systems:

  • Process Management: scheduling processes, creating and deleting user and system processes, suspending and resuming processes, providing mechanisms for process synchronization and communication
  • Memory Management: keeps track of memory currently used and by whom, decides which process and data to move from memory, allocates memory space as needed
  • Storage Management: creating and deleting files and directories, mapping and backing up files

Illustrate the hierarchy of subsystems, components, or subcomponents of operating systems:

  •       Kernal: core of the OS, allows the applications to interact with the hardware
  •           Memory Management: manages the system’s memory to ensure all applications get the memory needed to execute instructions efficiently and optimize performance
  •           Process Management: handles the creation, scheduling, and termination of processes, helps ensure CPU efficiency
  •           File System: manages file organization and retrieval, allows for easier file management by users and applications
  •           Device Management: manages hardware components
  •           User Interface: allows users to interact with the system, controls instructions for hardware and software 

 D Describe process, process state, and process control block.

  • ·       Process: A program in execution
  • ·       Process State: New, Ready, Running, Waiting, Terminated
  • ·       Process Control Block (PCB): Represents each process in the operating system.  Can include process state, program counter, registers, and lists of open files.

Compare single- and multi-threaded motivations and models.

  • ·       Single-Threaded:

o   Motivation benefits are simplicity and predictability.

o   Models contain one thread and one CPU core, which requires tasks to be handled sequentially.  Most effective on simple applications.

  • ·       Multi-Threaded:

o   Motivation benefits are responsiveness, resource sharing, economy, and scalability

o   Models contain multiple threads and CPU cores for multiple function types.  Tasks can run concurrently.  More effective with complex applications.

Describe the critical-section problem and explain a software solution that resolves the problem.

The critical-section problem occurs when processes or threads must access the same shared resources simultaneously. The solution needs to ensure that when the resources are accessed, there is no deterioration in abilities and functions while the processes run.  The simplest software resolution is the Mutex Lock.  It ensures that only one process or thread can access the critical section at a time.  The lock will be released when the thread has finished using the critical section, allowing other threads to engage.

Objectives and functions of memory management in operating systems:

  • ·       Resource Allocation: Memory Allocations allow memory to be divided into partitions that contain one process. When a process is completed, the partition is freed to maximize efficiency.
  • ·       Memory Protection: Prevents unauthorized access to data to ensure no interference with memory processes.
  • ·       Memory Organization: Optimizes the use of all memory available by managing the memory hierarchy.
  • ·       Swapping and Paging: Swapping is a process moving from the main memory to a secondary store. Processes must be idle to be swapped. Paging divides memory into pages and page tables to manage where data is stored.

Compare and contrast the physical and virtual address space:

  • ·       Physical Address:

o   Definition: Refers to physical memory (RAM) in the hardware.

o   Mapping: Direct mapping to hardware addresses.

o   Size Limitations: Limited to memory size of the RAM.

o   Protection: Processes are isolated by hardware mechanisms.

o   Performance: Fast access without needing address translation.

o   Efficiency: Physical Address mapping can cause inefficient memory usage.

  • ·       Virtual Address:

o   Definition: Created by the OS to provide the illusion of a contiguous memory space.

o   Mapping: Mapped to physical memory using Memory Management Unit (MMU).

o   Size Limitations: Determined by the CPU architecture.

o   Protection: Provides protection by ensuring each process has it’s own virtual address.

o   Performance: Addresses need to be translated from virtual to physical.

 

Objectives and Functions of File Systems Management and Supported Operations:

  • ·       Storage Management: Allocates sufficient space to store files, deallocates files to free up space.
  • ·       Directory/Organizational Management: Creates a file system of directories and subdirectories in a hierarchal structure.
  • ·       File Operations: Creates, modifies, and deletes files.
  • ·       Security: Manages access, secures data through encryption.
  • ·       Data Integrity and Reliability: Backs up data to prevent loss, supports recovery in cases of unexpected loss.

Directory Structures

  • ·       Single Level: All files stored in a single directory, no subdirectories or file sharing.
  • ·       Two-Level: Separates the file system for users and their files; files are stored in subdirectories, prohibits sharing of files and directories.
  • ·       Tree-Structured: Each directory contains files and subdirectories, prohibits the sharing of files and directories.
  • ·       Acyclic-Graph: Each directory contains files and subdirectories, shares subdirectories and files.
  • ·       General Graph: Similar to acyclic-graph but allows cycles within the directory structure.

Input and Output Devices

  • ·       Hardware Input: keyboard, mouse, microphone, camera
  • ·       Hardware Output: monitor, printer, speakers, headset
  • ·       Software: the device drivers facilitating communication between hardware and computer systems.  Software translates the commands from the O/S to the hardware.

 Goals and principles of domain- and language-based protection:

  • ·       Goals:

o   Least Privilege: Users and programs have minimum access needed to perform their duties.

o   Failure Containment: Ensures failures don’t affect other domains through isolation.

  • ·       Principles:

o   Domain Structure: Established set of access rights for a user, process, or procedure.

o   Dynamic Domain Switching: Allows switching of domains for changes in access management.

o   Access Rights: Each domain has a defined set of operations.

 

Access Matrix for Specific Resource Protection:

·       The Access Matrix determines the permissions each subject (domain) has over each object (file). 


Security for Program, System, and Network Protection:

  • ·       Risks:

o   Malware

o   Denial of Service attacks

o   Unauthorized access

  • ·       Protection:

o   Access Control, such as passwords, to control user access.

o   Encryption to protect data.

o   Firewalls that prevent unauthorized access.

o   Regular Updates to ensure the latest security measures are being utilized.

 


Comments