Download
slide1 n.
Skip this Video
Loading SlideShow in 5 Seconds..
Mobile Operating Systems Symbian The Symbian OS home page shows the demand paging. symbian/symbianos/index.html Develop PowerPoint Presentation
Download Presentation
Mobile Operating Systems Symbian The Symbian OS home page shows the demand paging. symbian/symbianos/index.html Develop

Mobile Operating Systems Symbian The Symbian OS home page shows the demand paging. symbian/symbianos/index.html Develop

289 Views Download Presentation
Download Presentation

Mobile Operating Systems Symbian The Symbian OS home page shows the demand paging. symbian/symbianos/index.html Develop

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Mobile Operating Systems Symbian The Symbian OS home page shows the demand paging. http://www.symbian.com/symbianos/index.html Developer pages. http://www.forum.nokia.com/info/sw.nokia.com/id/dbb8841d-832c-43a6-be13- f78119a2b4cb.html Android. Open Handset Alliance --- Android Google mobile OS based on Linux. http://code.google.com/android/ SW stack http://code.google.com/android/what-is-android.html SDK tools http://code.google.com/android/intro/hello-android.html Hardware -- Paging Paging System for Pentium - - 4K pages and 4Mpages http://www.rcollins.org/ddj/May96/

  2. CMT603 Lecture 10 File Systems

  3. Contents • Files • File Attributes • File Operations • Access control • File System Mounting • Allocation methods • Contiguous • Linked • indexed • Real file systems • FAT • UFS • NTFS

  4. Files • A file is a named collection of related information that is recorded on secondary storage. • It is the smallest logical storage unit. • Data to be stored has to be in a file • It has a certain defined structure, which depends on its type. • Text files, source files, executable files, object files, etc.

  5. File attributes • File attributes typically include • Name -- human readable name • Identifier -- non-human-readable name • Type -- is need for those systems that supports different types of files • Location -- a pointer to the location • Size -- the current size • Protection -- access control information • Time, date, and user identification. • They are kept in the directory structure.

  6. File Operations • A file is an abstract data type and is associated with operations. • Basic operations • Creating a file • Writing a file • Reading a file • Repositioning within a file • Deleting a file • Truncating a file • Other two common operations • Appending to a file • Renaming a file

  7. Access Control • Read Write Execute • drwxrwxrwx • ls -l • chmod [references][operator][modes] file • References u-user, g-group, o-others, a-all • Operator +, -, = • Modes r,w,x • Example • chmod ug+rw text.txt

  8. File System Mounting File Sys A File Sys B Sub Dir B Sub Dir A Sub Dir B Sub Dir A Sub sub A Sub sub B Sub sub A Sub sub B File A File A

  9. File System Mounting File Sys A Sub Dir B Sub Dir A File Sys B Sub sub A Sub sub B File A Sub Dir B Sub Dir A Sub sub A Sub sub B File A

  10. Linux • Log into lapis (or any cslx machine) • You are in your directory (scm????) • cd .. To the home directory and view the mounted file systems on that specific machine.

  11. Mounting Local drives XP • From “My Computer” • Right Click > Manage • Click on Disk management. • From here local drives can be mounted into the directory structure

  12. Access to files • Sequential Access • Direct Access

  13. Allocation Methods • How to allocate space to files so that disk space is utilized effectively and file can be accessed quickly? • Three major methods • Contiguous • Linked • Indexed

  14. Contiguous Allocation • Each file occupies a set of contiguous blocks of disk. Problems? 0 1 2 3 4 5 6 7 8 9 11 12 13 14 10 15 16 17 18 19

  15. Contiguous Allocation • Benefits: • Quick and easy calculation of block holding data. • Supports both sequential and direct access. • Disadvantages: • Where is the best place to put a new file? • Problems when the file gets bigger. • Fragmentation problem. • IBM VM/CMS

  16. Linked Allocation • Each file is a linked list of disk blocks which may be scattered anywhere in the disk. 0 1 2 3 4 8 17 -1 5 -1 5 6 7 8 9 7 19 11 -1 ? 11 12 13 14 10 9 18 3 0 4 15 16 17 18 19 10 6 13 2 8

  17. Linked Allocation • Benefits • solves all the problems of contiguous allocation. • Disadvantages: • Potentially terrible performance for direct access. • Each file needs more space because each block contains a pointer to the next block. • Reliability problem • what if one pointer is lost?

  18. Linked Allocation with a File Allocation Table (FAT) • Use a file allocation table (FAT) • The table has one entry for each disk block, and is indexed by block number. • For each file: • The directory entry contains the block number of the first block of the file • The FAT is used as a linked list.

  19. Linked Allocation with a File Allocation Table (FAT) Directory FAT 0 1 2 3 4 R N U A O 5 6 7 8 9 A T C Y I 11 12 13 14 10 9 3 F L T 15 16 17 18 19 A 2 L O P

  20. Linked Allocation with a File Allocation Table (FAT) • Benefit • direct access time is improved. • Disadvantage • Results in a significant number of disk head seeks. • What happens if the FAT is cached? • Must save it occasionally!!!!!!

  21. Indexed Allocation • Each file has its own index block, which is an array of disk-block addresses. The ith entry in the index block points to the ith block of the file. 0 1 2 3 4 O L K E 5 6 7 8 9 Q E B I 4 12 16 13 7 17 15 0 11 12 13 14 10 H F N H T 15 16 17 18 19 L D L W

  22. Indexed Allocation • Benefits • Solves all the problems of contiguous allocation. • Support direct access, but not as efficient as FAT. • Disadvantages • Wasted space due to overhead of index block

  23. Unix • Directory holds file name and pointer to the inode • inode • File information • Owner • Size • Time stamp • Permissions • Pointers to file data blocks

  24. Fat 32 • Directory holds small attributes • Permissions • Date etc • Pointer to FAT index • 32 bits for the block numbers • Up to 4 G blocks • Typically 4K blocks • Windows XP still supports this.

  25. NTFS • Volumes can be split over physical drives • Uses Clusters, size of cluster configured at format time • Depends on size of the disk • Provides recovery mechanism • Logs the redo and undo info, does the change, commits the change • Ensures file system is safe not user data

  26. NTFS • Master File Table (MFT) • Structured Object • Contains attributes • The file data is an attribute • Small attributes are stored in the MFT • Resident attribute • Large attributes stored in One or more extents • A pointer to the extents is in the MFT • If more space is required, pointer to base file record • Data attribute, if small enough, stored in MFT

  27. Many Many Many More • See internet • as a starting point • http://en.wikipedia.org/wiki/Comparison_of_file_systems

  28. Free Space Management • Stored in a free space list • Commonly a bit vector 000110111011111110111101000000010111 • Modern processors have support for returning the first 1 in a word

  29. Linked List • Keep PTR to Head • Traversing list not efficient • Not done much 0 1 2 3 4 N A O 5 6 7 8 9 A T C I 11 12 13 14 10 L T 15 16 17 18 19 A O P

  30. Summary • Files • File Attributes • File Operations • Access control • File System Mounting • Allocation methods • Contiguous • Linked • indexed • Real file systems • FAT • UFS • NTFS

  31. How does it work? Modern OS are interrupt driven. Dual Mode Operation. User mode System mode Timers Architectures of Operating Systems Monolithic Layered Kernel Microkernel Increasing Efficiency Multi program Multi User Processes and Threads. Process - Program in execution. Thread - Lightweight process Context Switching Process Queues Thread Mappings Course Summary Creation Termination Created Exit Scheduler Dispatch Ready Running Interrupt I/O or Event Wait Blocked I/O or Event completion

  32. Why schedule processes? Preemption Scheduling Algorithms FCFS SJF Priority scheduling Round Robin Average Wait Time Turnaround time Multi Level Queues Real Systems Linux XP Process interaction Problems - Process interaction Software solutions Criteria for the solutions Mutual exclusion Progression Bounded wait Hardware solutions Locks OS solutions Semaphores Uses Classical problem What is Deadlock? Detecting Deadlock Preventing Deadlock Avoiding Deadlock Course Summary

  33. Addressing and Address binding Logical - Physical Addressing Memory Management Unit Contiguous Addressing Fixed Partition Variable Partition Non-Contiguous Addressing Paging Segmentation Virtual Memory Implementation Page Faults Files File Attributes File Operations Access control File System Mounting Allocation methods Contiguous Linked indexed Real file systems FAT UFS NTFS Course Summary

  34. Exam • 5 questions,:- • Compulsory : • 1 mixed (MJWM, MWD, IMC) • Choice (2 of 4): • 2 Computer Arch (MJWM) • 1 Networks (MWD) • 1 Operating Systems (IMC) • Maximum mark obtainable 75

  35. Exam • What is …. [2] • State …. [1] • Briefly describe … . [2] • Explain …. [5] • Describe …. [6]

  36. Past Questions (a) CPU scheduling algorithms are designed to keep a computer system running efficiently in a multiprogramming environment. Probably the best known criterion for judging the success of a particular scheduling algorithm is to measure the CPU utilization, i.e. the percentage of time that the CPU is busy (i.e. not sitting idle). Briefly describe three other criteria that could be used to measure the efficiency of CPU scheduling algorithms. [6] (b) Outline a scheduling algorithm that you think would be particularly appropriate for maximizing CPU utilization. Why do you consider it to be suitable? Describe scheduling algorithms that you believe would be suited to multiprogramming environments with efficiency measures based on each of the three other criteria from part (a). [8]

  37. Past Question • (c) Describe the meaning of the term virtual memory? Briefly distinguish between paging and segmentation, as memory management schemes for computer systems [4] • (d) Describe the main advantages and disadvantages of using segmentation rather than paging. [3] • (e) Consider a computer memory management system in which memory contains the following hole sizes in memory order: 10 KB, 4 KB, 20 KB, 18 KB, 7 KB, 9 KB, 12 KB and 15 KB. Which hole is taken for successive segment requests of: 12 KB, 10 KB, 9 KB when each of the following algorithms is used:- • (i) first fit, [1] • (ii) best fit, [1] • (iii) worst fit and [1] • (iv) next fit. [1]