Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Operating System Machine Level

Similar presentations


Presentation on theme: "The Operating System Machine Level"— Presentation transcript:

1 The Operating System Machine Level
Chapter 6 Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

2 Operating System Machine
Positioning of the operating system machine level. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

3 Paging A mapping in which virtual addresses 4096 to 8191 are mapped
onto main memory addresses 0 to 4095. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

4 Implementation of Paging (1)
The first 64 KB of virtual address space divided into 16 pages, with each page being 4K. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

5 Implementation of Paging (2)
A 32 KB main memory divided up into eight page frames of 4 KB each. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

6 Implementation of Paging (3)
Formation of a main memory address from a virtual address. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

7 Demand Paging and the Working Set Model
A possible mapping of the first 16 virtual pages onto a main memory with eight page frames. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

8 Page Replacement Policy
Failure of the LRU algorithm. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

9 Segmentation (1) In a one-dimensional address space with growing tables, one table may bump into another. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

10 Segmentation (2) A segmented memory allows each table to grow
or shrink independently of the other tables. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

11 Comparison of paging and segmentation.
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

12 Implementation of Segmentation (1)
(a)-(d) Development of external fragmentation. (e) Removal of the external fragmentation by compaction. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

13 Implementation of Segmentation (2)
Conversion of a two-part MULTICS address into a main memory address. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

14 Virtual Memory on the Pentium 4 (1)
A Pentium 4 selector. A Pentium 4 code segment descriptor. Data segments differ slightly. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

15 Virtual Memory on the Pentium 4 (2)
Conversion of a (selector, offset) pair to a linear address. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

16 Virtual Memory on the Pentium 4 (3)
Mapping of a linear address onto a physical address. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

17 Virtual Memory on the Pentium 4 (4)
Protection on the Pentium 4. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

18 Virtual Memory on the UltraSPARC III (1)
Virtual to physical mappings on the UltraSPARC. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

19 Virtual Memory on the UltraSPARC III (2)
Data structures used in translating virtual addresses on the UltraSPARC. (a) TLB. (b) TSB. (c) Translation table. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

20 Implementation of Virtual I/O Instructions (1)
Reading a file consisting of logical records. (a) Before reading record (b) After reading record 19. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

21 Implementation of Virtual I/O Instructions (2)
Disk allocation strategies. (a) A file in consecutive sectors. (b) A file not in consecutive sectors. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

22 Implementation of Virtual I/O Instructions (3)
Two ways of keeping track of available sectors. (a) A free list. (b) A bit map. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

23 Directory Management Instructions
A user file directory and the contents of a typical entry in a file directory. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

24 Virtual Instructions for Parallel Processing
(a) True parallel processing with multiple CPUs. (b) Parallel processing simulated by switching one CPU among three processes. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

25 Use of a circular buffer.
Race Conditions (1) Use of a circular buffer. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

26 Parallel processing with a fatal race condition.
Race Conditions (2) Parallel processing with a fatal race condition. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

27 Parallel processing with a fatal race condition.
Race Conditions (3) Parallel processing with a fatal race condition. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

28 Parallel processing with a fatal race condition.
Race Conditions (4) Parallel processing with a fatal race condition. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

29 Failure of the producer-consumer communication mechanism.
Race Conditions (5) Failure of the producer-consumer communication mechanism. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

30 Process Synchronization Using Semaphores (1)
The effect of a semaphore operation. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

31 Process Synchronization Using Semaphores (2)
Parallel processing using semaphores. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

32 Process Synchronization Using Semaphores (3)
Parallel processing using semaphores. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

33 Process Synchronization Using Semaphores (4)
Parallel processing using semaphores. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

34 A rough breakdown of the UNIX system calls.
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

35 The structure of a typical UNIX system.
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

36 The structure of Windows XP.
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

37 The address space of a single UNIX process.
UNIX Virtual Memory The address space of a single UNIX process. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

38 Windows XP Virtual Memory
The principal Windows XP API calls for managing virtual memory. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

39 The principal UNIX file system calls.
UNIX Virtual I/O (1) The principal UNIX file system calls. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

40 UNIX Virtual I/O (2) A program fragment for copying a file using the UNIX system calls. This fragment is in C because Java hides the low-level system calls and we are trying to expose them. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

41 UNIX Virtual I/O (3) Part of a typical UNIX directory system.
Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

42 The principal UNIX directory management calls.
UNIX Virtual I/O (4) The principal UNIX directory management calls. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

43 Windows XP Virtual I/O (1)
The principal Win32 API functions for file I/O. The second column gives the nearest UNIX equivalent. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

44 Windows XP Virtual I/O (2)
A program fragment for copying a file using the Windows XP API functions. This fragment is in C because Java hides the low-level system calls and we are trying to expose them. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

45 Windows XP Virtual I/O (3)
The principal Win32 API functions for directory management. The second column gives the nearest UNIX equivalent, when one exists. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

46 Windows XP Virtual I/O (4)
The Windows XP master file table. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

47 UNIX Process Management (1)
A process tree in UNIX. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved

48 UNIX Process Management (2)
The principal POSIX thread calls. Tanenbaum, Structured Computer Organization, Fifth Edition, (c) 2006 Pearson Education, Inc. All rights reserved


Download ppt "The Operating System Machine Level"

Similar presentations


Ads by Google