Professional Documents
Culture Documents
OPERATING SYSTEMS
SUBMITTED BY:-
WALEED RAFIQUE FA08-BS(TN)-056
SUBMITTED TO:-
MUDASSAR RAZA
Lecturer
TABLE OF CONTENTS.....................................................2
TABLE OF FIGURES........................................................5
1. INTRODUCTION.........................................................1
2. GAME CONSOLES.....................................................21
2.4 Comparison...........................................................26
3. OPERATING SYSTEM................................................36
3.2 Deadlocks.............................................................38
3.2.1 Deadlock Handling..........................................................40
3.2.1.1 Ignore Deadlocks.......................................................40
FIGURE 4: MULTIPROGRAMMING....................................5
1
Figure 2: History Of Operating System
In the 1940s, the earliest electronic digital systems had no operating systems.
Computers of this time were so primitive compared to those of today that programs were
often entered into the computer one bit at a time on rows of mechanical switches.
Programming languages were unknown (not even assembly languages).
2
of the 1950s generally ran only one job at a time. It allowed only a single person at a time
to use the machine. These were called single-stream batch processing systems because
programs and data were submitted in groups or batches.
Batch operating systems used a Job Control Language (JCL) to give the operating
system instructions. These instructions included designation of which punched cards
were data and which were programs, indications of which compiler to use, which
centralized utilities were to be run, which I/O devices might be used, estimates of
expected run time, and other details.
• 1951
o LEO I “Lyons Electronic Office” was the commercial development of
EDSAC computing platform, supported by British firm J. Lyons and Co.
3
• 1954
o MIT's operating system made for UNIVAC 1103.
• 1955
o General Motors Operating System made for IBM 701.
• 1956
o GM-NAA I/O for IBM 704, based on General Motors Operating System
• 1957
We can say the 1960’s the era of timesharing and multiprogramming. The
systems of the 1960s were also batch processing systems but they were able to take better
advantage of the computer resources by running several jobs at once. It was observed by
operating system designers that when one job was waiting for an input-output operation
to complete before the job could continue using the processor, some other could use the
idle processor. Similarly, when one job was using the processor, other jobs could be
using the various I/O devices. The operating system designers realized that running a
mixture of diverse jobs appeared to be the best way to optimize computer utilization. The
process by which they do so is called multiprogramming in which several users
simultaneously compete for system resources.
4
Figure 4: Multiprogramming
In 1970 Ken Thompson of AT&T Bell Labs suggested the name “Unix” for the
operating system that had been under development since 1969. In 1973 the kernel of
UNIX was rewritten in the C programming language. This made UNIX the world’s first
portable operating system, capable of being easily ported (moved) to any hardware. This
was a major advantage for UNIX and led to its widespread use in the multi-platform
environments of colleges and universities.
5
(a) Uniprogramming (b) Multiprogramming
• 1960
o IBSYS (IBM for its 7090 and 7094)
• 1961
o CTSS (MIT's Compatible Time-Sharing System for the IBM 7094)
o MCP (Burroughs Master Control Program)
• 1962
o Atlas Supervisor (Manchester University)
o GCOS (GE's General Comprehensive Operating System, originally
GECOS, General Electric Comprehensive Operating Supervisor)
• 1964
o EXEC 8 (UNIVAC)
6
o OS/360 (IBM's primary OS for its S/360 series)
o TOPS-10 (DEC, the name TOPS-10 wasn't adopted until 1970)
o Berkeley Timesharing System (for Scientific Data Systems' SDS 940)
o Dartmouth Time Sharing System (Dartmouth College's DTSS for GE
computers)
• 1965
o Multics (MIT, GE, Bell Labs for the GE-645)
o BOS/360 (IBM's Basic Operating System)
o TOS/360 (IBM's Tape Operating System)
• 1966
o OS/360 (IBM's primary OS for its S/360 series)
o MFT
o DOS/360 (IBM's Disk Operating System)
o MS/8 (Richard F. Lary's DEC PDP-8 system)
• 1967
o CP/CMS (IBM, also known as CP-67)
o Michigan Terminal System (MTS) (time-sharing system for the IBM
S/360-67 and successors)
o ITS (MIT's Incompatible Timesharing System for the DEC PDP-6 and
PDP-10)
o ORVYL (Stanford University's time-sharing system for the IBM S/360)
o TSS/360 (IBM's Time-sharing System for the S/360-67, never officially
released, canceled in 1969 and again in 1971)
o MVT
o WAITS (SAIL, Stanford Artificial Intelligence Laboratory, time-sharing
system for DEC PDP-6 and PDP-10, later TOPS-10)
• 1968
o Airline Control Program (ACP) (IBM)
o TSS-8 (DEC for the PDP-8)
7
o THE multiprogramming system (Technische Hogeschool Eindhoven)
• 1969
o TENEX (Bolt, Beranek and Newman for DEC systems, later TOPS-20)
o Unics (later Unix) (AT&T, initially on DEC computers)
o RC 4000 Multiprogramming System (RC)
o Multics (MIT, GE, Bell Labs for the GE-645 and later the Honeywell
6180)
• 1970
o DOS-11 (PDP-11)
• 1971
o RSTS-11 2A-19
o OS/8
• 1972
o RDOS
o SVS
o VM/CMS
• 1973
o (Elbrus-1) - Soviet computer - created using high-level language uЭль-76
(AL-76/ALGOL 68).
o VME - implementation language S3 (ALGOL 68).
o RSX-11D
o RT-11
o Alto OS
• 1974
o DOS-11 V09-20C
o SINTRAN III
o MONECS
• 1975
o CP/M
8
o BS2000 V2.0
o Sixth Edition Unix
• 1976
o Cambridge CAP computer - All operating system procedures written in
ALGOL 68C, with some closely associated protected procedures in
BCPL.
o Cray Operating System
o FLEX
o TOPS-20
• 1977
o 1BSD
o KERNAL
o OASIS operating system
o TRS-DOS
o Virtual Memory System (VMS) V1.0 (Initial commercial release,
October 25)
• 1978
o 2BSD
o Apple DOS
o HDOS 1.0
o TripOS
o UCSD p-System
o Lisp Machine (CADR)
• 1979
o Atari DOS
o POS
o NLTSS
o UNIX/32V
o Version 7 Unix
9
1.2.4 FOURTH GENERATION (1980-PRESENT)
With the development of LSI (Large Scale Integration) circuits, chips, operating
system entered in the system entered in the personal computer and the workstation age.
Microprocessor technology evolved to the point that it becomes possible to build desktop
computers as powerful as the mainframes of the 1970s.
The 1980s saw the commercial release of the graphic user interface, most
famously the Apple Macintosh, Commodore Amiga, and Atari ST, followed by
Microsoft’s Windows.
Two operating systems have dominated the personal computer scene: MS-DOS,
written by Microsoft, Inc. for the IBM PC and other machines using the Intel 8088 CPU
and its successors, and UNIX, which is dominant on the large personal computers using
the Motorola 6899 CPU family.
• 1980
o CTOS
o OS-9
o 86-DOS
o SOS
o Pilot (Xerox Star operating system)
o Xenix
• 1981
o PC-DOS
o MS-DOS
o Business Operating System
o UTS
o Acorn MOS
o Aegis SR1
10
• 1982
o Commodore DOS
o LDOS (By Logical Systems, Inc. - For the Radio Shack TRS-80 Models I,
II & III)
o SunOS (1.0)
o QNX
o Ultrix
• 1983
o Lisa Office System 7/7
o Coherent
o GNU
o Novell NetWare (S-Net)
o ProDOS
o SunOS 1.0
• 1984
o Mac OS (System 1.0)
o MSX-DOS
o Sinclair QDOS
o QNX
o UNICOS
o Venix 2.0
• 1985
o AmigaOS
o Atari TOS
o DG/UX
o MIPS OS
o Oberon - written in Oberon-2
o SunOS 2.0
o Version 8 Unix
o Windows 1.0
11
o Xenix 2.0
• 1986
o AIX 1.0
o GS-OS
o Genera 7.0
o HP-UX
o SunOS 3.0
o GEOS
o Version 9 Unix
• 1987
o Arthur
o IRIX
o MINIX 1.0
o BS2000 V9.0
o OS/2 (1.0)
o PC-MOS/386
o Windows 2.0
• 1988
o A/UX (Apple Computer)
o RISC iX
o LynxOS
o Mac OS (System 6)
o MVS/ESA
o OS/400
o SpartaDOS X
o SunOS 4.0
o TOPS-10 7.04
o HeliOS 1.0
• 1989
o EPOC
12
o NEXTSTEP (1.0)
o RISC
o SCO UNIX
o TSX-32
o Version 10 Unix
o Xenix 2.3.4
• 1990
o AmigaOS 2.0
o BeOS (v1)
o Genera 8.0
o OSF/1
o AIX 3.0
o Windows 3.0
• 1991
o Linux
o Mac OS
o MINIX 1.5
o PenPoint OS
o RISC OS 3
• 1992
o 386BSD 0.1
o AmigaOS 3.0
o Amiga Unix 2.01
o RSTS/E 10.1
o Solaris 2.0
o OpenVMS V1.0
o Plan 9 First Edition
o Windows 3.1
• 1993
13
o FreeBSD
o NetBSD
o Newton OS
o Windows NT 3.1
o Open Genera 1.0
o IBM 4690 Operating System
o Novell NetWare 4
o Slackware 1.0
o Spring
• 1994
o AIX 4.0, 4.1
o RISC OS 3.5
o NetBSD 1.0
• 1995
o Digital UNIX (aka Tru64 UNIX)
o OpenBSD
o OS/390
o Plan 9 Second
o Ultrix 4.5
o Windows 95
• 1996
o Mac OS 7.6
o Windows NT 4.0
o RISC OS 3.6
o AIX 4.2
o Palm OS
• 1997
o Inferno
o Mac OS 8
o SkyOS
14
o MINIX 2.0
o RISC OS 3.7
o AIX 4.3
• 1998
o Solaris 7
o Windows 98
o RT-11 5.7
o Novell NetWare 5
o JUNOS
• 1999
o AROS
o RISC OS 4
o Mac OS 9
o Windows 98 (2nd edition)
o Inferno Second Edition
• 2000
o AtheOS
o Mac OS 9
o Windows 2000
o Windows Me (Millennium Edition)
• 2001
o Mac OS X
o Windows XP
o z/OS
• 2002
o Syllable
o Red Hat Enterprise Linux
• 2003
o Windows Server 2003
15
o Fedora Core Linux FC1
• 2006
o Windows Vista
• 2009
o Windows 7
Why would we need a game console instead of a computer? There are several
reasons:
• A video game console is less expensive than a computer specially designed to run
video games.
• Video game systems are designed to be part of your entertainment system. This
means that they are easy to connect to your TV and stereo.
• Game developers know exactly what components are in each system, so games
are written to take full advantage of the hardware.
• Most video game systems have games that allow multiple players. This is a
difficult process with a typical home computer.
16
The history of video game consoles is divided into as many as seven generations
according to the technologically development and popularity.
Although the first computer games appeared in the 1950s, they were based around
vector displays, not analog video. It was not until 1972 that Magnavox released the first
home video game console which could be connected to a TV set—the Magnavox
Odyssey, invented by Ralph H. Baer. The Odyssey was successful only to some extent,
and it was Atari's arcade game called Pong which loudly announced the entry of video
games and took the public attention to the emerging industry. By the autumn of 1975
Magnavox, bowing to the popularity of Pong, cancelled the Odyssey and released a
scaled down console that only played Pong and hockey, the Odyssey 100. A higher end
console called the Odyssey 200 was simultaneously released with the 100, and had added
features like onscreen scoring, ability to support up to four players and had a third game -
Smash. This phase in the development of video game consoles is called the first
generation.
In 1976, the Fairchild Video Entertainment System (VES) was released. This
console made the first true use of the cartridge as game storage device. Previously there
had been other consoles like the Odyssey that used cartridges, but had no data and served
a function similar to flipping switches. The VES, however, contained a programmable
microprocessor so its cartridges only needed a single ROM chip to store microprocessor
instructions. RCA and Atari soon released their own cartridge-based consoles. Atari's
Video Computer System (VCS), later known as the Atari 2600, was based on an 8-bit
Motorola 6507 microprocessor, with 256 bytes of RAM. We can say this generation as
the”Golden Era” of video game systems.
17
In 1983, Japanese gaming giant Nintendo introduced the Family Computer, also
known as Famicom in Japan. It supported high-resolution sprites and with more colored
tiled backgrounds. This facilitated games in Famicom to be longer and have higher
graphics detailing. Nintendo brought their Famicom over to the US in the form of the
Nintendo Entertainment System (NES) in 1985 and almost instantly gained immense
popularity. To distinguish its product from older video game consoles, Nintendo used a
front-loading cartridge port similar to a VCR on the NES, packaged the NES with a
Super Mario Brothers game.
Initial fifth generation consoles included the Atari Jaguar and the 3DO, which
were loaded with many more features than the Super Nintendo. It was in this era, on
December 3, 1994, that Sony's PlayStation was released in Japan. The PlayStation could
have been a result of a business partnership between Sony and Nintendo to make a CD
based add-on for the SNES. But, this was not to be and Nintendo walked out of the deal
approached Philips. With the PS project nearing completion, Sony used its own resources
and marketed this console under its own brand name. This was a landmark event in the
history of video game consoles.
18
This generation saw a move towards PC-like architectures in gaming consoles, as
well as a shift towards using DVDs for game media. This brought games that were both
longer and more visually appealing. Furthermore, this generation saw another noticeable
development in the history of game consoles. There was experimentation with LAN type
online console gaming and introductions of flash drives and hard drives for game data
storage.
• Sony's PlayStation 2 was released in North America on October 26, 2000 as the
follow-up to its highly successful PlayStation, and was also the first home game
console to be able to play DVDs.
• The Nintendo GameCube, released November 18, 2001 in North America, was
Nintendo's fourth home video game console and the first console by the company
to use optical media instead of cartridges.
• Microsoft's Xbox, released on November 15, 2001 in North America, was the
company's first video game console. The first console to employ a hard drive right
out of the box to save games, and had similar hardware specifications to a low-
end desktop computer at the time of its release.
The features introduced in this generation include the support of new disc
formats: Blu-ray Disc, utilized by the PlayStation 3, and HD DVD supported by the
Xbox 360 via an optional accessory, which was later discontinued as the format was
closed. Another new technology is the use of motion as input, and IR tracking, as
implemented on the Wii, and PS3. Also, all seventh generation consoles support standard
wireless controllers.
• Microsoft released the Xbox 360 in 2005. It featured processing power never
before seen until Sony rivaled back with its Playstation 3 one year later. It
additionally played DVDs, which is the main reason it has been able to somewhat
compete with Nintendo's console.
19
• Sony PlayStation 3 was released in Japan on November 11, 2006.PlayStation 3
come with a hard drive and is able to play Blu-ray Disc movies and games out of
the box. The PlayStation 3 was the first video game console to support HDMI
output out of the box, utilizing full 1080p resolution. Up to seven devices
(including controllers, with tilt-sensing capabilities) connect to the console using
Bluetooth.
• Nintendo Wii was released in North America on November 19, 2006. The Wii
does not support an internal hard drive, but instead uses 512 MB of internal Flash
memory and includes support for removable SD card storage. It also has a
maximum resolution output of 480p, making it the only seventh generation
console not able to output high-definition graphics. Along with its lower price, the
Wii is notable for its unique controller, the Wii Remote, which resembles a TV
remote. The system utilizes a "sensor bar" that emits infrared light that is detected
by an infrared camera in the Wii Remote to determine orientation relative to the
source of the light.
20
2. GAME CONSOLES
2.1.1 CPU
21
As with any computer, the CPU is the heart of the Xbox 360. Microsoft has
outfitted the 360 with a 165-million transistor, multi-core processor running three 3.2-
GHz PowerPC cores.
The other interesting thing to note about the Xbox 360 CPU is that each core is
capable of processing two threads simultaneously.
2.1.2 GPU
Another powerful asset in the Xbox 360 is the Graphics Processor Unit (GPU).
The Xbox 360 boasts the new, custom-built 500-MHz ATI Graphics Processor card with
10 MB of embedded DRAM. The most innovative thing about this card is that it is built
on unified shader architecture.
Shaders are computer programs that determine the final look of what you see on
the screen when you're looking at computer animation. Shaders take rendered 3-D objects
built on polygons (the building blocks of 3-D animation) and make them look more
realistic. There are two types of shaders: pixel shaders and vertex shaders.
• Pixel shaders alter the lighting, color and surface of each pixel. This in turn
affects the overall color, texture and shape of 3-D objects built from these pixels.
Pixel shaders help "smooth out" 3-D objects, giving them a more organic texture.
22
creates realistic animation and special effects such as "morphing." To read more
about vertex shaders,
23
Sony designed the PlayStation 3 to be more than just a video game console. It
supports all kinds of digital entertainment and is basically a home-entertainment
computer. This computer sports a specially designed CPU called the Cell processor.
Sony, Toshiba and IBM worked together to develop the Cell processor. The setup of the
Cell processor is like having a team of processors all working together on one chip to
handle the large computational workload needed to run next-generation video games.
The Cell is a 3.2-GHz PowerPC core equipped with 512 KB of L2 cache. The
PowerPC core is a type of microprocessor similar to the one you would find running the
Apple G5. It's a powerful processor on its own and could easily run a computer by itself;
but in the Cell, the PowerPC core is not the sole processor. Instead, it's more of a
"managing processor." It delegates processing to the eight other processors on the chip,
the Synergistic Processing Elements.
The computational workload comes in through the PowerPC core. The core then
assesses the work that needs to be done, looks at what the SPEs are currently processing
and decides how to best dole out the workload to achieve maximum efficiency.
Sony designed the RSX with graphics-card manufacturer Nvidia. The RSX is
based on Nvidia's GeForce graphics technology. It's a 550-MHz, 300-million-transistor
graphics chip. Unlike the GPU in the Xbox 360, the RSX is built on the traditional
independent vertex/pixel shader architecture. All of this translates to a level of graphic
detail never before seen on a video-game console. With one HDMI output, the
PlayStation 3 supports 480i, 480p, 720p, 1080i and 1080p.
24
Release date: 19 November 2006
2.3.1 DESIGN
25
Nintendo implemented the really interesting solution - untypical WiiMote
controller which has no analogue knobs whereas with appearance resembles... remote
control of the TV set. The equipment has built in accelerometer and special, separate
sensor responsible for detecting laying the controller in the space. Games exploiting the
pilot Nintendo are giving the player pleasure very much. How does it work? Well, when
we play tennis the equipment is replacing for us rocket, when we are fighting with the
sword, the device will be performing the role of the sword. What's more, the system of
implementing of moves is very user-friendly, what producers will be able to put new
outlines of movements to data of games. The equipment has also a system of shocks and
the loudspeaker built in.
2.4 COMPARISON
26
Console
Microprocessor
Processor 3.2 GHz PowerPC with 3.2 GHz Cell 729 MHz IBM
Type 3 dual-threaded processor with 7 Broadway processor
processor cores single-threaded with 5 execution units
synergistic
processing units
cores (not directly
comparable to
Xbox 360
processor cores)
GRAPHICS PROCESSOR
27
plus 10 MB embedded DRAM
embedded DRAM (eDRAM)
(eDRAM) frame
buffer
VIDEO
Native Video 16:9 widescreen 480i, 480p, 720p, 853 x 480 (480p) in
Resolutions 720p, 1080i, 1080p 1080i, 1080p (will widescreen or 4:3
(will downsample to downsample to aspect ratio
standard definition) standard definition)
AUDIO
28
Software based:
limited only by CPU
and memory.
SYSTEM MEMORY
STORAGE
CD-DA, CD-R,
CD-ROM, CD-RW,
29
CD-R, DualDisc (audio
side),
CD-RW,
DualDisc (DVD
WMA CD,
side),
MP3 CD,
DVD+R,
JPEG Photo CD
DVD+RW,
(HD DVD
supported with DVD-R,
optional HD DVD
DVD-ROM,
drive).
DVD-RW,
PlayStation 3 BD-
ROM,
PlayStation 3 DVD-
ROM,
SACD HD,
Elite: 120 GB
removable hard
drive
30
External Hard Yes, but limited to Yes No
Drive Support media playback
only.
There are many more specifications of these consoles that can be compared
additionally, but these are the ones that most users would be concerned with. Here are
some of the key points that can be inferred from this table, and that help in answering the
question What is better – Xbox 360, PS3 or Wii.
• The Wii has the lowest memory space possible. The PS3 has the most with their
320 GB version.
• The graphics and CPU clocking speed are almost similar for all three consoles.
• The biggest advantage is with the PS3, as it plays Blu-ray discs. The Wii cannot
play any media content.
First of all, since the development of the game system called Atari 2600, nothing
has really changed in terms of the basic hardware inside the game console. The only
change was that the components even became more advanced. Here are what these game
consoles have in common in terms of hardware:
31
• CPU
• RAM
• Software kernel
• Video output
• Audio output
• Power supply
The user control interface is what separates a video game from a TV. This is
where you, the user, will interact with the game. Without it, it will be like a passive form
of entertainment that is very much like your home TV. The user control interface is
where you will plug in your joysticks, or controllers.
Ever since the early days of the Atari 2600, video game systems have relied on
RAM to provide temporary storage of games as they're being played. Without RAM,
even the fastest CPU could not provide the necessary speed for an interactive gaming
experience.
The two most common storage technologies used for video games today are CD
and ROM-based cartridges. Current systems also offer some type of solid-state memory
cards for storing saved games and personal information. Systems like the PlayStation 2
have DVD drives. The PlayStation 3 goes even farther -- it has a Blu-ray DVD drive.
The audio and video output is where you will connect your video game system to
your standard TV and your stereo. Obviously, the video output goes to the TV and the
Audio output goes to your stereo system.
32
As you can see, the video game system works fairly simple. It is simply just a
matter of transmitting and receiving electronic signals to hardware in the video game.
Some people even connect their video game systems to their home entertainment system.
These people connect their game system to their wide screen TV and some even connects
it to their digital surround speakers for a more satisfying and realistic game play.
2.6.1 ADVANTAGES
• The second most obvious advantage is simplicity. People can actually take a
console home and be playing a game within minutes. No operating systems to
configure or drivers to update, and better still, no purchasing a game only to find
out that it isn't compatible with your PC for some obscure reason.
• The graphic quality and the performance of the game are very high, because
console have the same hardware and the developer knows that what kind of game
can be easily played on the console.
• Multiplayer gaming is also made easy with companies like Microsoft offering
online services for their product. The Xbox, which came equipped with a network
card, raised the bar for consoles in this regard, making it a simple matter to hook
it up to a DSL or Cable Internet connection and get into a multiplayer game on
Xbox Live, complete with voice chat.
• Console games tend to have a relatively low learning curve. You might need fast
thumbs, but you certainly won't need to spend hours in a "tutorial" trying to learn
how to operate basic game functions.
2.6.2 DISADVANTAGES
33
• Although sealing everything into one unit does keep it simple, when some of the
components inside the box become dated there's no way to solve the problem
without replacing the entire console.
• Consoles perform only one task really well, where PCs can be used for an
extremely wide range of things.
Until the Nintendo Wii came along and seized control of the market, the future of
video game consoles was pretty predictable. Keep making bigger, faster, more powerful
consoles with better graphics, sound. But the Wii changed all that. There will be another
generation of video game systems that will be made. It will be known as the eighth
generation of gaming. This is the generation of interactive gaming, online competition,
and plenty of action. Most likely, you can expect the systems to be from Nintendo, Sony,
and Microsoft.
The Xbox 720 would be the hypothetical name for it considering that Xbox went
to Xbox 360 to go full circle. It would be a guess that it would go to two full circles thus
giving it the name 720. The power that it could possess could be limitless and even have
the potential to play not just the 360 games but also the Xbox ones as well.
Sony will be looking to make a rebound so to speak when it comes to its next
generation console. It will probably be dubbed the PlayStation 4. This one could possibly
have two places to place games depending upon compatibility issues with one drive to
make it work all the way back to the PlayStation. There is also the case of a button
pushed so that it can be set up to work with PS2 and PS1 games so that it does not affect
the other drives. The controllers can be wireless and it will have graphics that could
34
slightly improve but looking at how they are now, it may seem a bit difficult to make it
even better.
Nintendo will never put more focus on the graphics than they have in their
history. They have been more about the innovation. Perhaps this could be the time to
make a modified version of the Virtual Boy, only this time use all the colors and make it
work. It would need that Virtual Reality feel with it being in a First Person view.
35
3. OPERATING SYSTEM
Scheduling refers to the way processes are assigned to run on the available CPUs,
since there are typically many more processes running than there are available CPUs.
This assignment is carried out by software known as a scheduler and dispatcher.
A multi-level feedback queue scheduling policy gives preference to short and I/O
bound processes, it also rapidly establishes the nature of a process and schedules it
accordingly.
36
Any processes that do not complete in their allocated time slice / quantum are
demoted to a queue of less priority, these lower priority queues generally have larger
quantum’s / time slices.
Each of the queues may use a different scheduling algorithm, this is done to make
the overall scheduling method as efficient as possible.
The features that may vary between different multi-level feedback queue
scheduling methods are:
• The method used to determine which queue a process will enter when that process
needs service.
37
From the above figure of Multilevel Feedback Queues:
• If it does not finish within this time, it is moved to the tail of queue 1.
• Processes in queue 2 are run on an FCFS basis but are run only when queues 0
and 1 are empty.
3.2 DEADLOCKS
• Resources may be of several types and there may be several instances of each
• When a process requests a resource any instance of that resource will satisfy the
process
o Processes can
o request a resource
38
• A set of processes is in a deadlock state when every process in the set is waiting
for an event that can be caused only by another process in the set.
o Same resource type - three tape drives, three processes request a tape
drive then they each request another. Dining philosophers request
chopsticks held by another.
o Different resource type - process A has a printer process B has a file, each
requests the other's resource.
• Hold and Wait - processes currently holding resources can request new resources
39
• Circular wait - Each process is waiting to obtain a resource which is held by
another process.
There are several ways to address the problem of deadlock in an operating system.
• Just ignore the problem altogether. Maybe if you ignore it, it will ignore you.
• Detection and recovery. Let deadlocks occur, detect them, and take action.
We will discuss only this method of handling deadlock because most of the game
consoles use this handling technique.
The simplest approach: stick your head in the sand and pretend there is no
problem at all. In general, this is a reasonable strategy. Deadlock is unlikely to occur very
often; a system can run for years without deadlock occurring. If the operating system has
a deadlock prevention or detection system in place, this will have a negative impact on
performance (slow the system down) because whenever a process or thread requests a
resource, the system will have to check whether granting this request could cause a
potential deadlock situation.
Most operating systems potentially suffer from deadlocks that are not even
detected, let alone automatically broken. Most operating systems, including Windows,
just ignore the problem on the assumption that most users would prefer an occasional
deadlock to a rule restricting all users to one process, one open file, and one of
40
everything. If deadlocks could be eliminated for free, there would not be much
discussion.
• protect the memory spaces used (e.g. prevent a user from changing a task
performed by another user);
The main problem with memory is that there’s never enough. Modern consoles
(like the Xbox 360 and PS3) have about 512MB of memory. This might seem like a lot
compared to the 32MB of the PS2, but really isn’t that great compared to a PC, or the
requirements of modern games. Additionally, consoles don’t generally support virtual
memory, a feature of PCs which let the operating system use the hard disk as additional
RAM when needed. The end result is that console games have many extra constraints and
must take over the burden of managing their own memory more closely than normal PC
applications.
41
• No virtual memory, which means once you’re out of memory, you’re out of
memory. No swap file is going to save you on a console.
• Multiple physical memory types. On the PC you have RAM and video RAM, but
you have a video driver that manages it for you, not on consoles.
• Memory alignment is also a problem on consoles. The x86 CPU is very forgiving.
However console CPUs are generally stricter. Alignment is also very important
for performance.
Having no virtual memory or swap file is the reason we need to focus so much
time and energy on memory management. On a console, when you’ve used all your
memory you can’t swap memory to the swap disk. You have no choice but to fit within
the limits of the system.
The different arrangement of physical memory is where most consoles differ from
each other (the other main way is the different CPU and GPU configurations). This
means that each console can have very different configurations and restrictions when it
comes to physical memory types, however the restrictions imposed by physical memory
types usually follows a few common patterns.
Here are some issues that physical memory types can impose:
42
• Different physical addressing. Main memory may have addresses in the range
[0x60000000, 6fffffff] where video memory would have the range [0x10000000,
0x1fffffff].
• Different visibility from different devices. Meaning that the main CPU may not
be able to access parts of video memory. Similarly the GPU may not access
memory in the CPU’s cache. This means that when the CPU creates data for the
GPU to use is must make sure the data is flushed from the cache before the GPU
accesses it.
• Non-symmetrical access and throughput. Just because a device can read from a
memory location doesn’t mean it can write to that same location. It wouldn’t be
unheard of for a GPU to be able to read from main memory but be unable to write
to main memory. Often devices can both read and write but at different rates. It’s
also common for the CPU to write to the video memory at 1GB/s but only read at
say, 256MB/s.
3.3.4 ALIGNMENT
43
Some hardware, like the GPU, the sound processor and even the DVD drive have
even stricter alignment restrictions. Sometimes they have very large alignment
requirements like 32 bytes or even 128 or 4096 bytes or more. The reasons are
complicated, but have to do with how memory is transferred between devices and
accessed at a hardware level. For example the data for a texture will may have to start at
a physical page boundary, or 4 Kb alignments. This means that when we load and
allocate memory for the texture we have to be aware of this requirement. Like the
alignment of regular data types, often the hardware will transparently read the wrong data
if misaligned. Needless to say, you have to be familiar with the requirements of the
hardware you’re interacting with.
44
4. REFERENCE
• http://www.computerhope.com/os.htm
• http://www.webopedia.com/FIG/OPER-SYS.gif
• http://www.personal.kent.edu/~rmuhamma/OpSystems/Myos/osHistory.htm
• http://www.osdata.com/kind/history.htm
• http://www.cs.uiowa.edu/~jones/opsys/notes/03.shtml
• http://en.wikipedia.org/wiki/Timeline_of_operating_systems
• http://www.buzzle.com/articles/history-of-video-game-consoles.html
• http://en.wikipedia.org/wiki/Video_game_console
• http://www.informit.com/articles/article.aspx?p=378141
2. Game Console
• http://electronics.howstuffworks.com/video-game1.htm
45
• http://en.wikipedia.org/wiki/History_of_video_game_consoles_(seventh_generati
on)
• http://electronics.howstuffworks.com/xbox-three-sixty.htm
• http://electronics.howstuffworks.com/playstation-three.htm
• http://electronics.howstuffworks.com/wii.htm
2.4 Comparison
• http://www.winsupersite.com/article/product-review/xbox-360-vs-playstation-3-
vs-wii-a-technical-comparison.aspx
• http://www.buzzle.com/articles/xbox360-vs-ps3-vs-wii.html
• http://www.articlealley.com/article_1271408_32.html
• http://electronics.howstuffworks.com/video-game3.htm
• http://internetgames.about.com/od/hardware/a/pcvsconsole.htm
• http://ezinearticles.com/?Computer-Gaming-Versus-Console-
Gaming&id=581633
• http://ezinearticles.com/?The-Future-of-Video-Game-Consoles&id=1644356
• http://www.helium.com/items/993554-the-future-generation-of-games-consoles
• http://en.wikipedia.org/wiki/Scheduling_(computing)
46
• http://www.dlhoffman.com/classnotes/csci420-f05/slides/ch5/siframes.html
• http://wiki.answers.com/Q/What_is_Multilevel_feedback_queue
• http://siber.cankaya.edu.tr/OperatingSystems/week6/node7.html
3.2 Deadlocks
• http://lovingod.host.sk/tanenbaum/Recovery-from-Deadlock.html
• http://www.cs.rpi.edu/academics/courses/fall04/os/c10/index.html
• http://www.cs.csi.cuny.edu/~imberman/OS/Deadlock.htm
• http://en.kioskea.net/contents/systemes/memoire.php3
• http://systematicgaming.wordpress.com/2008/08/05/memory-management-
introduction/
• http://systematicgaming.wordpress.com/2008/08/15/memory-management-
consoles/
47