ITE 272 Introduction to ITE Part II - PowerPoint PPT Presentation

1 / 55
About This Presentation
Title:

ITE 272 Introduction to ITE Part II

Description:

Oversees all hardware resources and allocates them to user and applications as needed. Performs many low-level tasks on behalf of users and application programs ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 56
Provided by: cisUso
Category:
Tags: ite | fin | introduction | part

less

Transcript and Presenter's Notes

Title: ITE 272 Introduction to ITE Part II


1
ITE 272Introduction to ITE Part II
  • Final Exam Review
  • Chapters 11, 13 - Operating Systems IPC
  • Chapter 12 File and Secondary Storage
    Management
  • Linux Review

2
Operating System Overview
  • Operating System Management Functions
  • Oversees all hardware resources and allocates
    them to user and applications as needed
  • Performs many low-level tasks on behalf of users
    and application programs

3
Operating System Overview
Operating system management functions.
4
Operating System Overview
  • Operating System Layers
  • Command Layer (shell)
  • The users interface to the operating system
  • Service Layer
  • Contains a set of functions called by application
    programs and the command layer
  • Kernel
  • Manages resources and directly interacts with
    computer hardware

5
Operating System Overview
Layers of an Operating System
6
Resource Allocation
  • Resource Allocation Process
  • Keeps detailed records of available resources
  • Knows which resources are used to satisfy which
    requests
  • Schedules resources based on specific allocation
    policies to meet present and anticipated demands
  • Updates records to reflect resources commitment
    and release by processes and users

7
Resource Allocation
  • Single Process Resource Allocation
  • operating system grants application control of
    all unused resources

8
Resource Allocation
  • Multiple Process Resource Allocation
  • Multitasking OSs must be able to handle multiple
    programs and users simultaneously
  • Manages hardware resources to
  • Meet the resource needs of processes
  • Prevent processes from interfering with one
    another
  • Efficiently use hardware and other resources

9
Resource Allocation
  • Real and Virtual Resources
  • Real resource
  • Physical devices and associated system software
  • Virtual resource
  • Resources that are apparent to a process or user

10
Process Management
  • Process Control Data Structures
  • A process is a unit of executing software that is
    managed independently by the operating system
  • A process can request and receive hardware
    resources and operating system services

11
Process Management
  • Process Control Data Structures
  • Process Control Block (PCB)
  • Keeps track of each process by creating and
    updating a data structure
  • The PCB is created when the process is created,
    updated when the process changes, and deleted
    when the process terminates.

12
CPU Allocation
  • Threads
  • A portion (subdivision) of a process that can be
    scheduled and executed independently.
  • Do not have their own resources
  • In a multi-processor system threads are executed
    concurrently with the parent process

13
CPU Allocation
Process/Thread movement among states
14
CPU Allocation
  • Scheduling is either preemptive, priority-based
    or real-time
  • Preemptive Scheduling
  • Forces applications to share the CPU whether they
    want to or not.
  • The operating system parcels out CPU time slices
    to each program
  • Every process is given a fixed time slice

15
CPU Allocation
  • Priority-Based Scheduling
  • First-come first served
  • The scheduler always dispatches the ready thread
    that has been waiting the longest.
  • Explicit priority
  • Uses a set of priority levels and assigns a level
    to each process or thread.

16
CPU Allocation
  • Priority-Based Scheduling (cont)
  • Shortest Remaining Time Scheduling
  • Chooses the next process to be dispatched based
    on the expected amount of CPU time needed to
    complete the process.

17
CPU Allocation
  • Interrupt Processing
  • Occurs when a thread tries to access a resource
    that is not available
  • Thread is placed in a blocked state
  • If the event is correctable, thread remains in
    blocked state until it can be corrected
  • If the event is not correctable, thread is halted

18
Memory Allocation
  • Memory is divided into areas called partitions
  • Partitions are equal in size
  • Usually 64KB

19
Memory Allocation
memory allocation in a single-tasking operating
system.
20
Memory Allocation
  • Single-Tasking Memory Allocation
  • Contiguous Memory Allocation
  • The bulk of the operating system occupies lower
    memory addresses.
  • The application program is loaded above the
    operating system.
  • The remaining space is available for user
    programs and data.

21
Memory Allocation
Noncontiguous memory allocation
22
Memory Allocation
  • Multitasking Memory Allocation Goals
  • Allow as many active processes as possible.
  • Respond quickly to changing memory demands of
    processes.
  • Prevent unauthorized changes to a process memory
    region(s).
  • Implement memory allocation and addressing as
    efficiently as possible.

23
Memory Allocation
Several processes and operating system loaded
into 1MB fixed-size memory partitions
24
Memory Allocation
  • Memory Fragmentation
  • As processes are created, executed, and
    terminated, memory allocation changes accordingly
  • Memory partition allocation and deallocation
    leads to an increasing number of small free
    partitions separated by allocated partitions

25
Memory Fragmentation
Changes in memory allocation as processes execute
and terminate
26
Memory Allocation
Process 6 is allocated to noncontiguous memory
partitions
27
Virtual Memory
  • Mode of operating system memory management
  • Uses secondary storage to extend capacity of
    primary storage
  • Also called swap memory, swap space or paging
    memory

28
Virtual Memory
  • Programs are divided in 4KB segments called
    pages.
  • Memory is divided in the same manner called
    page frames
  • Secondary storage (swap space) is divided into
    page frames

