Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Operating Systems Overview: Understanding the Role of an OS in Computer Systems, Study notes of Operating Systems

An overview of operating systems (os), explaining what they are, their role in computer systems, and the layers of a computer system. The services an os provides, the computer system layers, and the component architecture. It also discusses the importance of system and application programs, and the ways in which system resources are used to solve computing problems for users.

Typology: Study notes

Pre 2010

Uploaded on 09/17/2009

koofers-user-bzd
koofers-user-bzd 🇺🇸

10 documents

1 / 9

Toggle sidebar

Related documents


Partial preview of the text

Download Operating Systems Overview: Understanding the Role of an OS in Computer Systems and more Study notes Operating Systems in PDF only on Docsity! Maria Hybinette, UGA CSCI 4730 Operating Systems Operating Systems Overview Maria Hybinette, UGA 2 Outline ! What is an Operating Systems? ! Computer System Layers ! Computer System Component Architecture Maria Hybinette, UGA 3 Questions ! What are the major operating system components? ! What are basic computer system organizations? ! How do you communicate with the operating systems? ! What services does an operating system provide? Maria Hybinette, UGA 4 What is an Operating System? ! A program that acts as an intermediary between a user of a computer and the computer hardware. » Execute user programs and make solving user problems easier. ! Operating system goals: » Make the computer system convenient to use. » Use the computer hardware in an efficient manner. » Combination of the above. Maria Hybinette, UGA 5 Computer System Layers ! Hardware ! Operating system ! Application programs ! Users System and Application Programs compiler assembler text editor… Operating System Computer Hardware user 1 user 2 user n … Computer system can be divided roughly in four components: Maria Hybinette, UGA 6 Computer System Layers ! Hardware: » provides basic computer resources: – CPU, Memory, I/O Devices System and Application Programs compiler assembler text editor… Operating System Computer Hardware user 1 user 2 user n … Maria Hybinette, UGA 7 Computer System Layers ! Hardware ! Operating system: » Controls and coordinates use of hardware among various applications and users. System and Application Programs compiler assembler text editor… Operating System Computer Hardware user 1 user 2 user n … Maria Hybinette, UGA 8 Computer System Layers ! Hardware ! Operating system ! Application programs » define the ways in which the system resources are used to solve the computing problems of the users – Word processors, compilers, web browsers, database systems, video games System and Application Programs compiler assembler text editor… Operating System Computer Hardware user 1 user 2 user n … Maria Hybinette, UGA 9 Computer System Layers ! Hardware ! Operating system ! Application programs ! Users » People, machines, other computers System and Application Programs compiler assembler text editor… Operating System Computer Hardware user 1 user 2 user n … Maria Hybinette, UGA 10 Computer System Layers ! Hardware ! Operating system ! Application programs ! Users System and Application Programs compiler assembler text editor… Operating System Computer Hardware user 1 user 2 user n … Computer system can be divided roughly in four components: Maria Hybinette, UGA 11 What Do Operating Systems Do? ! OS is a resource allocator » Manages all resources » Decides between conflicting requests for efficient and fair resource use ! OS is a control program » Controls execution of programs to prevent errors and improper use of the computer Maria Hybinette, UGA 12 What Makes up the Operating System? ! No universally accepted definition! ! “Everything a vendor ships when you order an operating system” is good approximation… But varies wildly ! Operating System is the “Kernel” » the one program running at all times on the computer » everything else is either a – system program (ships with the operating system) or an – application program Maria Hybinette, UGA 25 Two I/O Methods Synchronous Asynchronous Maria Hybinette, UGA 26 Device-Status Table Maria Hybinette, UGA 27 Direct Memory Access Structure ! Used for high-speed I/O devices able to transmit information at close to memory speeds. ! Device controller transfers blocks of data from buffer storage directly to main memory without CPU intervention. ! Only one interrupt is generated per block, rather than the one interrupt per byte. Maria Hybinette, UGA 28 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. Maria Hybinette, UGA 29 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 Maria Hybinette, UGA 30 Caching ! Use of high-speed memory to hold recently-accessed data. ! 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 Maria Hybinette, UGA 31 Performance of Various Levels of Storage Maria Hybinette, UGA 32 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 must provide cache coherency in hardware such that all CPUs have the most recent value in their cache ! Distributed environment situation even more complex » Several copies of a datum can exist » Various solutions covered in Chapter 17 Maria Hybinette, UGA 33 Multi-programming ! 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 Multiprogramming needed for efficiency memory layout Maria Hybinette, UGA 34 Timesharing (Multitasking) ! Response time should be < 1 second ! Each user has at least one program executing in memory !process ! 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 ! Virtual memory allows execution of processes not completely in memory 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 Maria Hybinette, UGA 35 Hardware Protection ! Dual-Mode Operation ! I/O Protection ! Memory Protection ! CPU Protection Maria Hybinette, UGA 36 Dual-Mode Operation ! Dual-mode operation allows OS to protect itself and other system components » User mode and kernel/monitor mode » Mode bit (0 or 1) provided by hardware – Provides ability to distinguish when system is running user code or kernel code – Some instructions designated as privileged, only executable in kernel mode – System call changes mode to kernel, return from call resets it to user kernel user Interrupt/fault set user mode Maria Hybinette, UGA 37 Transition from User to Kernel Mode ! Timer to prevent infinite loop / process hogging resources » Set interrupt after specific period » Operating system decrements counter » When counter zero generate an interrupt » Set up before scheduling process to regain control or terminate program that exceeds allotted time Maria Hybinette, UGA 38 I/O Protection ! All I/O instructions are privileged instructions. ! Must ensure that a user program could never gain control of the computer in kernel mode (i.e., a user program that, as part of its execution, stores a new address in the interrupt vector). System call to perform I/O (recall monitor mode is the same as kernel mode) Maria Hybinette, UGA 39 Memory Protection ! Must provide memory protection at least for the interrupt vector and the interrupt service routines. ! In order to have memory protection, add two registers that determine the range of legal addresses a program may access: » Base register – holds the smallest legal physical memory address. » Limit register – contains the size of the range ! Memory outside the defined range is protected. Maria Hybinette, UGA 40 CPU Protection ! Timer – interrupts computer after specified period to ensure operating system maintains control. » Timer is decremented every clock tick. » When timer reaches the value 0, an interrupt occurs. ! Timer commonly used to implement time sharing. ! Time also used to compute the current time. ! Load-timer is a privileged instruction. Maria Hybinette, UGA 41 An Operating System’s Core Tasks ! Process Managements ! Memory Managements ! File Managements ! I/O System Managements ! Protection System Maria Hybinette, UGA 42 Process Management ! A process is a program in execution (an active entity, i.e. a running program ) » Basic unit of work on a computer » Examples: compilation process, word processing process » A process needs certain resources: – e.g. CPU time, memory, files, I/O devices to accomplish its task ! Each user can run many processes at once (e.g. using &) » One process: – cat file1 file2 & » Two processes: – ls | wc -l ! A time sharing system (such as UNIX) run several processes by multiplexing between them
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved