0% found this document useful (0 votes)
3 views14 pages

Lecture 2

The document discusses storage structures, highlighting the differences between main memory and secondary storage, as well as the importance of caching and the storage hierarchy. It covers process management activities, including the role of the operating system in managing processes, memory, and CPU utilization. Additionally, it emphasizes the need for cache coherency in multiprocessor environments and the significance of multiprogramming and timesharing for efficient CPU and I/O device usage.

Uploaded by

yushahabib25
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views14 pages

Lecture 2

The document discusses storage structures, highlighting the differences between main memory and secondary storage, as well as the importance of caching and the storage hierarchy. It covers process management activities, including the role of the operating system in managing processes, memory, and CPU utilization. Additionally, it emphasizes the need for cache coherency in multiprocessor environments and the significance of multiprogramming and timesharing for efficient CPU and I/O device usage.

Uploaded by

yushahabib25
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

STORAGE STRUCTURE

LECTURE 2
STORAGE STRUCTURE

 Main memory –only large storage media that the CPU can access
directly.
 Secondary storage –extension of main memory that provides large
nonvolatile storage capacity.
 Magnetic disks –rigid metal or glass platters covered with
magnetic recording material
 Disk surface is logically divided into tracks, which are subdivided
into sectors.
 The disk controller determines the logical interaction between the
device and the computer.
STORAGE HIERARCHY

 Storage systems organized in hierarchy.


 Speed
 Cost
 Volatility
 „Caching– copying information into faster storage system; main
memory can be viewed as a last cache for secondary storage.
STORAGE-DEVICE HIERARCHY
CACHING

 Important principle, performed at many levels in a computer (in


hardware, operating system, software)
 Information in use copied from slower to faster storage
temporarily
 Faster storage (cache) checked first to determine if information is
there
 If it is, information used directly from the cache (fast)
 If not, data copied to cache and used there
 „Cache smaller than storage being cached
 Cache management important design problem
 Cache size and replacement policy
PERFORMANCE OF VARIOUS LEVELS OF STORAGE

 Movement between levels of storage hierarchy can be explicit or


implicit
MIGRATION OF INTEGER A FROM DISK TO REGISTER

 Multitasking environments must be careful to use most recent


value, no matter where it is stored in the storage hierarchy
MULTIPROCESSOR
ENVIRONMENT
 Multiprocessor environment must provide cache coherency in
hardware such that all CPUs have the most recent value in their
cache
OPERATING SYSTEM STRUCTURE

 Multiprogramming needed for efficiency


 Single user cannot keep CPU and I/O devices busy at all times
 Multiprogramming organizes jobs (code and data) so CPU always
has one to execute
 A subset of total jobs in system is kept in memory
 One job selected and run via job scheduling
 When it has to wait (for I/O for example), OS switches to another
job
CONTINUE…

 Timesharing (multitasking) is logical extension in which CPU


switches jobs so frequently that users can interact with each job
while it is running, creating interactive computing
 Response time should be < 1 second
 Each user has at least one program executing in memory
 If several jobs ready to run at the same time (CPU scheduling)
 If processes don’t fit in memory, swapping moves them in and out
to run
MEMORY LAYOUT FOR MULTI-PROGRAMMED
SYSTEM MEMORY LAYOUT
PROCESS MANAGEMENT

 A process is a program in execution. It is a unit of work with in the


system.
 „Process needs resources to accomplish its task
 CPU, memory, I/O, files
 Process termination requires reclaim of any reusable resources „
 Single-threaded process has one program counter specifying
location of next instruction to execute
 Process executes instructions sequentially, one at a time, until
completion „
 Multi-threaded process has one program counter per thread
„Typically
PROCESS MANAGEMENT
ACTIVITIES

 The operating system is responsible for the following activities in


connection with process management: „
 Creating and deleting both user and system processes
 Suspending and resuming processes
 Providing mechanisms for process synchronization
 Providing mechanisms for process communication
 Providing mechanisms for deadlock handling
MEMORY MANAGEMENT

 All data in memory before and after processing


 All instructions in memory in order to execute
 „Memory management determines what is in memory when
 Optimizing CPU utilization and computer response to users
 Memory management activities
 Keeping track of which parts of memory are currently being used
and by whom
 Deciding which processes and data to move into and out of
memory
 Allocating and deallocating memory space as needed

You might also like