The Symbian OS (779886), страница 71

Файл №779886 The Symbian OS (Symbian Books) 71 страницаThe Symbian OS (779886) страница 712018-01-10СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 71)

So it’s notsurprising they went for it.Martin Budden, already a veteran at that time, was an early C++advocate.Martin Budden:I was actually advocating C++ fairly early on, but I wasn’t the only one, therewere other people advocating C++ too. There was a debate about whetherto move to C++ or stay with C and, fairly quickly, the C++ argument won.Since Colly was doing the first cuts of the operating system, once he had beenconvinced, it followed from there.Geert Bollen arrived at Symbian in the early summer of 1995 withimpeccable credentials in object orientation and a significant backgroundwith C++, specifically.

While others in the company were still learningC++, Bollen already had three to four years heavy-duty implementationexperience behind him. By the time he arrived, the decision to go withC++ had already been made and the team was six months into theproject.Geert Bollen:C++ seemed the obvious choice from my perspective. But I suppose I hadn’treally been exposed so much to some of the issues in an operating-systemcontext.

But consider, it’s only in the last few years that the C++ ABI (Application Binary Interface) has been standardized, so that completely determinesthe interoperability of different toolsets. That gives you an idea of how youngthe language was, at least as an industrial tool. All that had been taken forgranted in the C world since the ’80s; they just weren’t issues. In the C++world they were wide-open problems.PIONEERING THE OBJECT APPROACH IN PSION341When Bollen joined the project, the lack of standardized low-leveltools meant that no code was yet running on ARM hardware, and alldevelopment was still emulator-based.

The project was still feeling itsway, climbing the language-learning curve while throwing its energy intothe object-oriented design opportunities of a clean, from-the-ground-up,re-engineered system.Geert Bollen:Moving to C++ was a very brave decision. I don’t know if it seemed so at thetime, but in hindsight it was a very, very brave decision. They had selectedC++ to build this system, with some trepidation, as a leap of faith.Challenges of Switching LanguagesSwitching incurs costs. There were what David Wood might call the‘sociological’ issues, the questions of what tools developers knew, theproblems of bringing in new developers familiar with C++ but not with thein-house object-oriented style, while training up the seasoned in-housedevelopers in a new language; and all this, of course, as the design itselfevolved fairly freely.But there were other problems too.

Performance problems, perhapsinevitably, quickly became apparent.Howard Price:C++ was slow and big in various situations. For example, the OPL VM grewby about six times when it was ported from S3 8086 Assembler to C++. Therewas some argument, to the point where there was talk of dropping C++ andmoving back to the faster, leaner, meaner approach – just sticking to C. But,thankfully, David Wood and Charles Davies were really strongly committedto C++ and object orientation, and they persuaded the rest that this was theway to go.But the biggest practical headache almost certainly was the lack of asuitable, stable toolchain.Geert Bollen:The target tools were not in place when I arrived, so whatever the system was,it was emulator-only.

The kernel implementation was an emulator implementation. The on-the-metal version of the kernel was started and delivered afterI arrived. Colly Myers assembled a team for that. Before that, he had been aone-man band.342THE USE OF OBJECT-ORIENTED DESIGN IN SYMBIAN OSThere was no standard toolset capable of targeting both Intel and ARM.Or rather there was, of course, the GNU GCC toolchain, but not onethat would work naturally in a Microsoft Windows development environment. Since most development took place on Microsoft Windows for theemulator targets, a productive Microsoft Windows programming environment was essential.

Microsoft’s compiler and toolchain targeted only Intelprocessors. Because there was no standard Application Binary Interface(ABI), Intel binaries were in a world apart from the GCC ARM binaries.4In the short term, this meant that bespoke tools had to be written toenable dual-target compile and build using two different compilers, eachwith its own make and link tools and other utilities, but in a way thatintegrated reasonably well enough with the Microsoft Windows-basedIDE so as not to cripple developer productivity.The longer-term legacy is that this bespoke system still persists, inessentials unchanged, to this day, a source of low-level discomfort for theexternal developer community. (Internally, it is as it is and you get usedto it.

Externally, it is reasonable to ask why you should have to get usedto something that causes development pain.)The underlying problem of course is that phones now, and PDAsthen, are essentially embedded devices, and the development processfor embedded systems is inherently more complex (typically in arcaneand opaque ways) than development for desktop systems. A crosscompilation model is natural and inevitable in an embedded-systemscontext.

For Symbian OS now, as then, initial development is based onan emulator hosted by Microsoft Windows and only later (when the basicimplementation is running) moves to a cross-compilation model targetingreal hardware, either prototype or production devices or reference boards.Another lasting legacy of the early tools problems is the nature ofthe emulator implementation. Essentially, the emulator consists of theuser libraries (the base-level services and utilities above the kernel itself)and higher-level kernel services implemented on top of native MicrosoftWindows libraries. This is nominally transparent to the higher layersof the system, but key kernel services and hardware-level services arereally being provided by the host operating system, in this case MicrosoftWindows, to which the low-level calls of the hosted system are mapped.Historically, the problem with this solution is that for anything beneathapplication-level programming, the true behavior of the code is obscuredby the underlying Microsoft Windows implementation.

This was not anissue in the early development of the operating system, since the wholepoint of the emulation was to allow the application developers to geton with work on the application suite, but it rapidly became a problemboth for internal and external developers. While the worst problems have4Standardization at the binary level is only now appearing across the toolchain with thestandardization and adoption of ARM’s EABI, enabling interoperation of tools from differentvendors.PIONEERING THE OBJECT APPROACH IN PSION343been fixed for some time, some awkward issues have remained even upto the most recent releases of the operating system.

Those challenges canbe traced all the way back to those first problems of early adoption of apre-standard C++.As the kernel moved onto real hardware and began to exercise theARM-targeted toolchain, yet more challenges emerged.David Wood:We hit various quite significant obstacles along the way, for example we werecalling C++ functions from one DLL into another DLL in a way that I don’tthink had been widely done before, and certainly this required lots of changesin the GCC compiler that we used. So several times, the implementation forARM as opposed to the emulator got held up because we were using C++to the limit, with the DLLs, and we needed to get Cygnus (who were at thatstage under contract from us, maintaining GCC) to issue numerous fixes.

Sowe were pushing it to the limit.Again the issue was the immaturity of the C++ development environment and the lack of standardization of the low-level interfaces.Yet another area in which early adoption proved to be costly was thelack of standardization at the level of the basic language libraries.David Wood:There was no sufficiently agreed standard library that covered the things thatwe wanted. There was no text-handling library that Colly Myers was satisfiedwould provide either the necessary degree of security or the necessary degreeof efficiency and performance.This is the reason that descriptors were invented as type-safe, memorysafe, string and binary-data container classes. The alternative wouldhave been to use standard C++/C-subset strings, which provided neitherprotection against overruns nor type-safety.5 For a system with pretensionsto robustness, they were out of the question.Error handling was another unstandardized area of the C++ language.Again, a solution was invented, specifically aimed at the needs of theclass of device that the operating system targeted, based on the notionsof ‘leaving’ functions and a cleanup stack.65C-style strings are just arrays of raw data bytes, which can be accessed as eithercharacter data or raw binary data, and as bytes or multi-bytes.

Indeed, that very versatility istheir point, but it makes them both error prone and open to accidental or deliberate abuse.6The cleanup stack is used to hold pointers to automatic (i.e., stack-based and, therefore,function-scoped) objects, so that if the function should fail (‘leave’) the objects are deletedand not left allocated but inaccessible (which is a memory leak).344THE USE OF OBJECT-ORIENTED DESIGN IN SYMBIAN OSOther features of the language were treated with caution.Andrew Thoelke:We were very cautious in our adoption of advanced C++ features, partlybecause not all compilers supported them or did them well, but also becauseyou just don’t know whether you’re using a feature which has lots of powerbut has a lot of background overhead to it.

Характеристики

Тип файла
PDF-файл
Размер
2,04 Mb
Материал
Тип материала
Высшее учебное заведение

Список файлов книги

Свежие статьи
Популярно сейчас
А знаете ли Вы, что из года в год задания практически не меняются? Математика, преподаваемая в учебных заведениях, никак не менялась минимум 30 лет. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6455
Авторов
на СтудИзбе
305
Средний доход
с одного платного файла
Обучение Подробнее