BeOS AJ Schuster Robert Robinson Nicole Chung Brian Hoffman.
-
Upload
ruth-clarke -
Category
Documents
-
view
217 -
download
0
Transcript of BeOS AJ Schuster Robert Robinson Nicole Chung Brian Hoffman.
![Page 1: BeOS AJ Schuster Robert Robinson Nicole Chung Brian Hoffman.](https://reader036.fdocuments.net/reader036/viewer/2022082506/5697bfee1a28abf838cb971d/html5/thumbnails/1.jpg)
BeOS
AJ SchusterRobert Robinson
Nicole ChungBrian Hoffman
![Page 2: BeOS AJ Schuster Robert Robinson Nicole Chung Brian Hoffman.](https://reader036.fdocuments.net/reader036/viewer/2022082506/5697bfee1a28abf838cb971d/html5/thumbnails/2.jpg)
What Is BeOS?
• Not a UNIX derivative
• Be, Inc. formed in 1990
• First public release in 1996– Ran on proprietary hardware: BeBox
• 1997: Be quits the hardware business
![Page 3: BeOS AJ Schuster Robert Robinson Nicole Chung Brian Hoffman.](https://reader036.fdocuments.net/reader036/viewer/2022082506/5697bfee1a28abf838cb971d/html5/thumbnails/3.jpg)
BeOS on x86
• 1998: Release 4 retails for US$70– Runs on PowerPC, x86, more
• 2000: Release 5 “Personal Edition”– 512MB partition limit
• 2001: Be bought by Palm, Inc.
• Today: OpenBeOS
![Page 4: BeOS AJ Schuster Robert Robinson Nicole Chung Brian Hoffman.](https://reader036.fdocuments.net/reader036/viewer/2022082506/5697bfee1a28abf838cb971d/html5/thumbnails/4.jpg)
BFS (Be File System)
• Structure based on standard *NIX hierarchy
• Earliest general-purpose journaling file system– Similar to transaction support in databases– Eliminates need for scandisk or fsck
![Page 5: BeOS AJ Schuster Robert Robinson Nicole Chung Brian Hoffman.](https://reader036.fdocuments.net/reader036/viewer/2022082506/5697bfee1a28abf838cb971d/html5/thumbnails/5.jpg)
Memory Management
• Memory Model
• Implementation at the Microkernel level
Figure 3 – BeOS Architecture<[email protected]>
![Page 6: BeOS AJ Schuster Robert Robinson Nicole Chung Brian Hoffman.](https://reader036.fdocuments.net/reader036/viewer/2022082506/5697bfee1a28abf838cb971d/html5/thumbnails/6.jpg)
Memory Model
• Virtual Memory Addresses (mapping dynamic memory)– Shared by threads and processes
– Can be locked into RAM
• Object-Oriented Design
• Full Memory Protection
• Symmetric Multi-Processing (SMP)
![Page 7: BeOS AJ Schuster Robert Robinson Nicole Chung Brian Hoffman.](https://reader036.fdocuments.net/reader036/viewer/2022082506/5697bfee1a28abf838cb971d/html5/thumbnails/7.jpg)
Implementation at theMicrokernel Level
• BeOS Threads and Objects
• Communication between Threads– Message Handling with BLooper– Ports (FIFO message repositories)– Semaphores (data protected locks)– Benaphores (Increased efficiency in data
protection)
![Page 8: BeOS AJ Schuster Robert Robinson Nicole Chung Brian Hoffman.](https://reader036.fdocuments.net/reader036/viewer/2022082506/5697bfee1a28abf838cb971d/html5/thumbnails/8.jpg)
Internal Data Structures
• Structures Used in Process Management– Thread creation– Thread execution and control– Thread termination
• Structures Used in Memory Management– BLooper (Interface between objects & threads)– Semaphores, Ports, and Images
• Structures Used in File Management– Bfile– Bdirectory
![Page 9: BeOS AJ Schuster Robert Robinson Nicole Chung Brian Hoffman.](https://reader036.fdocuments.net/reader036/viewer/2022082506/5697bfee1a28abf838cb971d/html5/thumbnails/9.jpg)
Threads
• Multi-threaded Architecture of BeOS– Pervasive multi-threading– Teams
• Kinds of Threads– Real-time & time-sharing– listener and image threads
![Page 10: BeOS AJ Schuster Robert Robinson Nicole Chung Brian Hoffman.](https://reader036.fdocuments.net/reader036/viewer/2022082506/5697bfee1a28abf838cb971d/html5/thumbnails/10.jpg)
CPU Scheduler• There are two types of threads: real-time and time-
sharing.
• Each thread is assigned a priority number 1-120.
• Levels 1-99 are assigned to time-sharing threads.
• Levels 100-120 are reserved for real-time threads.
• Time-sharing threads are scheduled according to their priority number and a logarithmic scale of 2.
– A thread with priority number 6 would be 26 or 64.
– A thread with priority number 8 would be 28 or 256.
• So a thread with a priority number greater by 2 is four times as likely to be chosen to execute.
![Page 11: BeOS AJ Schuster Robert Robinson Nicole Chung Brian Hoffman.](https://reader036.fdocuments.net/reader036/viewer/2022082506/5697bfee1a28abf838cb971d/html5/thumbnails/11.jpg)
CPU Scheduler (continued)• A new time-sharing thread is chosen every “scheduler quantum.”
• A “scheduler quantum” is set to 3 milliseconds in BeOS.
• Multiple processors are a little more complicated but follow the same principle.
– No time-sharing thread should keep a real-time thread from executing.
• A real-time thread can be executing on the first processor while a time-sharing thread executes on another processor.
• If a real-time thread wakes or enters the scheduling queue if there is no processor available to it then the time-sharing thread with lowest priority is kicked back onto the queue and the real-time thread takes its place.
• Time-sharing threads always yield to real-time threads. This makes BeOS a streamlined OS for media applications requiring real-time performance.
![Page 12: BeOS AJ Schuster Robert Robinson Nicole Chung Brian Hoffman.](https://reader036.fdocuments.net/reader036/viewer/2022082506/5697bfee1a28abf838cb971d/html5/thumbnails/12.jpg)
Deadlock• Ports
– act as a message queue
• Semaphores– prevent race situations and situations
where multiple instructions must execute without interference
• Benaphores– combination of an atomic variable and a
semaphore
![Page 13: BeOS AJ Schuster Robert Robinson Nicole Chung Brian Hoffman.](https://reader036.fdocuments.net/reader036/viewer/2022082506/5697bfee1a28abf838cb971d/html5/thumbnails/13.jpg)
Thread StatesRunning Thread receives attention from the
computer
Ready Thread is waiting for its turn to run
Receiving Thread is in receive_data() call
Asleep Thread is in snooze() call
Suspended Thread is first created or suspended
Waiting Thread is waiting to get a semaphore