Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
MTS system architecture wikipedia , lookup
Object storage wikipedia , lookup
Copland (operating system) wikipedia , lookup
Distributed operating system wikipedia , lookup
Windows NT startup process wikipedia , lookup
Spring (operating system) wikipedia , lookup
Burroughs MCP wikipedia , lookup
Unix security wikipedia , lookup
What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware What are Operating system goals? Execute user programs and make solving user problems easier Make the computer system convenient to use Use the computer hardware in an efficient manner Consider the Computer system different components: What does the Hardware provide us with? H/W provides basic computing resources as CPU, memory, I/O devices What does the Operating system do? Controls and coordinates use of hardware among various applications and users What do the Application programs do? They define the ways in which the system resources are used to solve the computing problems of the users Give some examples of Application Programs? Word processors, compilers, web browsers, database systems, video games Give some examples of users of the computer system? People, machines, other computers Discuss the following concepts: 1. OS is a resource allocator a. Manages all resources b. Decides between conflicting requests for efficient and fair resource use 2. OS is a control program a. Controls execution of programs to prevent errors and improper use of the computer What is the bootstrap Program? a. Typically stored in ROM or EPROM, generally known as firmware b. Initializes all aspects of system c. Loads operating system kernel and starts execution When the bootstrap program is loaded At power up or reboot Draw a schematic diagram showing the computer system organization What are the I/O Operations? 1. Read 2. Write 3. Modify Explain how the computer system operates? 1. I/O devices and the CPU can execute concurrently 2. Each device controller is in charge of a particular device type 3. Each device controller has a local buffer 4. CPU moves data from/to main memory to/from local buffers 5. I/O is from the device to local buffer of controller 6. Device controller informs CPU that it has finished its operation by causing an interrupt Discuss how the interrupt works with the operating system? a. Interrupt transfers control to the interrupt service routine generally, through the interrupt vector, which contains the addresses of all the service routines, ISR… e.g, h/w: keyboard hit, IRQ1….s/w: the MS-DOS for when the software to run, INT21h Q: The following statement explains which structure? “Used for high-speed I/O devices able to transmit information at speeds close to memory speeds” A: Direct access memory structure. Q: In direct access memory structure, what is the function of the DEVICE CONTROLLER? A: Device controller transfers blocks of data from buffer storage directly to main memory without CPU intervention Q: In direct access memory structure, a number of interrupts equal to the number of blocks of data is needed to be generated to access this block of data, (T/F) A: False Q: In direct access memory structure, ONLY ONE interrupt is generated per block, rather than the one interrupt per byte, (T/F) A: True Q: Consider Von Neumann architecture; explain how the instruction is executed in three steps. A: 1. Fetch instruction from memory into IR, Instruction Register 2. Decode the instruction. Fetch operands if needed and store them in some internal registers. 3. Execute the instruction. Store results, if any, back to memory. Q: Ideally, we want the programs and data to reside in main memory permanently. This arrangement usually is not possible. Why? A: For the following two reasons: 1. Main memory is usually too small to store all needed programs and data permanently. 2. Main memory is volatile storage device that loses its contents when power is turned off or otherwise lost. Q: What are the two characteristics of main memory? A: o Main memory – only large storage media that the CPU can access directly Random access Typically volatile Q: Secondary storage – extension of main memory that provides large nonvolatile storage capacity (T/F) A: True Q: Magnetic disks – rigid metal or glass platters covered with magnetic recording material, (T/F) A: True Q: In magnetic disks, disk surface is logically divided into tracks, which are subdivided into sectors, (T/F) A: True Q: What is the function of the disk controller? A: The disk controller determines the logical interaction between the device and the computer Q: How is the storage system is organized? A: Storage systems is organized in hierarchy of: Speed, Cost and Volatility Q: Define the concept of caching? A: Caching is copying information into faster storage system; main memory can be viewed as a cache for secondary storage Q: Important principle, performed at many levels in a computer (in hardware, operating system, software) (T/F) A: True Q: Explain how the caching is done? A: In two steps: 1. Information in use copied from slower to faster storage temporarily 2. 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 Q: Define a process? A: A process is a program in execution. It is a unit of work within the system. Program is a passive entity, process is an active entity. Q: What are the resources the process needs to accomplish its task? A: CPU, memory, I/O, files and data initialization Q: What does process termination require? A: Process termination requires reclaiming of any reusable resources Q: What is the function of the program counter? A: The program counter specifies the location of the next instruction to execute. Q: How many program counters does the single-threaded process have? A: Single-threaded process has one program counter. Q: How about the multi-threaded process? A: Multi-threaded process has one program counter per thread Q: Typically system has many processes, some user, and some operating system running concurrently on one or more CPUs (T/F) A: True Q: In process management, what activities the operating system is responsible for? A: 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 Q: In memory management, what activities the operating system is responsible for? A: Memory management activities: 1. Keeping track of which parts of memory are currently being used and by whom 2. Deciding which processes (or parts thereof) and data to move into and out of memory 3. Allocating and de-allocating memory space as needed Q: In storage management, OS provides uniform, logical view of information storage, (T/F) A: True Q: Abstracts physical properties to logical storage unit, the file. (T/F) A: True Q: Each medium is controlled by device (i.e., disk drive, tape drive), (T/F) A: True Q: What are the varying properties of storage devices? A: Varying properties include access speed, capacity, data-transfer rate, access method (sequential or random) Q: In file-system management, Files usually organized into directories, (T/F) A: True Q: What does access control do? A: Access control on most systems determines who can access what Q: In file system management, what activities the operating system is responsible for? A: OS activities include Creating and deleting files and directories Primitives to manipulate files and directories Mapping files onto secondary storage Backup files onto stable (non-volatile) storage media Q: In which case do we need to use mass storage (disks)? A: Usually disks used to store data that does not fit in main memory or data that must be kept for a “long” period of time Q: Disk subsystem determines the system overall speed, (T/F) A: True Q: In disk management, what activities the operating system is responsible for? A: OS activities in disk management are: 1. Free-space management 2. Storage allocation 3. Disk scheduling Q: What does WORM stand for? A: It stands for write-once, read-many-times … example: ROM Q: What does RW stand for? A: It stands for read-write … example: RAM Study the following material hard…….. Performance of Various Levels of Storage Q: Arrange the storage levels size wise from small to big? A: shift registers, cache memory, main memory and disk storage 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 I/O Subsystem • One purpose of OS is to hide peculiarities of hardware devices from the user • I/O subsystem responsible for Memory management of I/O including buffering (storing data temporarily while it is being transferred), caching (storing parts of data in faster storage for performance), spooling (the overlapping of output of one job with input of other jobs) General device-driver interface Drivers for specific hardware devices Third part…………… PROCESS MANAGEMENT Q: What is a process? A: A process is a program in execution. It is a unit of work within the system. Program is a passive entity, process is an active entity. Q: What resources the process needs to accomplish its task? A: Process needs the following resources to accomplish its task CPU, memory, I/O, files Initialization data Q: What does process termination require? A: Process termination requires reclaim of any reusable resources Q: Explain how the process is executed in a single-threaded process? A: Single-threaded process has one program counter specifying location of next instruction to execute Process executes instructions sequentially, one at a time, until completion Q: In multi-threaded process, how many program counters are there per thread? A: Multi-threaded process has one program counter per thread • Typically system has many processes, some user, some operating system running concurrently on one or more CPUs Concurrency by multiplexing the CPUs among the processes / threads 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 (or parts thereof) and data to move into and out of memory Allocating and de-allocating memory space as needed Storage Management…….. Starts here,,,, 15/5/1433 • OS provides uniform, logical view of information storage Abstracts physical properties to logical storage unit - file Each medium is controlled by device (i.e., disk drive, tape drive) Varying properties include access speed, capacity, data-transfer rate, access method (sequential or random) • File-System management Files usually organized into directories Access control on most systems to determine who can access what OS activities include Creating and deleting files and directories Primitives to manipulate files and directories Mapping files onto secondary storage Backup files onto stable (non-volatile) storage media Mass-Storage Management • Usually disks used to store data that does not fit in main memory or data that must be kept for a “long” period of time • Proper management is of central importance • Entire speed of computer operation hinges on disk subsystem and its algorithms • OS activities Free-space management Storage allocation Disk scheduling • Some storage need not be fast Tertiary storage includes optical storage, magnetic tape Still must be managed – by OS or applications Varies between WORM (write-once, read-many-times) and RW (read-write) 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 File System Let us start with a question: what a file system is? It is the foundation where we put data in it. It is a particular format on a hard disk. Examples of file system (FS): FAT12, FAT16, FAT32, NTFS and others… Not all OS recognize all FS. Some OS recognize FS to read, read and write or even do not recognize them at all. If you are running multiple OS on the same machine, make sure to choose the correct FS to use. Why? FAT: File Allocation Table One of the first PC-based FS dated back to 1980s. In windows 2000 and newer, FAT32 has been native support. FAT32 enables us to use larger volumes, partitions on HD, up to 2 TB. However the maximum size the file can be is 4 GB. Video camera uses FAT32. If you editing a move and all of the sudden the editing stops, what do you think the reason for this is? NTFS: New Technology File System Windows versions NT, 2k, XP, Server 2003, Server 2008, Vista and Windows 7 all support NTFS. This new technology FS comes with extensive improvements. File Compression Encryption Symbolic links (short cuts) Large file support Security Recoverability File System organization Files are organized into directories (folders). Directories can be nested. This is very useful for organizing documents, images, presentations, etc… Some folders are best left alone, no nesting, like system and application folders. Directory structure syntax Volumes are designated with drive letter and colon, e.g. C: D: H: It may be on a HD, CD, and DVD or somewhere across the network. Using slashes Back slashes (\) are used to designate directories and network shares. Forward slashes (/) are used for everything else like in browsers. Examples: C:\windows\system32\cmd.exe (back slash) www.ut.edu.sa/web/zrostom (forward slash) File naming File names has two parts: the actual file name and the extension and a dot separating between them, total length of 255. Legacy OS uses 8.3 file naming syntax, e.g. filename.txt. It is not necessary to use all 8 characters or 3 extension characters. You cannot use characters like \, /, ?, *, “, :, <, >, +. Different OS allow different characters. Examples of file names: Professor’s file.txt (√) Not [a] good “document”.txt (X) File extension tells what type the file is. Do not change it. Examples of extensions are txt, doc, mov ,….. Creating and deleting folders File manager provides the ways to create and move folders around. DOS has line commands to do so. File attributes A file can have some or more of the following attributes: Read-only: nobody can change the file contents Archive: designates a modified file since the last backup System: indicates a file as a system file, usually as hidden file.\ Hidden: designates a file as hidden file. NTFS includes a number of extended file attributes Permissions Not everyone can see your files on the computer or even across network. Folders and files can have specific permissions. Files: full control, modify, read & execute and read & write. Folders: full control, modify, read & execute, list folder contents and read & write. Review questions 1. Which file system is specific to MS Windows? NTFS 2. What does a plus sign (+) next to a folder do? Expands the folder to show any folders contained within the original one. 3. You are about to overwrite a file on your computer. Which file attribute is probably causing this issue? Read only attribute. Practical part………….. Built in windows tools Windows tools for Truble shooting 1. System restore 2. Safe mode 3. Task manager 4. Hard drive tools 5. Start up services and start up programs 6. MS config 7. Computer management System Restore: Definition A windows component that allows for the rolling back of system files, registry keys, installed programs, etc., to a previous state in the event of system malfunction or failure. The user may create a new restore point manually, roll back to an existing restore point, or change the System Restore configuration. Files and software that are affected by system restore System Restore will undo programs and applications that have been installed since the Restore Point, but data files such as documents, spreadsheets or music MP3's will not be touched. When to do system restore? If you notice that your computer is acting slow, weird, bizarre, funky or any other way than the way it is intended to run, perhaps it has been infected or compromised in some way. How to get to system restore: Press the pearl (start button) all programsaccessoriessystem toolssystem restore Safe Mode: Definition Safe mode is a diagnostic mode of computer OS. It is intended to fix most, if not all problems within an operating system. It is also widely used for removing Rogue security software, as malware and viruses. In safe mode, a stripped down version of OS is loaded. An OS in safe mode will have reduced functionality, but the task of isolating problems is easier because many non-core components are disabled (turned off). Safe mode typically provides access to utility and diagnostic programs so a user can troubleshoot what is preventing the operating system from working normally. Safe mode is intended for maintenance, not functionality, and provides minimal access to features. How to get to system restore: By pressing F8 while the system is booting. Task Manager Definition: Task manager provides detailed information about computer performance and running applications, processes and CPU usage, commit charge and memory information, network activity and statistics, logged-in users, and system services. The Task Manager can also be used to set process priorities, processor affinity, forcibly terminate processes, and shut down, restart, hibernate or log off from Windows. Hints: Before getting into task manager, get the information about the CPU type, OS and RAM. If CPU usage is 90% or more, then the computer has a problem. If RAM usage is full or plus, upgrade is needed At least 10% of hard disk size should be free, otherwise upgrade is needed Task manager tabs Applications The Applications tab in Task Manager shows a list of programs currently running. A set of rules determines whether a process appears on this tab or not. Most applications that have a taskbar entry will appear on this tab, but this is not always the case Right-clicking any of the applications in the list allows (among other things) switching to that application, ending the application, and showing the process on the Processes tab that is associated with the application. Choosing to End Task from the Applications tab causes a request to be sent to the application for it to terminate. This is different from what happens when End Process is chosen from the Processes tab. Processes The Processes tab shows a list of all running processes on the system. This list includes services and processes from other accounts. Right-clicking a process in the list allows changing the priority the process has, setting processor affinity (setting which CPU(s) the process can execute on), and allows the process to be ended. Choosing to End Process causes Windows to immediately kill the process. Choosing to "end Process Tree" causes Windows to immediately kill the process, as well as all processes directly or indirectly started by that process. Unlike choosing End Task from the Applications tab, when choosing to End Process the program is not given warning nor a chance to clean up before ending. However, when a process that is running under a security context different than the one of the process which issued the call to Terminate Process, the use of the KILL command line utility is required. By default the processes tab shows the user account the process is running under, the amount of CPU, and the amount of memory the process is currently consuming. There are many more columns that can be shown by choosing Select columns... from the View menu. Performance The performance tab shows overall statistics about the system's performance, most notably the overall amount of CPU usage and how much memory is being used. A chart of recent usage for both of these values is shown. Details about specific areas of memory are also shown. There is an option to break the CPU usage graph into two sections; kernel mode time and user mode time. Many device drivers, and core parts of the operating system run in kernel mode, whereas user applications run in user mode. This option can be turned on by choosing Show kernel times from the View menu. When this option is turned on the CPU usage graph will show a green and a red area. The red area is the amount of time spent in kernel mode, and the green area shows the amount of time spent in user mode. Networking The Networking tab, introduced in Windows XP, shows statistics relating to each of the network adapters present in the computer. By default the adapter name, percentage of network utilization, link speed and state of the network adapter are shown, along with a chart of recent activity. More options can be shown by choosing Select columns... from the View menu. Users The Users tab, also introduced in Windows XP, shows all users that currently have a session on the computer. On server computers there may be several users connected to the computer using Terminal Services. As of Windows XP, there may also be multiple users logged onto the computer at one time using the Fast User Switching feature. Users can be disconnected or logged off from this tab. Disk management tools: For a computer to work properly, the hard disk has to have 10% free space of its size. For example, a hard disk of 500GB size has to have at least d0GB of free space all the time for the computer to perform properly. Definition Disk management allows full management of the disk based hardware recognized by windows. What does disk management can do: 1. Partition a drive 2. Format a drive 3. Change a drive’s letter 4. Shrink a partition 5. Delete a partition 6. Change a drive’s file system How to access disk management: Depending on the Windows version, you may use one of the following ways: a. Start control panelsystem and securityadministrative toolsdisk management b. Startright click on computermanagedisk management Hard drive tools: Right click on a hard drive and open up the tools tab, you will see the following tools available: a. Error detecting, detects any errors within the hard disk b. Defragmentation c. Back up Start up components (services and programs) If you notice your computer takes long time to start up, you need to tune up your computer, by getting rid of some start ups. Items to take for this issue are: a. MSconfig start up tab b. Edit registry under local machine and current user c. Startup folder