Download presentation
Presentation is loading. Please wait.
Published byMeghan Byrd Modified over 9 years ago
1
Computer Science/Ch. 5 System Softwares 5-1 Chapter 5 System Softwares
2
Computer Science/Ch. 5 System Softwares 5-2 Introduction User interface: Virtual machine: Hardware
3
Computer Science/Ch. 5 System Softwares 5-3 System softwares System softwares: – A collection of computer programs that manage the resources of a computer and facilitate access to those resources Hardware System softwares User Actual machine interface Virtual machine interface Virtual machine
4
Computer Science/Ch. 5 System Softwares 5-4 System softwares Role of System softwares: – Hide from user details of the internal structure of machine – Present important information in a way that is easy to understand – Allow the user to access computing resources in a simple and efficient way – Provide a secure and safe environment in which to operate Types of system softwares: Operating systems Language translator Memory managers Info. managers Scheduler utility assemblercompilers loaders linkers file systems database systems text editor...
5
Computer Science/Ch. 5 System Softwares 5-5 Types of system software Language translator: – assembler – compiler Memory managers: – allocate memory space for programs and date and load programs into memory prior to execution File system: – handle the storage and retrieval of information on mass storage devices such as disks, CD-ROMs, and tapes Scheduler: – Keeps a list of programs ready to run on the processor and selects the one that will execute next Utilities: – library routines that provide useful services to either a user or other system routines – text editor – debugging tools
6
Computer Science/Ch. 5 System Softwares 5-6 Assembler and assembly language Machine language: – use binary – allow only numeric memory addresses – difficult to change – difficult to create data Assembly language: assembly language program assembler machine language program Loader loaded into memory Hardware results
7
Computer Science/Ch. 5 System Softwares 5-7 Assembly language Advantages of using assembly language: – Use of symbolic operation codes rather than numeric ones – Use of symbolic names rather than numeric memory addresses – Pseudo-operations that provide useful user-oriented services such as data generation Sample assembly language: –format: Example: jump loop. loop:load X Data generation: five: data 5 negseven:data -7 lable: op-code mnemonic address field
8
Computer Science/Ch. 5 System Softwares 5-8 Assembly language Sample assembly language instruction set: op-codemnemonic meaning 0000load Xcon(X) -> R 0001store XR -> con(X) 0010clear X0 -> con(X) 0011add XR + con(X) -> R 0100increment Xcon(X) + 1 -> con(X) 0101subtract XR - con(X) -> R 0110decrement Xcon(X) - 1 -> con(X) 0111compare Xif con(X) > R then GT= ON if con(X) = R then EQ = ON if con(X) < R then LT = ON 1000 jump Xtransfer to location X 1001jumpgt Xtransfer to location X if GT = ON 1010jumpeq Xtransfer to location X if EQ = ON 1011jumplt Xtransfer to location X if LT = ON 1100 jumpneq Xtransfer to location X if EQ=OFF 1101in Xinput an integer from standard input device and store in location X 1110 out Xoutput the value in location X 1111haltstop program execution
9
Computer Science/Ch. 5 System Softwares 5-9 Example load B addC subtract SEVEN store A. A:data0 B:data 0 C:data 0 SEVEN:data7 Exercise: –write an assmbly program to compute the sum of 1+3+5+...+99
10
Computer Science/Ch. 5 System Softwares 5-10 Assembler Assembler's jobs: – convert symbolic op codes to binary – convert symbolic addresses to binary – put the translated instructions into a file for future use Two-pass assembler: – first pass: » symbol table – second pass: » translate source program into machine language
11
Computer Science/Ch. 5 System Softwares 5-11 Operating system Hardware Operating system user storage Input- Output
12
Computer Science/Ch. 5 System Softwares 5-12 Operating system Functions of OS: – user interface – program scheduling and activation – system and file access control – efficient resource allocation – deadlock detectionand error detection deadlock: – Example: » Program AProgram B » get tape driverget laser printer » get laser printerget tape driver » print the fileprint the file –deadlock prevention » if a program cannot get all resources it needs, it must give up all resources it currently owns and issue a completely new request –deadlock recovery
13
Computer Science/Ch. 5 System Softwares 5-13 Events in execution User command center Scheduler Resource allocator Dispatcher Hardware Execution
14
Computer Science/Ch. 5 System Softwares 5-14 Time sharing Multiuser systems User Machine A B C A B C time cycle
15
Computer Science/Ch. 5 System Softwares 5-15 Scheduling CPU burst time: – Actual CPU time for a job in its time period Scheduling algorithms – First-In-FIrst-Out (FIFO): FCFS – Shortest Job First (SJF) – Round Robin (RR) Classes of scheduling algorithms: –Nonpreemptive » do nor allow a job to be stopped once its CPU burst starts –Preemptive
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.