29
Virtual Memory
  • Pages are allocated to page frames
  • Memory or secondary storage
  • Information about pages / page frames status are
    stored in page tables
  • References made to page in memory is called a
    page hit
  • References made to pages in secondary storage is
    a page fault

30
Virtual Memory
  • As space is needed, a page that needs to be
    written to a page frame is called a victim.
  • Removed because of needed space
  • Based on
  • Least recently used
  • Least frequently used

31
Virtual Memory
  • How does a process know where associated
    processes are in memory?
  • GDT (Global Descriptor Table)
  • Contains descriptors for all segments of a
    process
  • LDT (Local Descriptor Table)
  • Contains descriptors only for the process that
    the LDT was created for
  • Points to Page Directory
  • This method keeps a process from accessing any
    segments of memory other than its own

32
Virtual Memory
  • Processor keeps track of two other tables
  • Page Directories table of pointers to page
    tables
  • Contains an offset to allow the CPU to find the
    base physical address of the page
  • Page Tables contains memory address of the page
    if loaded into memory
  • Maps pages to page frames in the swap space
  • Sets and clears page table in memory flags each
    time pages are loaded or swapped

33
Virtual Memory
Relationship among segment and page (virtual
memory) tables
34
Virtual Memory
Address resolution with virtual memory management
35
Interprocess Communication
  • Used in peer-to-peer communication protocols and
    distributed applications
  • Provides method to allow programs to communicate
    with one another.
  • Synchronize activities
  • Exchange data

36
Interprocess Communication
  • Interprocess Signal
  • Signals are messages, also known as an interrupt
  • Sent between same process, independent processes
    or between OS and a process
  • Usually are flags or single value data items

37
Interprocess Communication
  • Pipes
  • FIFO buffer which enables concurrently executing
    process to communicate
  • Output of process A is input for Process B
  • Are shared memory locations that can be accessed
    by both processes
  • Remote Procedure Calls
  • When a process on one machine calls a process on
    another machine

38
Chapter 12
39
File Management System
  • Collection of system software that performs file
    and secondary storage management and access
    functions
  • Part of operating system
  • May be supplemented by additional software

40
File Management Systems
  • Implemented in layers
  • Command layer or application program
  • File control
  • Storage I/O control
  • Secondary storage devices

41
File Management Systems
  • Logical and Physical Storage Views
  • Logical Storage Views
  • Viewed by users as a collection of files
    organized within directories and storage volumes
  • Physical Storage Views
  • Collection of physical storage locations
    organized as a linear address space

42
Storage Allocation
  • Allocation Units
  • Smallest number of secondary storage bytes
    allocated to a file
  • Cannot be smaller than the unit of data transfer
    between the storage device and controller, which
    is normally called a block
  • Tradeoffs
  • Efficient use of secondary storage space for
    files.
  • Size of storage allocation data structures.
  • Efficiency of storage allocation procedures

43
Storage Allocation Table
Sample block diagram of a storage allocation
table. Records which allocation units are free
and which belong to files
Figure 12-9
44
Storage Allocation
Directory entries for storage allocation table
45
Storage Allocation
Storage allocation table matching storage
allocation shown in Fig 12-9
University of South Alabama - CIS ITE 272
46
Storage Allocation
  • Blocking and Buffering
  • A logical record is a collection of data items,
    or fields, that is accessed by an application
    program as a single unit
  • A physical record is the unit of storage
    transferred between the device controller and
    memory in a single operation

47
Storage Allocation
  • Blocking and Buffering
  • Logical record grouping within multiple physical
    records is called blocking
  • If a physical record contains just one logical
    record, then the file is said to be unblocked

48
Storage Allocation
Sample of blocking logical records
49
Storage Allocation
  • Blocking and Buffering
  • An FMS uses buffers in primary storage to store
    data temporarily as it moves between programs and
    secondary storage devices
  • A buffer is a scratchpad for extracting logical
    records from physical records

50
Storage Allocation
Reading of physical records to logical records
51
Access Controls
  • A File Management System helps prevent loss,
    corruption and unauthorized access to files.
  • The operating system is used to identify and
    authenticate users and their processes.
  • The file access is authenticated through ids and
    passwords.

52
Access Controls
  • UNIX defines three access control types
  • Read
  • Write
  • Execute
  • Windows NTFS permissions
  • Advanced security options based on group or user
    name

53
Linux Review
54
Linux review
  • File Management
  • Command to change permissions on a directory or a
    file
  • Parameters
  • Display the contents of a string within a file
  • Display the current working directory
  • Delete a file or directory
  • Navigate to a different directory
  • Display the contents of a directory

55
Linux review
  • Create a new directory
  • Rename a file or change its location
  • Display the contents of a file (also to create a
    new file)

56
Linux review
  • User Management
  • Create a new user account
  • Remove a user account
  • Location where user account info is stored
  • Location where secure user info is stored
  • Location where group info is stored

57
Linux review
  • Process Management
  • Display a static list of all current running
    processes
  • Display a dynamic list of current running
    processes
  • Stop a running process
  • Run a command with an adjusted scheduling
    priority
  • Command to change the priority values of one or
    more running processes

58
Linux review
  • Boot process
  • Where is the default runlevel specified?
  • Directory containing the runlevel script files
  • Other
  • Client program to open a terminal session on a
    remote computer
  • Command to configure a systems network settings

59
Questions ?
Write a Comment
User Comments (0)
About PowerShow.com