Presentation is loading. Please wait.

Presentation is loading. Please wait.

Operating Systems: Summary INF1060: Introduction to Operating Systems and Data Communication.

Similar presentations


Presentation on theme: "Operating Systems: Summary INF1060: Introduction to Operating Systems and Data Communication."— Presentation transcript:

1 Operating Systems: Summary INF1060: Introduction to Operating Systems and Data Communication

2 2004 Kjell Åge Bringsrud & Pål HalvorsenINF1060 – introduction to operating systems and data communication What is an Operating System (OS)? “An operating system (OS) is a collection of programs that acts as an intermediary between the hardware and its user(s), providing a high-level interface to low level hardware resources, such as the CPU, memory, and I/O devices. The operating system provides various facilities and services that make the use of the hardware convenient, efficient, and safe” Lazowska, E. D.: Contemporary Issues in Operating Systems, in: Encyclopedia of Computer Science, Ralston, A., Reilly, E. D. (Editors), IEEE Press, 1993, pp.980 It is an extended machine (top-down view)  Hides the messy details  Presents user with a virtual machine, easier to use It is a resource manager (bottom-up view)  Each program gets time with the resource  Each program gets space on the resource hardware user application operating system

3 2004 Kjell Åge Bringsrud & Pål HalvorsenINF1060 – introduction to operating systems and data communication Primary Components User interface (shell) Device management File management Memory management Processor (or process) management Communication services Operating system layer Application program layer Hardware layer Apparent to user  Shell  File system  Device management Transparent  Processor management  Memory management  Communication services

4 2004 Kjell Åge Bringsrud & Pål HalvorsenINF1060 – introduction to operating systems and data communication Processes vs. Programs What is a process?  a program is a set of instructions how to perform a task  the execution of a program is called a process  analogy: receipt vs. chef

5 2004 Kjell Åge Bringsrud & Pål HalvorsenINF1060 – introduction to operating systems and data communication Scheduling A task is a schedulable entity/something that can run (a process/thread executing a job, e.g., a packet through the communication system or a disk request through the file system) In a multi-tasking system, several tasks may wish to use a resource simultaneously A scheduler decides which task that may use the resource, i.e., determines order by which requests are serviced, using a scheduling algorithm Scheduling performance criteria and goals are dependent on environment and workload resource requests scheduler

6 2004 Kjell Åge Bringsrud & Pål HalvorsenINF1060 – introduction to operating systems and data communication CPU Scheduling Preemptive  currently executing task may be interrupted (preempted) by higher priority processes  preempted process continues later at the same state Non-preemptive  running tasks will be allowed to finish its time-slot (higher priority processes must wait) Many different scheduling algorithms  modern systems, like Windows and Linux, use some kind of priority based scheduling  the right time slice can improve overall utilization

7 2004 Kjell Åge Bringsrud & Pål HalvorsenINF1060 – introduction to operating systems and data communication Memory Memory management is concerned with managing the systems’ memory resources  allocating space to processes  protecting the memory regions  in the real world programs are loaded dynamically physical addresses it will get are not known to program – dynamic address translation program size at run-time is not known to kernel Each process usually has text, data and stack segments Systems like Windows and Unix use virtual memory with paging Many issues when designing a memory component

8 2004 Kjell Åge Bringsrud & Pål HalvorsenINF1060 – introduction to operating systems and data communication Segmentation & Paging Requiring that a process is placed in contiguous memory gives much fragmentation (and memory compaction is expensive) Segmentation  different lengths  determined by programmer  memory frames  programmer (or compiler tool chain) organizes program in parts move control needs awareness of possible segment size limits Paging  equal lengths (determined by processor)  one page moved into one memory frame  process is loaded into several frames (not necessarily consecutive) Memory lookup and address translation via tables, e.g., page table Many different page replacement algorithms, e.g., FIFO, Clock, LRU, …

9 2004 Kjell Åge Bringsrud & Pål HalvorsenINF1060 – introduction to operating systems and data communication 00100010 Virtual Memory & Memory Lookup 0010000000000100 12-bit offset Outgoing physical address 4-bit index into page table virtual page = 0010 = 2 Incoming virtual address (0x2004, 8196) 0 0101 1 0011 2 1101 3 0001 4 1001 5 0111 6 0000 7 0 8 0 9 1011 10 0000 11 1111 12 0000 13 0000 14 0000 15 0000 Page table 0010 present bit 000000000100 (0x6004, 24580) 110000000000100 Example: 4 KB pages (12-bit offsets) 16 bit virtual address space  16 pages (4-bit index) 8 physical pages (3-bit index)

10 2004 Kjell Åge Bringsrud & Pål HalvorsenINF1060 – introduction to operating systems and data communication Storage Disks are the main persistent secondary storage device The main bottleneck is often disk I/O performance due to disk mechanics: seek time and rotational delays Much work has been performed to optimize disks performance  scheduling algorithms try to minimize seek overhead (most systems use SCAN derivates)  memory caching can save disk I/Os  additionally, many other ways (e.g., block sizes, placement, prefetching, …) World today more complicated (both different access patterns, unknown disk characteristics, …)  new disks are “smart”, we cannot fully control the device

11 2004 Kjell Åge Bringsrud & Pål HalvorsenINF1060 – introduction to operating systems and data communication Storage File systems provide an abstraction to  file management – store, share, access, …  storage management – management of physical storage  access methods – functions to read, write, seek, …  … Files are often organized in hierarchical directories Many ways to manage file blocks, but many modern systems often use a variant of index-based management with a table of pointers (inodes or improvements)

12 2004 Kjell Åge Bringsrud & Pål HalvorsenINF1060 – introduction to operating systems and data communication Inter-Process Communication (IPC) Many ways to perform send messages or perform IPC on a machine, and we have briefly looked at  mailboxes - FIFO, messages has types  pipes – FIFO, no type  shared memory – shared memory mapped into virtual space  signals – send a signal which can invoke a special handler

13 2004 Kjell Åge Bringsrud & Pål HalvorsenINF1060 – introduction to operating systems and data communication Where to Continue? If you like…  … programming languages INF2100 – Project assignments in programming INF3110 – Programming languages (INF5110 – Compiler techniques)  … operating systems INF3150 & INF3160 – Operating systems 1 & 2  … data communication INF3190 – Data communications (INF5050 – Protocols and routing in the Internet) (INF5060 – Multimedia Networking using Network Processor Cards)


Download ppt "Operating Systems: Summary INF1060: Introduction to Operating Systems and Data Communication."

Similar presentations


Ads by Google